[patch,middle-end] Fix problem with constant doubles in emit_group_load_1

John David Anglin dave@hiauly1.hia.nrc.ca
Thu Sep 27 06:44:00 GMT 2007

> On 9/24/07, John David Anglin <dave@hiauly1.hia.nrc.ca> wrote:
> > 2007-09-24  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
> >
> >         PR middle-end/33436
> >         * expr.c (emit_group_load_1): Split constant double when destination
> >         length is half source length.
> I'm wondering whether this shouldn't be handled in the backend itself?
> How do other backends handle cases where constants do not fit their
> widest type?

I don't believe that is possible.  In this case, assemble_integer
is passed a CONST_DOUBLE and a size of 8.  If a size of 16 had been
passed, targetm.asm_out.integer would have returned false and
assemble_integer would have tried to split the constant.

> I haven't been in this area for a while, so your patch may make better
> sense than forcing the backend to split the constant.  Ian?  Richard?

Not splitting the constant isn't an option in emit_group_load_1 since
assigning the same constant for both pieces generates incorrect rtl.
So, the constant either has to be split, or passed to emit_group_load
in a different form.  Originally, we had a vector mode constant with
four 32-bit ints.

J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

More information about the Gcc-patches mailing list