mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Relax GOTPCREL relocations for tail jmp instructions.
Differential Revision: https://reviews.llvm.org/D47563 llvm-svn: 333676
This commit is contained in:
parent
0a4a2bec12
commit
7966bd56fe
@ -399,6 +399,7 @@ void X86MCCodeEmitter::emitMemModRMByte(const MCInst &MI, unsigned Op,
|
||||
return X86::reloc_riprel_4byte_movq_load;
|
||||
case X86::CALL64m:
|
||||
case X86::JMP64m:
|
||||
case X86::TAILJMPm64:
|
||||
case X86::TEST64mr:
|
||||
case X86::ADC64rm:
|
||||
case X86::ADD64rm:
|
||||
|
15
test/CodeGen/X86/tailjmp_gotpcrel_relax_relocation.ll
Normal file
15
test/CodeGen/X86/tailjmp_gotpcrel_relax_relocation.ll
Normal file
@ -0,0 +1,15 @@
|
||||
; RUN: llc -filetype=obj -relax-elf-relocations=true -mtriple=x86_64-linux-gnu -o - %s | llvm-objdump - -d -r | FileCheck %s
|
||||
|
||||
; CHECK: jmpq *(%rip)
|
||||
; CHECK-NEXT: R_X86_64_GOTPCRELX
|
||||
|
||||
define i32 @main() {
|
||||
entry:
|
||||
%call = tail call i32 @foo()
|
||||
ret i32 %call
|
||||
}
|
||||
|
||||
; Function Attrs: nonlazybind
|
||||
declare i32 @foo() #1
|
||||
|
||||
attributes #1 = { nonlazybind }
|
Loading…
Reference in New Issue
Block a user