OSDN Git Service

Backport from mainline:
authortejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Dec 2011 15:44:14 +0000 (15:44 +0000)
committertejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Dec 2011 15:44:14 +0000 (15:44 +0000)
        2011-08-05  Uros Bizjak  <ubizjak@gmail.com>

        * config/i386/i386.md (*movdi_internal_rex64): Use "!o" constraint
        instead of "!m" for operand 0, alternative 4.
        (*movdf_internal_rex64): Ditto for operand 0, alernative 6.

        * gcc.target/i386/movdi-rex64.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182120 138bc75d-0d04-0410-961f-82ee72b054a4

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

index fdb878f..f5ebe75 100644 (file)
@@ -1,3 +1,13 @@
+2011-12-08  Teresa Johnson  <tejohnson@google.com>
+
+       Backport from mainline:
+
+       2011-08-05  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.md (*movdi_internal_rex64): Use "!o" constraint
+       instead of "!m" for operand 0, alternative 4.
+       (*movdf_internal_rex64): Ditto for operand 0, alernative 6.
+
 2011-12-08  Jakub Jelinek  <jakub@redhat.com>
 
        Backport from mainline
index f25a97b..b1d7e5e 100644 (file)
 
 (define_insn "*movdi_internal_rex64"
   [(set (match_operand:DI 0 "nonimmediate_operand"
-         "=r,r  ,r,m ,!m,*y,*y,?r ,m ,?*Ym,?*y,*x,*x,?r ,m,?*Yi,*x,?*x,?*Ym")
+         "=r,r  ,r,m ,!o,*y,*y,?r ,m ,?*Ym,?*y,*x,*x,?r ,m,?*Yi,*x,?*x,?*Ym")
        (match_operand:DI 1 "general_operand"
          "Z ,rem,i,re,n ,C ,*y,*Ym,*y,r   ,m  ,C ,*x,*Yi,*x,r  ,m ,*Ym,*x"))]
   "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
 
 (define_insn "*movdf_internal_rex64"
   [(set (match_operand:DF 0 "nonimmediate_operand"
-               "=f,m,f,r ,m,!r,!m,Y2*x,Y2*x,Y2*x,m   ,Yi,r ")
+               "=f,m,f,r ,m,!r,!o,Y2*x,Y2*x,Y2*x,m   ,Yi,r ")
        (match_operand:DF 1 "general_operand"
                "fm,f,G,rm,r,F ,F ,C   ,Y2*x,m   ,Y2*x,r ,Yi"))]
   "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1]))
index 6d21fb1..9f4e125 100644 (file)
@@ -1,3 +1,7 @@
+2011-12-08  Teresa Johnson  <tejohnson@google.com>
+
+       * gcc.target/i386/movdi-rex64.c: New.
+
 2011-12-08  Jakub Jelinek  <jakub@redhat.com>
 
        Backport from mainline
diff --git a/gcc/testsuite/gcc.target/i386/movdi-rex64.c b/gcc/testsuite/gcc.target/i386/movdi-rex64.c
new file mode 100644 (file)
index 0000000..36208ff
--- /dev/null
@@ -0,0 +1,12 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-fPIE -Wwrite-strings" } */
+
+char *strcpy (char *dest, const char *src);
+
+static __thread char buffer[25];
+const char * error_message (void)
+{
+oops:
+    strcpy (buffer, "Unknown code ");
+    return 0;
+}