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!




  In message <199902031732.JAA11769@netcom4.netcom.com>you write:

  > 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.
You don't want to sign extend the float value, but the internal representation
of a float is a series of integer bits.

Consider a 64bit host.  Instead of creating a CONST_DOUBLE for a 32bit floating
point value, it might create a CONST_INT.  Once that's happened, there's no
way to tell that the bit pattern really refers to a floating point value.  So
you don't know how to handle the sign bit copies because you don't know what
the value really represents.

Basically we have an ambigious representation in a couple ways.  I hope that
we'll start to fix it someday, but it is a lot of work.



jeff


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