This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cross-compiled floating point constants broken NOT!


> 
> 
> 
> 
> 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
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]