Hi Bertho,
I've again been playing a little with Wine on Solaris/Sparc, and noticed
that while the endianness issues are now fine, WRC will still crash with
bus errors due to unaligned memory accesses when running on Sparc.
Unfortunately, this is not just a problem of fixing a few generic
access routines (like put_word etc.), but the assumption that arbitrary
access is possible pervades a lot of WRC code, most severely all the
bitmap/icon/RIFF conversion routines in newstruc.c.
The usual mode of operation there is to compute a pointer into the original
resource data (which yields a number *not* necessarily properly aligned) and
cast that pointer to some struct type, thereby making a promise to the
compiler that you know the pointer is really always aligned ;-)
Do you intend to fix these alignment issues or should I send a patch?
Unfortunately, there is probably no method to fix this that isn't
either ugly (by introducing explicit cases all over the place) or else
reducing efficiency on Intel somewhat (by always accessing single bytes) ...
B.t.w. another minor problem I notices: you're generating .word directives
in the output assembly files to create 16-bit wide data fields. Unfortunately,
on Sparc .word will create a data field the size of a standard machine word,
i.e. 32 bits. If you use .short (or .half or .hword) you're guaranteed to
get 16 bits on all platforms (at least when using GNU as).
Bye,
Ulrich
--
Dr. Ulrich Weigand
[EMAIL PROTECTED]