ppc64 floating point usage [was Re: PPC64 Compiler bug !!]

Alan Modra amodra@bigpond.net.au
Sun Aug 10 06:43:00 GMT 2003


Admittedly this is fairly contrived..

cat >fpcount.c <<EOF
void f (double x, char *p)
{
  long i, c;
  for (i = 0; i < 3; i++)
    asm volatile ("fcfid %0,%1" : "=f" (c) : "f" (x));

  while (--c)
    *p++ = 0;
}
EOF
powerpc64-linux-gcc -O2 -S fpcount.c

fpcount.c:9: error: unable to generate reloads for:
(jump_insn:HI 79 30 97 2 (parallel [
            (set (pc)
                (if_then_else (eq (reg/v:DI 32 f0 [orig:120 c ] [120])
                        (const_int 1 [0x1]))
                    (label_ref 80)
                    (pc)))
            (set (reg/v:DI 32 f0 [orig:120 c ] [120])
                (plus:DI (reg/v:DI 32 f0 [orig:120 c ] [120])
                    (const_int -1 [0xffffffffffffffff])))
            (clobber (scratch:CC))
            (clobber (scratch:DI))
        ]) 565 {*ctrdi_internal5} (insn_list:REG_DEP_ANTI 30 (nil))
    (expr_list:REG_UNUSED (scratch:CC)
        (expr_list:REG_UNUSED (scratch:DI)
            (expr_list:REG_BR_PROB (const_int 3600 [0xe10])
                (nil)))))
fpcount.c:12: internal compiler error: in find_reloads, at reload.c:3647

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Gcc-patches mailing list