Wine on Debian on sun4m

Saulius Krasuckas saulius2 at ar.fi.lt
Wed Oct 13 03:56:25 CDT 2004


On 12 Oct 2004, Vincent [ISO-8859-1] Béron wrote:
> Le mar 12/10/2004 à 09:23, Saulius Krasuckas a écrit :
> > > 
> > >  	Hmmm. Seems that either there is an official patch to apply, or
> > > that I won't be able to run wine on sun4u ... I'm have not enough
> > > skill in C at this time.
> > 
> > Yes, Wine says it needs an implementation of interlocked* functions
> > for your CPU.  That is quite strange, as they seems to be implemented
> > already:
> > 
> > s2 at austechia:/usr/src/wine-20040914$ grep -iA10 sun libs/port/interlocked.c
> > #elif defined(__sparc__) && defined(__sun__)
> 
> __sun__ is defined when building for SunOS, not Linux. __sparc__ is the
> cpu architecture. Usually those functions are written in ASM as C can't
> provide access to the particular instructions needed to do the locking.

Oh, I've always used to thought that "sun" stands for another, more
generic hardware too.  Vincent, thanks for your welcome to the Sun-world.
:-)

> I just implemented those for __ALPHA__. If you don't know how/can't be
> bothered to do them in sparc assembly 

Am I going to learn assembly for the sparc CPU?  Cool.

> (which won't run on earlier machines as the following comment says), 

Vincent, do you mean different sparc CPUs are using different assembly
instructions?

> AND Debian don't provide the lwp libs, 

I see there exist some Debian package on the net [1] called liblwp2, but
apt-get on my box doesn't know about it. :-(

> you can probably do the same using pthread primitives. I just hope that
> Wine's pthread replacement functions do not call the interlocked*
> functions, or it'll probably don't work correctly.

pthread primitives?  Hm, reading what Wine src file should I start from?


> >  * As the earlier Sparc processors lack necessary atomic instructions,
> >  * I'm simply falling back to the library-provided _lwp_mutex routines
> >  * to ensure mutual exclusion in a way appropriate for the current
> >  * architecture.
> >  *
> >  * FIXME:  If we have the compare-and-swap instruction (Sparc v9 and above)
> >  *         we could use this to speed up the Interlocked operations ...

And out of curiousity: Olivier, what is your CPU?  This is of mine:

austechia:~# cat /proc/cpuinfo
cpu             : Fujitsu  MB86904
fpu             : Lsi Logic/Meiko L64804 or compatible
promlib         : Version 3 Revision 2
prom            : 2.24
type            : sun4m
ncpus probed    : 1
ncpus active    : 1
BogoMips        : 109.77
MMU type        : Fujitsu Swift
invall          : 0
invmm           : 0
invrnge         : 0
invpg           : 0
contexts        : 256


[1] http://packages.debian.org/experimental/libs/liblwp2





More information about the wine-devel mailing list