Alpha VM on Solaris UltraSPARC?
nicolas.pelletier3 at free.fr
Sat Mar 12 00:53:28 PST 2005
David Hopwood <david.nospam.hopwood at blueyonder.co.uk> writes:
> Nicolas Pelletier wrote:
> > Just an aside: a similar problem with dispatchID shows up on a 32-bit
> > sparc. The 2 offending lines where dispatchID is used in the VM must
> > be converted to a byte-per-byte copy mechanism using a for loop (since
> > gcc optimizes calls to memcpy).
> memcpy is required to work for unaligned pointers. If it didn't that
> would be a bug in gcc, and I'm not aware of any such bug.
I remember noticing a difference with gcc 2.95.2 on a sparc depending
on the optimization level: -O0 would leave the calls to memcpy in the
executable code, producing a working VM; -O2 would try to inline the
calls and the resulting executable contained an unaligned access
x->dispatchID that crashed the thing.
This problem does not qualify as a memcpy problem, but as an
optimization problem, you are correct. I was too lazy to write a full
sentence, and this resulted in an ambiguous meaning. Anyway, I'll try
again with mwmcpy to check if the error was merely on my side.
More information about the Slate