Oleg Goldshmidt wrote:

[1] even "primitive" types wider than int, such as long and double;
AFAIK Java manuals specifically warn that there is no atomic
access to longs and doubles unless you declare them volatile.


On the 68000 all datatypes are 8, 16 or 32 bits wide. The actual bus, however, is only 16 bits wide. Even a simple 32 bit integer (natively supported by the CPU) does not guarantee atomicness.

[2] yes, there are some, your ints may be not word-aligned


Well, if you just compiled them, they are pretty sure to be ok. If you got them through a pointer, however, they may be unaligned (depending on who generated them).

Intel doesn't enforce integral boundaries. Motorola 68000 did, but only on 16 bit boundaries (because that was it's bus width). Then 68020 had 32 bit bus, and it had to be ok with non-aligned integers or programs written for the 68000 wouldn't work, so it stopped enforcing them as well. As an Amiga owner, I had problems with programs written for 68020 trying to access 16 bit values on 8 bit boundaries, which would work on 68020 but not on 68000. Guru meditation 80000003 - CPU unaligned access error.

         Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting ltd.
http://www.lingnu.com/


================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]



Reply via email to