aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-05-29 13:16:50 -0700
committerRichard Henderson <rth@gcc.gnu.org>2002-05-29 13:16:50 -0700
commitedfe859577f8230c1dc6ff13fcbcf5f93bdbcf14 (patch)
treecb863937e443f5f06e1bffa50640dafe68ebb667
parentcd7714ee966820cc0a1fc78d54ae96d4bb47b515 (diff)
downloadgcc-edfe859577f8230c1dc6ff13fcbcf5f93bdbcf14.zip
gcc-edfe859577f8230c1dc6ff13fcbcf5f93bdbcf14.tar.gz
gcc-edfe859577f8230c1dc6ff13fcbcf5f93bdbcf14.tar.bz2
i386.c (output_pic_addr_const): Lowercase rip.
* config/i386/i386.c (output_pic_addr_const): Lowercase rip. (print_operand_address): Only add rip for symbolic addresses for which we do not have another relocation type. From-SVN: r54017
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.c10
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c7942cf..a761931 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2002-05-29 Richard Henderson <rth@redhat.com>
+
+ * config/i386/i386.c (output_pic_addr_const): Lowercase rip.
+ (print_operand_address): Only add rip for symbolic addresses
+ for which we do not have another relocation type.
+
2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
* config/m68k/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7e98741..5170c99 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -5826,7 +5826,7 @@ output_pic_addr_const (file, x, code)
fputs ("@GOTOFF", file);
break;
case UNSPEC_GOTPCREL:
- fputs ("@GOTPCREL(%RIP)", file);
+ fputs ("@GOTPCREL(%rip)", file);
break;
case UNSPEC_GOTTPOFF:
fputs ("@GOTTPOFF", file);
@@ -6619,7 +6619,13 @@ print_operand_address (file, addr)
output_addr_const (file, addr);
/* Use one byte shorter RIP relative addressing for 64bit mode. */
- if (GET_CODE (disp) != CONST_INT && TARGET_64BIT)
+ if (TARGET_64BIT
+ && (GET_CODE (addr) == SYMBOL_REF
+ || GET_CODE (addr) == LABEL_REF
+ || (GET_CODE (addr) == CONST
+ && GET_CODE (XEXP (addr, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (addr, 0), 0)) == SYMBOL_REF
+ && GET_CODE (XEXP (XEXP (addr, 0), 1)) == CONST_INT)))
fputs ("(%rip)", file);
}
else