+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.
fputs ("@GOTOFF", file);
break;
case UNSPEC_GOTPCREL:
- fputs ("@GOTPCREL(%RIP)", file);
+ fputs ("@GOTPCREL(%rip)", file);
break;
case UNSPEC_GOTTPOFF:
fputs ("@GOTTPOFF", file);
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