This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: rfc: constant pool and floats


Aldy Hernandez <aldyh@redhat.com> writes:

> store_bit_field() changes the floating constant to a const_int
> because of the unalignment:
> 
>   /* If VALUE is a floating-point mode, access it as an integer of the
>      corresponding size.  This can occur on a machine with 64 bit registers
>      that uses SFmode for float.  This can also occur for unaligned float
>      structure fields.  */
> 
> All this eventually creates a REG_EQUAL note with a const_int, instead
> of a const_double:

That's the problem.  Clearly, (reg:SF 120) is not equal to the
CONST_INT; it's equal to a SFmode CONST_DOUBLE.

> (insn 11 10 0 (set (reg:SF 120)
>         (mem/u/i:SF (lo_sum:SI (reg:SI 121)
>                 (symbol_ref/u:SI ("*.LC0") [flags 0x2])) [0 S4 A32])) -1 (nil)
>     (expr_list:REG_EQUAL (const_int 1202908642 [0x47b2ede2])
>         (nil)))

All SFmode constants are CONST_DOUBLEs.  If you have a CONST_INT, you
can use simplify_subreg to turn it into a CONST_DOUBLE.


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