OSDN Git Service

Add clobber CC register to sse_prologue_save patterns.
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 May 2010 18:51:29 +0000 (18:51 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 May 2010 18:51:29 +0000 (18:51 +0000)
gcc/

2010-05-04  H.J. Lu  <hongjiu.lu@intel.com>

PR target/43799
* config/i386/i386.md (sse_prologue_save): Add clobber CC
register.
(*sse_prologue_save_insn1): Likewise.
(SSE prologue save splitter): Likewise.

gcc/testsuite/

2010-05-04  H.J. Lu  <hongjiu.lu@intel.com>

PR target/43799
* gcc.target/i386/pr43799.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159040 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr43799.c [new file with mode: 0644]

index 72671c8..6179743 100644 (file)
@@ -1,3 +1,11 @@
+2010-05-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/43799
+       * config/i386/i386.md (sse_prologue_save): Add clobber CC
+       register.
+       (*sse_prologue_save_insn1): Likewise.
+       (SSE prologue save splitter): Likewise.
+
 2010-05-04  Eric Botcazou  <ebotcazou@adacore.com>
 
        * tree.c (free_lang_data_in_one_sizepos): New inline function.
index 8249efd..86351e1 100644 (file)
                                (reg:DI XMM5_REG)
                                (reg:DI XMM6_REG)
                                (reg:DI XMM7_REG)] UNSPEC_SSE_PROLOGUE_SAVE))
+             (clobber (reg:CC FLAGS_REG))
              (clobber (match_operand:DI 1 "register_operand" ""))
              (use (match_operand:DI 2 "immediate_operand" ""))
              (use (label_ref:DI (match_operand 3 "" "")))
                     (reg:DI XMM5_REG)
                     (reg:DI XMM6_REG)
                     (reg:DI XMM7_REG)] UNSPEC_SSE_PROLOGUE_SAVE))
+   (clobber (reg:CC FLAGS_REG))
    (clobber (match_operand:DI 1 "register_operand" "=r"))
    (use (match_operand:DI 2 "const_int_operand" "i"))
    (use (label_ref:DI (match_operand 3 "" "X")))
                                 (reg:DI XMM5_REG)
                                 (reg:DI XMM6_REG)
                                 (reg:DI XMM7_REG)] UNSPEC_SSE_PROLOGUE_SAVE))
+              (clobber (reg:CC FLAGS_REG))
               (clobber (match_operand:DI 1 "register_operand" ""))
               (use (match_operand:DI 2 "const_int_operand" ""))
               (use (match_operand 3 "" ""))
index 1ad5bc0..737a9f1 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/43799
+       * gcc.target/i386/pr43799.c: New.
+
 2010-05-04  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gnat.dg/lto1.adb: New test.
diff --git a/gcc/testsuite/gcc.target/i386/pr43799.c b/gcc/testsuite/gcc.target/i386/pr43799.c
new file mode 100644 (file)
index 0000000..de9022d
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+/* { dg-options "-O -fschedule-insns" } */
+
+int f4 (int i, ...)
+{
+  int y = 0;
+   __builtin_va_list ap;
+   __builtin_va_start(ap, i);
+   if (i == 5) y = __builtin_va_arg(ap, double);
+   __builtin_va_end(ap);
+   return y;
+}
+
+int main (void)
+{
+  if (f4 (5, 7.0) != 7)
+    __builtin_abort ();
+  return 0;
+}