]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.h (ASM_OUTPUT_REG_PUSH, [...]): Handle TARGET_64BIT.
authorJakub Jelinek <jakub@redhat.com>
Mon, 14 Oct 2002 21:24:25 +0000 (23:24 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 14 Oct 2002 21:24:25 +0000 (23:24 +0200)
* config/i386/i386.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP):
Handle TARGET_64BIT.

* gcc.dg/20021014-1.c: New test.

From-SVN: r58138

gcc/ChangeLog
gcc/config/i386/i386.h
gcc/testsuite/ChangeLog

index aaa3abfb40e716ed79e25c0d38edb358f4e58f96..7f6c7fb2a1c937204df82cef532180e70958b8a3 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-14  Jakub Jelinek  <jakub@redhat.com>
+
+       * config/i386/i386.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP):
+       Handle TARGET_64BIT.
+
 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
 
        PR optimization/6631
index 58d2c4331eae2335c6fec004ec6a8e0ee33b9bf3..8fd2e6539d542fb6f0eae311abe3f21a208ec5d2 100644 (file)
@@ -2878,13 +2878,25 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER];
    It need not be very fast code.  */
 
 #define ASM_OUTPUT_REG_PUSH(FILE, REGNO)  \
-  asm_fprintf ((FILE), "\tpush{l}\t%%e%s\n", reg_names[(REGNO)])
+do {                                                                   \
+  if (TARGET_64BIT)                                                    \
+    asm_fprintf ((FILE), "\tpush{q}\t%%r%s\n",                         \
+                reg_names[(REGNO)] + (REX_INT_REGNO_P (REGNO) != 0));  \
+  else                                                                 \
+    asm_fprintf ((FILE), "\tpush{l}\t%%e%s\n", reg_names[(REGNO)]);    \
+} while (0)
 
 /* This is how to output an insn to pop a register from the stack.
    It need not be very fast code.  */
 
 #define ASM_OUTPUT_REG_POP(FILE, REGNO)  \
-  asm_fprintf ((FILE), "\tpop{l}\t%%e%s\n", reg_names[(REGNO)])
+do {                                                                   \
+  if (TARGET_64BIT)                                                    \
+    asm_fprintf ((FILE), "\tpop{q}\t%%r%s\n",                          \
+                reg_names[(REGNO)] + (REX_INT_REGNO_P (REGNO) != 0));  \
+  else                                                                 \
+    asm_fprintf ((FILE), "\tpop{l}\t%%e%s\n", reg_names[(REGNO)]);     \
+} while (0)
 
 /* This is how to output an element of a case-vector that is absolute.  */
 
index d0d2b431d54256559f5413991b90afd4abc6ee2e..14653d32cdebceb7e4fe37dfef505447b89f0999 100644 (file)
@@ -1,3 +1,7 @@
+2002-10-14  Jakub Jelinek  <jakub@redhat.com>
+
+       * gcc.dg/20021014-1.c: New test.
+
 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
 
        PR optimization/6631