This is the mail archive of the gcc-patches@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]

fix 20650


This backs out an accidental change I made with the previous patch.

I'm actually surprised to find that it had an effect, I could never
get it to do anything when I was testing with TARGET_PPC_GFXOPT set.

Bootstrapped & tested on powerpc-darwin8.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/gcc-notstfiwx.patch=======================
2005-04-02  Geoffrey Keating  <geoffk@apple.com>

	PR 20650
	* config/rs6000/rs6000.md (fix_truncdfsi2): Make destination
	a register.

Index: testsuite/ChangeLog
2005-04-02  Geoffrey Keating  <geoffk@apple.com>

	* gcc.dg/rs6000-fpint.c: New.

Index: config/rs6000/rs6000.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.358
diff -u -p -u -p -r1.358 rs6000.md
--- config/rs6000/rs6000.md	31 Mar 2005 11:34:16 -0000	1.358
+++ config/rs6000/rs6000.md	2 Apr 2005 09:52:48 -0000
@@ -5272,8 +5272,10 @@
   DONE;
 }")
 
+; In the TARGET_PPC_GFXOPT case, this could and probably should
+; take a memory destination; but actually making this work is hard.
 (define_expand "fix_truncdfsi2"
-  [(parallel [(set (match_operand:SI 0 "reg_or_mem_operand" "")
+  [(parallel [(set (match_operand:SI 0 "gpc_reg_operand" "")
 		   (fix:SI (match_operand:DF 1 "gpc_reg_operand" "")))
 	      (clobber (match_dup 2))
 	      (clobber (match_dup 3))])]
Index: testsuite/gcc.dg/rs6000-fpint.c
===================================================================
RCS file: testsuite/gcc.dg/rs6000-fpint.c
diff -N testsuite/gcc.dg/rs6000-fpint.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.dg/rs6000-fpint.c	2 Apr 2005 09:52:48 -0000
@@ -0,0 +1,11 @@
+/* { dg-do compile { target powerpc*-*-* rs6000-*-* } } */
+/* { dg-options "-mno-powerpc-gfxopt" } */
+/* { dg-final { scan-assembler-not "stfiwx" } } */
+
+/* A basic test of the old-style (not stfiwx) fp -> int conversion.  */
+int f(double a, double b)
+{
+  int a1 = a;
+  int b1 = b;
+  return a1+b1;
+}
============================================================


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