[MLton] power pc "port"

Matthew Fluet fluet@cs.cornell.edu
Sun, 5 Sep 2004 16:11:00 -0400 (EDT)


> > Henry and/or Stephen can probably chime in with more info, but is GCC
> > really right here?  Word8_neg is specifying an 8-bit negation -- a
> > perfectly well defined operation which given 8 bits returns the 8-bit
> > negation.  While it may be the case that the implementation needs to side
> > step through 32-bit operations, why can the end result look any different
> > than what would happen under an 8-bit machine?
>
> Well, here are more details according to the C standard.

Thanks for the details.  I'm inclined to agree with your reading of the
standard.  Which would seem to indicate that gcc's behavior on x86 is in
the wrong.  I can understand why gcc "optimizes" things on the x86 where
there are 8-bit registers and operations available.  I'm really curious to
understand why (or whether) it is doing the right thing on Sparc.  On that
architecture, we should be in the same boat as with PowerPC -- i.e., only
32-bit registers and operations.