cross-compiled floating point constants broken NOT!

David Whitten whitten@netcom.com
Wed Feb 3 09:32:00 GMT 1999


> 
> 
> 
> 
> Elsewhere the treatment of integer versus floating values does not
> seem so clear-cut.  For example, in split_double the pieces get sign
> extended if the input is an integer type but not if it is a floating
> point type.  Do we know offhand if that is good or bad?
> 
> 

I'm not sure if it makes sense to sign extend a float.
To my knowledge sign extension is a copy operation of the sign
of a smaller integer into the upper bytes when it is copied into a
register or memory storage that is wider than it is.

Ie: a signed char (1 byte) into a 4 byte storage needs the
upper 3 bytes to be a copy of the sign, (either FF FF FF or 00 00 00)
so that the two's complement works properly.

Float values don't (to my knowledge) use two's complement, hence they
don't need to be sign extended.

David
 


More information about the Gcc-bugs mailing list