------- Comment #14 from dje at watson dot ibm dot com  2006-07-13 20:36 -------
Subject: Re:  [4.1/4.2 Regression] returning constant double 

        What, exactly, is your testcase foo.c?  The example at the top of
PR 28287?

$ cat foo.c
double f (void) { return 0; }
$ ./xgcc -B./ -O2 -S foo.c
$ ./xgcc -B./ -v
Reading specs from ./specs
Target: powerpc-unknown-linux-gnuspe
Configured with: /farm/dje/src/src/configure
--target=powerpc-unknown-linux-gnuspe --enable-e500_double --enable-languages=c
Thread model: posix
gcc version 4.2.0 20060713 (experimental)
$ cat foo.s
        .file   "foo.c"
        .section        ".text"
        .align 2
        .globl f
        .type   f, @function
f:
        lis 9,[EMAIL PROTECTED]
        la 9,[EMAIL PROTECTED](9)
        lwz 3,0(9)
        lwz 4,4(9)
        blr
        .size   f, .-f
        .section        .rodata
        .align 3
        .set    .LANCHOR0,. + 0
.LC0:
        .4byte  0
        .4byte  0
        .ident  "GCC: (GNU) 4.2.0 20060713 (experimental)"
        .section        .note.GNU-stack,"",@progbits
$ cd ...src...
$ svn diff spe.md
Index: spe.md
===================================================================
--- spe.md      (revision 115408)
+++ spe.md      (working copy)
@@ -2211,11 +2211,13 @@
   [(set_attr "length" "8")])

 (define_insn "*frob_di_df_2"
-  [(set (subreg:DF (match_operand:DI 0 "register_operand" "=&r") 0)
-       (match_operand:DF 1 "register_operand" "r"))]
+  [(set (subreg:DF (match_operand:DI 0 "register_operand" "=&r,r") 0)
+       (match_operand:DF 1 "input_operand" "r,m"))]
   "TARGET_E500_DOUBLE"
-  "evmergehi %H0,%1,%1\;evmergelo %L0,%1,%1"
-  [(set_attr "length" "8")])
+  "@
+   evmergehi %H0,%1,%1\;evmergelo %L0,%1,%1
+   evldd%X1 %0,%y1"
+  [(set_attr "length" "8,*")])

 (define_insn "*mov_sidf_e500_subreg0"
   [(set (subreg:SI (match_operand:DF 0 "register_operand" "+r") 0)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27287

Reply via email to