Hello!

IMO, we should introduce mode checks here, but the patch below returns
to the functionality as it was before my cleanup.

2015-05-25  Uros Bizjak  <ubiz...@gmail.com>

    PR target/66274
    * config/i386/i386.c (print_reg): Only print "r" for TARGET_64BIT
    when LEGACY_INT_REGNO_P is processed.

testsuite/ChangeLog:

2015-05-25  Uros Bizjak  <ubiz...@gmail.com>

    PR target/66274
    * gcc.target/i386/pr66274.c: New test.

Tested on x86_64-linux-gnu {,-m32} and committed to mainline SVN.

Uros.
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c  (revision 223645)
+++ config/i386/i386.c  (working copy)
@@ -15229,7 +15229,7 @@ print_reg (rtx x, int code, FILE *file)
     case 8:
     case 4:
       if (LEGACY_INT_REGNO_P (regno))
-       putc (msize == 8 ? 'r' : 'e', file);
+       putc (msize == 8 && TARGET_64BIT ? 'r' : 'e', file);
     case 16:
     case 12:
     case 2:
Index: testsuite/gcc.target/i386/pr66274.c
===================================================================
--- testsuite/gcc.target/i386/pr66274.c (revision 0)
+++ testsuite/gcc.target/i386/pr66274.c (working copy)
@@ -0,0 +1,9 @@
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O" } */
+
+void f()
+{
+  asm ("push %0" : : "r" ((unsigned long long) 456));
+}
+
+/* { dg-final { scan-assembler-not "push %r" } } */

Reply via email to