diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a58e245ada70..c30a64343981 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-05-25 Uros Bizjak + + PR target/66274 + * config/i386/i386.c (print_reg): Only print "r" for TARGET_64BIT + when LEGACY_INT_REGNO_P is processed. + 2015-05-25 Alexander Monakov * config/i386/i386.c (ix86_function_ok_for_sibcall): Check flag_plt. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 99322b42ac32..e77cd0448bfe 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -15230,7 +15230,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: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2d8cd01f8a6e..91fd4c55b69a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-05-25 Uros Bizjak + + PR target/66274 + * gcc.target/i386/pr66274.c: New test. + 2015-05-25 Eric Botcazou * gnat.dg/renaming6.ad[sb]: New test. diff --git a/gcc/testsuite/gcc.target/i386/pr66274.c b/gcc/testsuite/gcc.target/i386/pr66274.c new file mode 100644 index 000000000000..59969eb9037d --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr66274.c @@ -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" } } */