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
This commit is contained in:
Richard Henderson 2002-05-29 13:16:50 -07:00 committed by Richard Henderson
parent cd7714ee96
commit edfe859577
2 changed files with 14 additions and 2 deletions

View File

@ -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.

View File

@ -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