This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Extracting components of complex constants (take 2)
- From: Roger Sayle <roger at eyesopen dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, <rsandifo at redhat dot com>
- Date: Mon, 2 Jun 2003 15:25:46 -0600 (MDT)
- Subject: Re: [PATCH] Extracting components of complex constants (take 2)
Hi Kazu,
> > 2003-05-26 Roger Sayle <roger@eyesopen.com>
> >
> > * emit-rtl.c (gen_complex_constant_part): New function for getting
> > the constant real or imaginary part of a complex constant.
> > (gen_realpart): Use it.
> > (gen_imagpart): Likewise.
>
> This patch seems to cause the following, a simplified version of
> complex-2.c, to fail on h8300-hms.
>
> /* h8300-hms-gcc -O2 */
>
> void bar (__complex__ double x);
>
> void
> foo ()
> {
> __complex__ double a = 1.0;
> f (a);
> }
>
> complex-2.c: In function `foo':
> complex-2.c:8: error: unrecognizable insn:
> (insn 8 21 9 0 0x402658f0 (set (reg/v:SF 16 [ a ])
> (const_double:SF -2147483648 [0x80000000] 1.0e+0 [0x0.8p+1])) -1 (nil)
> (nil))
> complex-2.c:8: internal compiler error: in extract_insn, at recog.c:2188
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>
> On H8, a floating point constant is not put into the immediate field
> of an assembly instruction. It is output using a constant pool. Is
> there any way you could look into this?
Certainly, I'd be glad to. Interestingly, x86 can't put a floating
point constant into an immediate field of an assembly instruction
either, and mainline CVS (with this patch) places the value in the
constant pool on i686.
I'm happy to track down the problem, but its as likely to be a H8
peculiarity as simply constant pool related. I'll let you know how
I get on.
Roger
--