1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
llvm-mirror/test/MC/X86/x86_64-signed-reloc.s
David Woodhouse 10eb2a8985 [x86] Fix signed relocations for i64i32imm operands
These should end up (in ELF) as R_X86_64_32S relocs, not R_X86_64_32.
Kill the horrid and incomplete special case and FIXME in
EncodeInstruction() and set things up so it can infer the signedness
from the ImmType just like it can the size and whether it's PC-relative.

llvm-svn: 200495
2014-01-30 22:20:41 +00:00

17 lines
585 B
ArmAsm

// RUN: llvm-mc -triple x86_64-linux-gnu -filetype=obj %s | llvm-readobj -r | FileCheck %s
// CHECK: Relocations [
// CHECK-NEXT: Section ({{[0-9]+}}) .rela.text {
pushq $foo // CHECK-NEXT: R_X86_64_32S
addq $foo, %rax // CHECK-NEXT: R_X86_64_32S
andq $foo, %rax // CHECK-NEXT: R_X86_64_32S
movq $foo, %rax // CHECK-NEXT: R_X86_64_32S
bextr $foo, (%edi), %eax // CHECK-NEXT: R_X86_64_32
bextr $foo, (%rdi), %rax // CHECK-NEXT: R_X86_64_32S
imul $foo, %rax // CHECK-NEXT: R_X86_64_32S
// CHECK-NEXT: }
// CHECK-NEXT: ]