2009/3/28 Jean-Claude Beaudoin jean.claude.beaudoin@gmail.com:
Recent versions of GCC appear to be leaving spurious bits in the %eax register used to return the value of a C function on x86 based platforms when the return type is narrower than 32 bits (ie: short or char).
Is that a GCC bug or is that behaviour here to stay?
I'd like to make this work for all the supported Lisps but only when necessary. Can we check at compile time whether this workaround is needed? For example, would the following work? Define abs() with a short/char return value and check whether the upper bits are masked away.