diff --git a/lld/test/COFF/delayimports32.test b/lld/test/COFF/delayimports32.test --- a/lld/test/COFF/delayimports32.test +++ b/lld/test/COFF/delayimports32.test @@ -72,14 +72,14 @@ BASEREL-NEXT: ] DISASM: 1029: b8 20 30 40 00 movl $4206624, %eax -DISASM-NEXT: 102e: e9 0a 00 00 00 jmp 10 <.text+0x3d> +DISASM-NEXT: 102e: e9 0a 00 00 00 jmp 0x401038 <.text+0x3d> DISASM-NEXT: 1033: b8 24 30 40 00 movl $4206628, %eax -DISASM-NEXT: 1038: e9 00 00 00 00 jmp 0 <.text+0x3d> +DISASM-NEXT: 1038: e9 00 00 00 00 jmp 0x401038 <.text+0x3d> DISASM-NEXT: 103d: 51 pushl %ecx DISASM-NEXT: 103e: 52 pushl %edx DISASM-NEXT: 103f: 50 pushl %eax DISASM-NEXT: 1040: 68 00 20 40 00 pushl $4202496 -DISASM-NEXT: 1045: e8 b6 ff ff ff calll -74 <.text> +DISASM-NEXT: 1045: e8 b6 ff ff ff calll 0x400ffb <.text> DISASM-NEXT: 104a: 5a popl %edx DISASM-NEXT: 104b: 59 popl %ecx DISASM-NEXT: 104c: ff e0 jmpl *%eax diff --git a/lld/test/COFF/imports.test b/lld/test/COFF/imports.test --- a/lld/test/COFF/imports.test +++ b/lld/test/COFF/imports.test @@ -19,10 +19,10 @@ TEXT-NEXT: leaq 8180(%rip), %rdx TEXT-NEXT: leaq 8167(%rip), %r8 TEXT-NEXT: movl $0, %r9d -TEXT-NEXT: callq 60 +TEXT-NEXT: callq 0x14000105b TEXT-NEXT: movl $0, %ecx -TEXT-NEXT: callq 18 -TEXT-NEXT: callq 29 +TEXT-NEXT: callq 0x14000103b +TEXT-NEXT: callq 0x14000104b TEXT: jmpq *4098(%rip) TEXT: jmpq *4090(%rip) TEXT: jmpq *4082(%rip) diff --git a/lld/test/COFF/lto-comdat.ll b/lld/test/COFF/lto-comdat.ll --- a/lld/test/COFF/lto-comdat.ll +++ b/lld/test/COFF/lto-comdat.ll @@ -52,9 +52,9 @@ ; TEXT-01-EMPTY: ; TEXT-01-NEXT: <.text>: ; TEXT-01-NEXT: subq $40, %rsp -; TEXT-01-NEXT: callq 23 -; TEXT-01-NEXT: callq 18 -; TEXT-01-NEXT: callq 13 +; TEXT-01-NEXT: callq 0x14000101b +; TEXT-01-NEXT: callq 0x14000101b +; TEXT-01-NEXT: callq 0x14000101b ; TEXT-01-NEXT: xorl %eax, %eax ; TEXT-01-NEXT: addq $40, %rsp ; TEXT-01: retq @@ -70,20 +70,20 @@ ; TEXT-10-EMPTY: ; TEXT-10-NEXT: <.text>: ; TEXT-10-NEXT: subq $40, %rsp -; TEXT-10-NEXT: callq 55 +; TEXT-10-NEXT: callq 0x14000103b ; TEXT-10-NEXT: nop ; TEXT-10-NEXT: addq $40, %rsp ; TEXT-10-NEXT: retq ; TEXT-10-NEXT: int3 ; TEXT-10-NEXT: subq $40, %rsp -; TEXT-10-NEXT: callq 39 +; TEXT-10-NEXT: callq 0x14000103b ; TEXT-10-NEXT: nop ; TEXT-10-NEXT: addq $40, %rsp ; TEXT-10-NEXT: retq ; TEXT-10-NEXT: int3 ; TEXT-10-NEXT: subq $40, %rsp -; TEXT-10-NEXT: callq -41 -; TEXT-10-NEXT: callq -30 +; TEXT-10-NEXT: callq 0x140000ffb +; TEXT-10-NEXT: callq 0x14000100b ; TEXT-10-NEXT: xorl %eax, %eax ; TEXT-10-NEXT: addq $40, %rsp ; TEXT-10-NEXT: retq diff --git a/lld/test/COFF/lto.ll b/lld/test/COFF/lto.ll --- a/lld/test/COFF/lto.ll +++ b/lld/test/COFF/lto.ll @@ -59,7 +59,7 @@ ; TEXT-01-EMPTY: ; TEXT-01-NEXT: <.text>: ; TEXT-01-NEXT: subq $40, %rsp -; TEXT-01-NEXT: callq 23 +; TEXT-01-NEXT: callq 0x14000101b ; TEXT-01-NEXT: xorl %eax, %eax ; TEXT-01-NEXT: addq $40, %rsp ; TEXT-01-NEXT: retq @@ -118,7 +118,7 @@ ; TEXT-10-NEXT: int3 ; TEXT-10-NEXT: int3 ; TEXT-10-NEXT: subq $40, %rsp -; TEXT-10-NEXT: callq -41 +; TEXT-10-NEXT: callq 0x140000ffb ; TEXT-10-NEXT: xorl %eax, %eax ; TEXT-10-NEXT: addq $40, %rsp ; TEXT-10-NEXT: retq diff --git a/lld/test/ELF/comdat.s b/lld/test/ELF/comdat.s --- a/lld/test/ELF/comdat.s +++ b/lld/test/ELF/comdat.s @@ -31,7 +31,7 @@ // CHECK-EMPTY: // CHECK-NEXT: : // 0x1234 - 0x1235 - 5 = -6 -// CHECK-NEXT: 1235: {{.*}} callq -6 +// CHECK-NEXT: 1235: {{.*}} callq 0x122f .section .text3,"axG",@progbits,zed,comdat,unique,0 diff --git a/lld/test/ELF/gnu-ifunc-i386.s b/lld/test/ELF/gnu-ifunc-i386.s --- a/lld/test/ELF/gnu-ifunc-i386.s +++ b/lld/test/ELF/gnu-ifunc-i386.s @@ -113,8 +113,8 @@ // DISASM: : // DISASM-NEXT: 4010e5: retl // DISASM: <_start>: -// DISASM-NEXT: 4010e6: calll 21 -// DISASM-NEXT: calll 32 +// DISASM-NEXT: 4010e6: calll 0x4010fb +// DISASM-NEXT: calll 0x40110b // DISASM-NEXT: movl $4194516, %edx // DISASM-NEXT: movl $4194532, %edx // DISASM-EMPTY: @@ -123,11 +123,11 @@ // DISASM-NEXT: : // DISASM-NEXT: 401100: jmpl *4202784 // DISASM-NEXT: pushl $0 -// DISASM-NEXT: jmp -4198672 +// DISASM-NEXT: jmp 0xfffffffb // DISASM: : // DISASM-NEXT: 401110: jmpl *4202788 // DISASM-NEXT: pushl $8 -// DISASM-NEXT: jmp -4198688 +// DISASM-NEXT: jmp 0xfffffffb .text .type foo STT_GNU_IFUNC diff --git a/lld/test/ELF/gnu-ifunc-noplt-i386.s b/lld/test/ELF/gnu-ifunc-noplt-i386.s --- a/lld/test/ELF/gnu-ifunc-noplt-i386.s +++ b/lld/test/ELF/gnu-ifunc-noplt-i386.s @@ -27,10 +27,10 @@ // DISASM-NEXT: retl // DISASM-EMPTY: // DISASM-NEXT: 004011ee <_start>: -// DISASM-NEXT: calll -0x4 <_start+0x1> -// DISASM-NEXT: calll -0x4 <_start+0x6> -// DISASM-NEXT: calll 0x23 -// DISASM-NEXT: calll 0x2e +// DISASM-NEXT: calll 0x4011ea <_start+0x1> +// DISASM-NEXT: calll 0x4011ef <_start+0x6> +// DISASM-NEXT: calll 0x40121b +// DISASM-NEXT: calll 0x40122b // DISASM-EMPTY: // DISASM-NEXT: Disassembly of section .plt: // DISASM-EMPTY: @@ -45,12 +45,12 @@ // DISASM-NEXT: 00401220 : // DISASM-NEXT: jmpl *0x4032d4 // DISASM-NEXT: pushl $0x0 -// DISASM-NEXT: jmp -0x20 <.plt> +// DISASM-NEXT: jmp 0x40120b <.plt> // DISASM-EMPTY: // DISASM-NEXT: 00401230 : // DISASM-NEXT: jmpl *0x4032d8 // DISASM-NEXT: pushl $0x8 -// DISASM-NEXT: jmp -0x30 <.plt> +// DISASM-NEXT: jmp 0x40120b <.plt> .text .type foo STT_GNU_IFUNC diff --git a/lld/test/ELF/gnu-ifunc-noplt.s b/lld/test/ELF/gnu-ifunc-noplt.s --- a/lld/test/ELF/gnu-ifunc-noplt.s +++ b/lld/test/ELF/gnu-ifunc-noplt.s @@ -30,10 +30,10 @@ // DISASM-NEXT: 201321: retq // DISASM-EMPTY: // DISASM-NEXT: 0000000000201322 <_start>: -// DISASM-NEXT: 201322: callq 0 <_start+0x5> -// DISASM-NEXT: 201327: callq 0 <_start+0xa> -// DISASM-NEXT: 20132c: callq 31 -// DISASM-NEXT: 201331: callq 42 +// DISASM-NEXT: 201322: callq 0x201322 <_start+0x5> +// DISASM-NEXT: 201327: callq 0x201327 <_start+0xa> +// DISASM-NEXT: 20132c: callq 0x20134b +// DISASM-NEXT: 201331: callq 0x20135b // DISASM-EMPTY: // DISASM-NEXT: Disassembly of section .plt: // DISASM-EMPTY: @@ -45,12 +45,12 @@ // DISASM-NEXT: 0000000000201350 : // DISASM-NEXT: 201350: jmpq *8514(%rip) // DISASM-NEXT: 201356: pushq $0 -// DISASM-NEXT: 20135b: jmp -32 <.plt> +// DISASM-NEXT: 20135b: jmp 0x20133b <.plt> // DISASM-EMPTY: // DISASM-NEXT: 0000000000201360 : // DISASM-NEXT: 201360: jmpq *8506(%rip) // DISASM-NEXT: 201366: pushq $1 -// DISASM-NEXT: 20136b: jmp -48 <.plt> +// DISASM-NEXT: 20136b: jmp 0x20133b <.plt> .text .type foo STT_GNU_IFUNC diff --git a/lld/test/ELF/gnu-ifunc-plt-i386.s b/lld/test/ELF/gnu-ifunc-plt-i386.s --- a/lld/test/ELF/gnu-ifunc-plt-i386.s +++ b/lld/test/ELF/gnu-ifunc-plt-i386.s @@ -37,10 +37,10 @@ // DISASM: : // DISASM-NEXT: 4011b5: retl // DISASM: <_start>: -// DISASM-NEXT: 4011b6: calll 69 -// DISASM-NEXT: calll 80 -// DISASM-NEXT: calll 27 -// DISASM-NEXT: calll 38 +// DISASM-NEXT: 4011b6: calll 0x4011fb +// DISASM-NEXT: calll 0x40120b +// DISASM-NEXT: calll 0x4011db +// DISASM-NEXT: calll 0x4011eb // DISASM-EMPTY: // DISASM-NEXT: Disassembly of section .plt: // DISASM-EMPTY: @@ -55,22 +55,22 @@ // DISASM-NEXT: : // DISASM-NEXT: 4011e0: jmpl *4207268 // DISASM-NEXT: pushl $0 -// DISASM-NEXT: jmp -32 <.plt> +// DISASM-NEXT: jmp 0x4011cb <.plt> // DISASM-EMPTY: // DISASM-NEXT: : // DISASM-NEXT: 4011f0: jmpl *4207272 // DISASM-NEXT: pushl $8 -// DISASM-NEXT: jmp -48 <.plt> +// DISASM-NEXT: jmp 0x4011cb <.plt> // DISASM-EMPTY: // DISASM-NEXT: Disassembly of section .iplt: // DISASM-EMPTY: // DISASM-NEXT: <.iplt>: // DISASM-NEXT: jmpl *4207276 // DISASM-NEXT: pushl $0 -// DISASM-NEXT: jmp -64 <.plt> +// DISASM-NEXT: jmp 0x4011cb <.plt> // DISASM-NEXT: jmpl *4207280 // DISASM-NEXT: pushl $8 -// DISASM-NEXT: jmp -80 <.plt> +// DISASM-NEXT: jmp 0x4011cb <.plt> .text .type foo STT_GNU_IFUNC diff --git a/lld/test/ELF/gnu-ifunc-plt.s b/lld/test/ELF/gnu-ifunc-plt.s --- a/lld/test/ELF/gnu-ifunc-plt.s +++ b/lld/test/ELF/gnu-ifunc-plt.s @@ -41,8 +41,8 @@ // DISASM: : // DISASM-NEXT: 2012d9: retq // DISASM: <_start>: -// DISASM-NEXT: 2012da: callq 65 -// DISASM-NEXT: 2012df: callq 76 +// DISASM-NEXT: 2012da: callq 0x20131b +// DISASM-NEXT: 2012df: callq 0x20132b // DISASM-NEXT: callq {{.*}} // DISASM-NEXT: callq {{.*}} // DISASM-EMPTY: @@ -56,22 +56,22 @@ // DISASM-NEXT: : // DISASM-NEXT: 201300: jmpq *8514(%rip) // DISASM-NEXT: 201306: pushq $0 -// DISASM-NEXT: 20130b: jmp -32 <.plt> +// DISASM-NEXT: 20130b: jmp 0x2012eb <.plt> // DISASM-EMPTY: // DISASM-NEXT: : // DISASM-NEXT: 201310: jmpq *8506(%rip) // DISASM-NEXT: 201316: pushq $1 -// DISASM-NEXT: 20131b: jmp -48 <.plt> +// DISASM-NEXT: 20131b: jmp 0x2012eb <.plt> // DISASM-EMPTY: // DISASM-NEXT: Disassembly of section .iplt: // DISASM-EMPTY: // DISASM-NEXT: <.iplt>: // DISASM-NEXT: 201320: jmpq *8498(%rip) // DISASM-NEXT: 201326: pushq $0 -// DISASM-NEXT: 20132b: jmp -64 <.plt> +// DISASM-NEXT: 20132b: jmp 0x2012eb <.plt> // DISASM-NEXT: 201330: jmpq *8490(%rip) // DISASM-NEXT: 201336: pushq $1 -// DISASM-NEXT: 20133b: jmp -80 <.plt> +// DISASM-NEXT: 20133b: jmp 0x2012eb <.plt> .text .type foo STT_GNU_IFUNC diff --git a/lld/test/ELF/gnu-ifunc-shared.s b/lld/test/ELF/gnu-ifunc-shared.s --- a/lld/test/ELF/gnu-ifunc-shared.s +++ b/lld/test/ELF/gnu-ifunc-shared.s @@ -16,9 +16,9 @@ // DISASM: : // DISASM-NEXT: 1309: retq // DISASM: : -// DISASM-NEXT: 130a: callq 65 -// DISASM-NEXT: 130f: callq 28 -// DISASM-NEXT: 1314: callq 39 +// DISASM-NEXT: 130a: callq 0x134b +// DISASM-NEXT: 130f: callq 0x132b +// DISASM-NEXT: 1314: callq 0x133b // DISASM-NEXT: 1319: retq // DISASM: : // DISASM-NEXT: 131a: retq @@ -33,18 +33,18 @@ // DISASM-NEXT: : // DISASM-NEXT: 1330: jmpq *8482(%rip) // DISASM-NEXT: 1336: pushq $0 -// DISASM-NEXT: 133b: jmp -32 <.plt> +// DISASM-NEXT: 133b: jmp 0x131b <.plt> // DISASM-EMPTY: // DISASM-NEXT: : // DISASM-NEXT: 1340: jmpq *8474(%rip) // DISASM-NEXT: 1346: pushq $1 -// DISASM-NEXT: 134b: jmp -48 <.plt> +// DISASM-NEXT: 134b: jmp 0x131b <.plt> // DISASM: Disassembly of section .iplt: // DISASM-EMPTY: // DISASM: <.iplt>: // DISASM-NEXT: 1350: jmpq *8466(%rip) // DISASM-NEXT: 1356: pushq $0 -// DISASM-NEXT: 135b: jmp -64 <.plt> +// DISASM-NEXT: 135b: jmp 0x131b <.plt> // CHECK: Relocations [ // CHECK-NEXT: Section (5) .rela.dyn { diff --git a/lld/test/ELF/gnu-ifunc.s b/lld/test/ELF/gnu-ifunc.s --- a/lld/test/ELF/gnu-ifunc.s +++ b/lld/test/ELF/gnu-ifunc.s @@ -96,8 +96,8 @@ // DISASM: : // DISASM-NEXT: 201189: {{.*}} retq // DISASM: <_start>: -// DISASM-NEXT: 20118a: {{.*}} callq 33 -// DISASM-NEXT: 20118f: {{.*}} callq 44 +// DISASM-NEXT: 20118a: {{.*}} callq 0x2011ab +// DISASM-NEXT: 20118f: {{.*}} callq 0x2011bb // DISASM-NEXT: 201194: {{.*}} movl $2097496, %edx // DISASM-NEXT: 201199: {{.*}} movl $2097544, %edx // DISASM-NEXT: 20119e: {{.*}} movl $2097545, %edx @@ -107,10 +107,10 @@ // DISASM-NEXT: <.iplt>: // DISASM-NEXT: 2011b0: {{.*}} jmpq *4122(%rip) // DISASM-NEXT: 2011b6: {{.*}} pushq $0 -// DISASM-NEXT: 2011bb: {{.*}} jmp -2101696 +// DISASM-NEXT: 2011bb: {{.*}} jmp 0xfffffffffffffffb // DISASM-NEXT: 2011c0: {{.*}} jmpq *4114(%rip) // DISASM-NEXT: 2011c6: {{.*}} pushq $1 -// DISASM-NEXT: 2011cb: {{.*}} jmp -2101712 +// DISASM-NEXT: 2011cb: {{.*}} jmp 0xfffffffffffffffb .text .type foo STT_GNU_IFUNC diff --git a/lld/test/ELF/i386-feature-cet.s b/lld/test/ELF/i386-feature-cet.s --- a/lld/test/ELF/i386-feature-cet.s +++ b/lld/test/ELF/i386-feature-cet.s @@ -41,8 +41,8 @@ # DISASM: Disassembly of section .text: # DISASM: 00401200 : -# DISASM-NEXT: 401200: calll 0x2b -# DISASM-NEXT: 401205: calll 0x36 +# DISASM-NEXT: 401200: calll 0x40122b +# DISASM-NEXT: 401205: calll 0x40123b # DISASM-NEXT: retl # DISASM: Disassembly of section .plt: @@ -55,7 +55,7 @@ # DISASM-NEXT: nop # DISASM-NEXT: endbr32 # DISASM-NEXT: pushl $0x0 -# DISASM-NEXT: jmp -0x1e <.plt> +# DISASM-NEXT: jmp 0x40120b <.plt> # DISASM-NEXT: nop # DISASM: Disassembly of section .plt.sec: diff --git a/lld/test/ELF/i386-plt.s b/lld/test/ELF/i386-plt.s --- a/lld/test/ELF/i386-plt.s +++ b/lld/test/ELF/i386-plt.s @@ -52,10 +52,10 @@ // DISASM-NEXT: 4011bc: // DISASM-NEXT: 4011be: // DISASM: <_start>: -// DISASM-NEXT: 4011c0: jmp 0x2b -// DISASM-NEXT: 4011c5: jmp 0x26 -// DISASM-NEXT: 4011ca: jmp 0x31 -// DISASM-NEXT: 4011cf: jmp -0x18 +// DISASM-NEXT: 4011c0: jmp 0x4011eb +// DISASM-NEXT: 4011c5: jmp 0x4011eb +// DISASM-NEXT: 4011ca: jmp 0x4011fb +// DISASM-NEXT: 4011cf: jmp 0x4011b7 // DISASM: Disassembly of section .plt: // DISASM-EMPTY: @@ -72,13 +72,13 @@ /// .got.plt[3] = 0x403278 + 12 = 0x403284 // DISASM-NEXT: 4011f0: jmpl *0x403284 // DISASM-NEXT: pushl $0x0 -// DISASM-NEXT: jmp -0x20 <.plt> +// DISASM-NEXT: jmp 0x4011db <.plt> // DISASM-EMPTY: // DISASM-NEXT: : /// .got.plt[4] = 0x403278 + 16 = 0x403288 // DISASM-NEXT: 401200: jmpl *0x403288 // DISASM-NEXT: pushl $0x8 -// DISASM-NEXT: jmp -0x30 <.plt> +// DISASM-NEXT: jmp 0x4011db <.plt> // CHECKSHARED: Name: .plt // CHECKSHARED-NEXT: Type: SHT_PROGBITS @@ -122,10 +122,10 @@ // DISASMSHARED-NEXT: 11e0: // DISASMSHARED-NEXT: 11e2: // DISASMSHARED: <_start>: -// DISASMSHARED-NEXT: 11e4: jmp 39 -// DISASMSHARED-NEXT: jmp 34 -// DISASMSHARED-NEXT: jmp 45 -// DISASMSHARED-NEXT: jmp -24 +// DISASMSHARED-NEXT: 11e4: jmp 0x120b +// DISASMSHARED-NEXT: jmp 0x120b +// DISASMSHARED-NEXT: jmp 0x121b +// DISASMSHARED-NEXT: jmp 0x11db // DISASMSHARED-EMPTY: // DISASMSHARED-NEXT: Disassembly of section .plt: // DISASMSHARED-EMPTY: @@ -139,11 +139,11 @@ // DISASMSHARED: : // DISASMSHARED-NEXT: 1210: jmpl *12(%ebx) // DISASMSHARED-NEXT: pushl $0 -// DISASMSHARED-NEXT: jmp -32 <.plt> +// DISASMSHARED-NEXT: jmp 0x11fb <.plt> // DISASMSHARED: : // DISASMSHARED-NEXT: 1220: jmpl *16(%ebx) // DISASMSHARED-NEXT: pushl $8 -// DISASMSHARED-NEXT: jmp -48 <.plt> +// DISASMSHARED-NEXT: jmp 0x11fb <.plt> // DISASMPIE: Disassembly of section .plt: // DISASMPIE-EMPTY: @@ -158,12 +158,12 @@ // DISASMPIE-NEXT: : // DISASMPIE-NEXT: 11f0: jmpl *12(%ebx) // DISASMPIE-NEXT: pushl $0 -// DISASMPIE-NEXT: jmp -32 <.plt> +// DISASMPIE-NEXT: jmp 0x11db <.plt> // DISASMPIE-EMPTY: // DISASMPIE-NEXT: : // DISASMPIE-NEXT: 1200: jmpl *16(%ebx) // DISASMPIE-NEXT: pushl $8 -// DISASMPIE-NEXT: jmp -48 <.plt> +// DISASMPIE-NEXT: jmp 0x11db <.plt> local: .long 0 diff --git a/lld/test/ELF/i386-reloc-large-addend.s b/lld/test/ELF/i386-reloc-large-addend.s --- a/lld/test/ELF/i386-reloc-large-addend.s +++ b/lld/test/ELF/i386-reloc-large-addend.s @@ -10,7 +10,7 @@ // CHECK: Disassembly of section .text: // CHECK-EMPTY: // CHECK-NEXT: <_start>: -// CHECK-NEXT: 7000: e9 fe 1f jmp 8190 +// CHECK-NEXT: 7000: e9 fe 1f jmp 0x8ffe // 0x1 + 0x9000 - 0x7003 == 8190 .global _start _start: diff --git a/lld/test/ELF/i386-reloc-range.s b/lld/test/ELF/i386-reloc-range.s --- a/lld/test/ELF/i386-reloc-range.s +++ b/lld/test/ELF/i386-reloc-range.s @@ -12,7 +12,7 @@ // CHECK: Disassembly of section .text: // CHECK-EMPTY: // CHECK-NEXT: <_start>: -// CHECK-NEXT: 200: jmp -1 +// CHECK-NEXT: 200: jmp 0x1ff // 0x10202 - 0x203 == 0xffff // RUN: not ld.lld -Ttext 0x200 %t.o %t2.o -o /dev/null 2>&1 | FileCheck --check-prefix=ERR %s diff --git a/lld/test/ELF/i386-retpoline-nopic-linkerscript.s b/lld/test/ELF/i386-retpoline-nopic-linkerscript.s --- a/lld/test/ELF/i386-retpoline-nopic-linkerscript.s +++ b/lld/test/ELF/i386-retpoline-nopic-linkerscript.s @@ -18,10 +18,10 @@ // CHECK-NEXT: 10: pushl 236 // CHECK-NEXT: 16: pushl %eax // CHECK-NEXT: 17: movl 240, %eax -// CHECK-NEXT: 1c: calll 15 <.plt+0x20> +// CHECK-NEXT: 1c: calll 0x2b <.plt+0x20> // CHECK-NEXT: 21: pause // CHECK-NEXT: 23: lfence -// CHECK-NEXT: 26: jmp -7 <.plt+0x11> +// CHECK-NEXT: 26: jmp 0x1f <.plt+0x11> // CHECK-NEXT: 28: int3 // CHECK-NEXT: 29: int3 // CHECK-NEXT: 2a: int3 @@ -39,10 +39,10 @@ // CHECK-NEXT: 3f: int3 // CHECK-NEXT: 40: pushl %eax // CHECK-NEXT: 41: movl 244, %eax -// CHECK-NEXT: 46: calll -27 <.plt+0x20> -// CHECK-NEXT: 4b: jmp -47 <.plt+0x11> +// CHECK-NEXT: 46: calll 0x2b <.plt+0x20> +// CHECK-NEXT: 4b: jmp 0x1c <.plt+0x11> // CHECK-NEXT: 50: pushl $0 -// CHECK-NEXT: 55: jmp -74 <.plt> +// CHECK-NEXT: 55: jmp 0xb <.plt> // CHECK-NEXT: 5a: int3 // CHECK-NEXT: 5b: int3 // CHECK-NEXT: 5c: int3 @@ -51,10 +51,10 @@ // CHECK-NEXT: 5f: int3 // CHECK-NEXT: 60: pushl %eax // CHECK-NEXT: 61: movl 248, %eax -// CHECK-NEXT: 66: calll -59 <.plt+0x20> -// CHECK-NEXT: 6b: jmp -79 <.plt+0x11> +// CHECK-NEXT: 66: calll 0x2b <.plt+0x20> +// CHECK-NEXT: 6b: jmp 0x1c <.plt+0x11> // CHECK-NEXT: 70: pushl $8 -// CHECK-NEXT: 75: jmp -106 <.plt> +// CHECK-NEXT: 75: jmp 0xb <.plt> // CHECK-NEXT: 7a: int3 // CHECK-NEXT: 7b: int3 // CHECK-NEXT: 7c: int3 diff --git a/lld/test/ELF/i386-retpoline-nopic.s b/lld/test/ELF/i386-retpoline-nopic.s --- a/lld/test/ELF/i386-retpoline-nopic.s +++ b/lld/test/ELF/i386-retpoline-nopic.s @@ -16,10 +16,10 @@ // CHECK-NEXT: 4011d0: pushl 4207276 // CHECK-NEXT: 4011d6: pushl %eax // CHECK-NEXT: 4011d7: movl 4207280, %eax -// CHECK-NEXT: 4011dc: calll 15 <.plt+0x20> +// CHECK-NEXT: 4011dc: calll 0x4011eb <.plt+0x20> // CHECK-NEXT: 4011e1: pause // CHECK-NEXT: 4011e3: lfence -// CHECK-NEXT: 4011e6: jmp -7 <.plt+0x11> +// CHECK-NEXT: 4011e6: jmp 0x4011df <.plt+0x11> // CHECK-NEXT: 4011e8: int3 // CHECK-NEXT: 4011e9: int3 // CHECK-NEXT: 4011ea: int3 @@ -37,10 +37,10 @@ // CHECK-NEXT: 4011ff: int3 // CHECK-NEXT: 401200: pushl %eax // CHECK-NEXT: 401201: movl 4207284, %eax -// CHECK-NEXT: 401206: calll -27 <.plt+0x20> -// CHECK-NEXT: 40120b: jmp -47 <.plt+0x11> +// CHECK-NEXT: 401206: calll 0x4011eb <.plt+0x20> +// CHECK-NEXT: 40120b: jmp 0x4011dc <.plt+0x11> // CHECK-NEXT: 401210: pushl $0 -// CHECK-NEXT: 401215: jmp -74 <.plt> +// CHECK-NEXT: 401215: jmp 0x4011cb <.plt> // CHECK-NEXT: 40121a: int3 // CHECK-NEXT: 40121b: int3 // CHECK-NEXT: 40121c: int3 @@ -49,10 +49,10 @@ // CHECK-NEXT: 40121f: int3 // CHECK-NEXT: 401220: pushl %eax // CHECK-NEXT: 401221: movl 4207288, %eax -// CHECK-NEXT: 401226: calll -59 <.plt+0x20> -// CHECK-NEXT: 40122b: jmp -79 <.plt+0x11> +// CHECK-NEXT: 401226: calll 0x4011eb <.plt+0x20> +// CHECK-NEXT: 40122b: jmp 0x4011dc <.plt+0x11> // CHECK-NEXT: 401230: pushl $8 -// CHECK-NEXT: 401235: jmp -106 <.plt> +// CHECK-NEXT: 401235: jmp 0x4011cb <.plt> // CHECK-NEXT: 40123a: int3 // CHECK-NEXT: 40123b: int3 // CHECK-NEXT: 40123c: int3 diff --git a/lld/test/ELF/i386-retpoline-pic-linkerscript.s b/lld/test/ELF/i386-retpoline-pic-linkerscript.s --- a/lld/test/ELF/i386-retpoline-pic-linkerscript.s +++ b/lld/test/ELF/i386-retpoline-pic-linkerscript.s @@ -18,10 +18,10 @@ // CHECK-NEXT: 10: ff b3 04 00 00 00 pushl 4(%ebx) // CHECK-NEXT: 16: 50 pushl %eax // CHECK-NEXT: 17: 8b 83 08 00 00 00 movl 8(%ebx), %eax -// CHECK-NEXT: 1d: e8 0e 00 00 00 calll 14 <.plt+0x20> +// CHECK-NEXT: 1d: e8 0e 00 00 00 calll 0x2b <.plt+0x20> // CHECK-NEXT: 22: f3 90 pause // CHECK-NEXT: 24: 0f ae e8 lfence -// CHECK-NEXT: 27: eb f9 jmp -7 <.plt+0x12> +// CHECK-NEXT: 27: eb f9 jmp 0x20 <.plt+0x12> // CHECK-NEXT: 29: cc int3 // CHECK-NEXT: 2a: cc int3 // CHECK-NEXT: 2b: cc int3 @@ -38,10 +38,10 @@ // CHECK-NEXT: 3f: cc int3 // CHECK-NEXT: 40: 50 pushl %eax // CHECK-NEXT: 41: 8b 83 0c 00 00 00 movl 12(%ebx), %eax -// CHECK-NEXT: 47: e8 e4 ff ff ff calll -28 <.plt+0x20> -// CHECK-NEXT: 4c: e9 d1 ff ff ff jmp -47 <.plt+0x12> +// CHECK-NEXT: 47: e8 e4 ff ff ff calll 0x2b <.plt+0x20> +// CHECK-NEXT: 4c: e9 d1 ff ff ff jmp 0x1d <.plt+0x12> // CHECK-NEXT: 51: 68 00 00 00 00 pushl $0 -// CHECK-NEXT: 56: e9 b5 ff ff ff jmp -75 <.plt> +// CHECK-NEXT: 56: e9 b5 ff ff ff jmp 0xb <.plt> // CHECK-NEXT: 5b: cc int3 // CHECK-NEXT: 5c: cc int3 // CHECK-NEXT: 5d: cc int3 @@ -49,10 +49,10 @@ // CHECK-NEXT: 5f: cc int3 // CHECK-NEXT: 60: 50 pushl %eax // CHECK-NEXT: 61: 8b 83 10 00 00 00 movl 16(%ebx), %eax -// CHECK-NEXT: 67: e8 c4 ff ff ff calll -60 <.plt+0x20> -// CHECK-NEXT: 6c: e9 b1 ff ff ff jmp -79 <.plt+0x12> +// CHECK-NEXT: 67: e8 c4 ff ff ff calll 0x2b <.plt+0x20> +// CHECK-NEXT: 6c: e9 b1 ff ff ff jmp 0x1d <.plt+0x12> // CHECK-NEXT: 71: 68 08 00 00 00 pushl $8 -// CHECK-NEXT: 76: e9 95 ff ff ff jmp -107 <.plt> +// CHECK-NEXT: 76: e9 95 ff ff ff jmp 0xb <.plt> // CHECK-NEXT: 7b: cc int3 // CHECK-NEXT: 7c: cc int3 // CHECK-NEXT: 7d: cc int3 diff --git a/lld/test/ELF/i386-retpoline-pic.s b/lld/test/ELF/i386-retpoline-pic.s --- a/lld/test/ELF/i386-retpoline-pic.s +++ b/lld/test/ELF/i386-retpoline-pic.s @@ -16,10 +16,10 @@ // CHECK-NEXT: 11d0: pushl 4(%ebx) // CHECK-NEXT: 11d6: pushl %eax // CHECK-NEXT: 11d7: movl 8(%ebx), %eax -// CHECK-NEXT: 11dd: calll 14 <.plt+0x20> +// CHECK-NEXT: 11dd: calll 0x11eb <.plt+0x20> // CHECK-NEXT: 11e2: pause // CHECK-NEXT: 11e4: lfence -// CHECK-NEXT: 11e7: jmp -7 <.plt+0x12> +// CHECK-NEXT: 11e7: jmp 0x11e0 <.plt+0x12> // CHECK-NEXT: 11e9: int3 // CHECK-NEXT: 11ea: int3 // CHECK-NEXT: 11eb: int3 @@ -36,10 +36,10 @@ // CHECK-NEXT: 11ff: int3 // CHECK-NEXT: 1200: pushl %eax // CHECK-NEXT: 1201: movl 12(%ebx), %eax -// CHECK-NEXT: 1207: calll -28 <.plt+0x20> -// CHECK-NEXT: 120c: jmp -47 <.plt+0x12> +// CHECK-NEXT: 1207: calll 0x11eb <.plt+0x20> +// CHECK-NEXT: 120c: jmp 0x11dd <.plt+0x12> // CHECK-NEXT: 1211: pushl $0 -// CHECK-NEXT: 1216: jmp -75 <.plt> +// CHECK-NEXT: 1216: jmp 0x11cb <.plt> // CHECK-NEXT: 121b: int3 // CHECK-NEXT: 121c: int3 // CHECK-NEXT: 121d: int3 @@ -47,10 +47,10 @@ // CHECK-NEXT: 121f: int3 // CHECK-NEXT: 1220: pushl %eax // CHECK-NEXT: 1221: movl 16(%ebx), %eax -// CHECK-NEXT: 1227: calll -60 <.plt+0x20> -// CHECK-NEXT: 122c: jmp -79 <.plt+0x12> +// CHECK-NEXT: 1227: calll 0x11eb <.plt+0x20> +// CHECK-NEXT: 122c: jmp 0x11dd <.plt+0x12> // CHECK-NEXT: 1231: pushl $8 -// CHECK-NEXT: 1236: jmp -107 <.plt> +// CHECK-NEXT: 1236: jmp 0x11cb <.plt> // CHECK-NEXT: 123b: int3 // CHECK-NEXT: 123c: int3 // CHECK-NEXT: 123d: int3 diff --git a/lld/test/ELF/i386-tls-dynamic.s b/lld/test/ELF/i386-tls-dynamic.s --- a/lld/test/ELF/i386-tls-dynamic.s +++ b/lld/test/ELF/i386-tls-dynamic.s @@ -82,16 +82,16 @@ ## -4128 and -4120 are first and second GOT entries offsets. ## Each one is a pair of records. # DIS-NEXT: 1260: leal -4128(,%ebx), %eax -# DIS-NEXT: 1267: calll 100 +# DIS-NEXT: 1267: calll 0x12cb # DIS-NEXT: 126c: leal -4120(,%ebx), %eax -# DIS-NEXT: 1273: calll 88 +# DIS-NEXT: 1273: calll 0x12cb ## Local dynamic model: ## -16 is a local module tls index offset. # DIS-NEXT: 1278: leal -4112(%ebx), %eax -# DIS-NEXT: 127e: calll 77 +# DIS-NEXT: 127e: calll 0x12cb # DIS-NEXT: 1283: leal 8(%eax), %edx # DIS-NEXT: 1289: leal -4112(%ebx), %eax -# DIS-NEXT: 128f: calll 60 +# DIS-NEXT: 128f: calll 0x12cb # DIS-NEXT: 1294: leal 12(%eax), %edx ## Initial exec model: # DIS-NEXT: 129a: movl %gs:0, %eax diff --git a/lld/test/ELF/local-got-pie.s b/lld/test/ELF/local-got-pie.s --- a/lld/test/ELF/local-got-pie.s +++ b/lld/test/ELF/local-got-pie.s @@ -17,7 +17,7 @@ // DISASM: Disassembly of section .text: // DISASM-EMPTY: // DISASM-NEXT: <_start>: -// DISASM-NEXT: 1210: {{.*}} callq 4275 +// DISASM-NEXT: 1210: {{.*}} callq 0x22c3 // DISASM: : // DISASM-NEXT: 1215: {{.*}} nop diff --git a/lld/test/ELF/local-got-shared.s b/lld/test/ELF/local-got-shared.s --- a/lld/test/ELF/local-got-shared.s +++ b/lld/test/ELF/local-got-shared.s @@ -14,7 +14,7 @@ // 0x22E0 - 0x1228 - 5 = 4275 // DISASM: : -// DISASM-NEXT: 1228: callq 4275 +// DISASM-NEXT: 1228: callq 0x22db // DISASM: : // DISASM-NEXT: 122d: nop diff --git a/lld/test/ELF/local-got.s b/lld/test/ELF/local-got.s --- a/lld/test/ELF/local-got.s +++ b/lld/test/ELF/local-got.s @@ -18,8 +18,8 @@ // 0x202320 - 0x201250 - 5 = 4299 // 0x202328 - 0x201255 - 5 = 4302 // DISASM: <_start>: -// DISASM-NEXT: 201250: callq 4299 -// DISASM-NEXT: 201255: callq 4302 +// DISASM-NEXT: 201250: callq 0x20231b +// DISASM-NEXT: 201255: callq 0x202323 // DISASM: : // DISASM-NEXT: 20125a: nop diff --git a/lld/test/ELF/lto/linker-script-symbols-ipo.ll b/lld/test/ELF/lto/linker-script-symbols-ipo.ll --- a/lld/test/ELF/lto/linker-script-symbols-ipo.ll +++ b/lld/test/ELF/lto/linker-script-symbols-ipo.ll @@ -18,7 +18,7 @@ ; NOIPO: : ; NOIPO-NEXT: movl $2, %eax ; NOIPO: <_start>: -; NOIPO-NEXT: jmp -21 +; NOIPO-NEXT: jmp 0x20115b target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/lld/test/ELF/no-inhibit-exec.s b/lld/test/ELF/no-inhibit-exec.s --- a/lld/test/ELF/no-inhibit-exec.s +++ b/lld/test/ELF/no-inhibit-exec.s @@ -8,7 +8,7 @@ # CHECK: Disassembly of section .text: # CHECK-EMPTY: # CHECK-NEXT: _start -# CHECK-NEXT: 201120: {{.*}} callq -2101541 +# CHECK-NEXT: 201120: {{.*}} callq 0xfffffffffffffffb # RELOC: Relocations [ # RELOC-NEXT: ] diff --git a/lld/test/ELF/pre_init_fini_array_missing.s b/lld/test/ELF/pre_init_fini_array_missing.s --- a/lld/test/ELF/pre_init_fini_array_missing.s +++ b/lld/test/ELF/pre_init_fini_array_missing.s @@ -22,21 +22,21 @@ // CHECK: Disassembly of section .text: // CHECK-EMPTY: // CHECK-NEXT: <_start>: -// CHECK-NEXT: 201120: callq -5 -// CHECK-NEXT: callq -10 -// CHECK-NEXT: callq -15 -// CHECK-NEXT: callq -20 -// CHECK-NEXT: callq -25 -// CHECK-NEXT: callq -30 +// CHECK-NEXT: 201120: callq 0x20111b +// CHECK-NEXT: callq 0x20111b +// CHECK-NEXT: callq 0x20111b +// CHECK-NEXT: callq 0x20111b +// CHECK-NEXT: callq 0x20111b +// CHECK-NEXT: callq 0x20111b // In position-independent binaries, they resolve to .text too. // PIE: Disassembly of section .text: // PIE-EMPTY: // PIE-NEXT: <_start>: -// PIE-NEXT: 1210: callq -5 -// PIE-NEXT: callq -10 -// PIE-NEXT: callq -15 -// PIE-NEXT: callq -20 -// PIE-NEXT: callq -25 -// PIE-NEXT: callq -30 +// PIE-NEXT: 1210: callq 0x120b +// PIE-NEXT: callq 0x120b +// PIE-NEXT: callq 0x120b +// PIE-NEXT: callq 0x120b +// PIE-NEXT: callq 0x120b +// PIE-NEXT: callq 0x120b diff --git a/lld/test/ELF/relocation-i686.s b/lld/test/ELF/relocation-i686.s --- a/lld/test/ELF/relocation-i686.s +++ b/lld/test/ELF/relocation-i686.s @@ -33,7 +33,7 @@ // CHECK: Disassembly of section .R_386_PC32: // CHECK-EMPTY: // CHECK-NEXT: : -// CHECK-NEXT: calll 4 +// CHECK-NEXT: calll 0x4011b5 // CHECK: : // CHECK-NEXT: nop @@ -77,7 +77,7 @@ // CHECK: Disassembly of section .dynamic_reloc: // CHECK-EMPTY: // CHECK-NEXT: <.dynamic_reloc>: -// CHECK-NEXT: 4011c5: calll 38 +// CHECK-NEXT: 4011c5: calll 0x4011eb .section .R_386_GOT32,"ax",@progbits .global R_386_GOT32 diff --git a/lld/test/ELF/relocation.s b/lld/test/ELF/relocation.s --- a/lld/test/ELF/relocation.s +++ b/lld/test/ELF/relocation.s @@ -93,7 +93,7 @@ // CHECK: Disassembly of section .text: // CHECK-EMPTY: // CHECK-NEXT: <_start>: -// CHECK-NEXT: 201310: e8 04 00 00 00 callq 4 +// CHECK-NEXT: 201310: e8 04 00 00 00 callq 0x201314 // CHECK-NEXT: 201315: // CHECK: : @@ -132,7 +132,7 @@ // CHECK: Disassembly of section .R_X86_64_PC32: // CHECK-EMPTY: // CHECK-NEXT: : -// CHECK-NEXT: 201327: {{.*}} callq 36 +// CHECK-NEXT: 201327: {{.*}} callq 0x20134b // CHECK-NEXT: 20132c: {{.*}} movl $2102096, %eax .section .R_X86_64_32S_2,"ax",@progbits diff --git a/lld/test/ELF/startstop.s b/lld/test/ELF/startstop.s --- a/lld/test/ELF/startstop.s +++ b/lld/test/ELF/startstop.s @@ -5,9 +5,9 @@ // RUN: llvm-readobj --symbols -r %t.so | FileCheck -check-prefix=SYMBOL %s // DISASM: <_start>: -// DISASM: 1330: callq 10 <__start_foo> -// DISASM: 1335: callq 8 <__start_bar> -// DISASM: 133a: callq 3 <__start_bar> +// DISASM: 1330: callq 0x133a <__start_foo> +// DISASM: 1335: callq 0x133d <__start_bar> +// DISASM: 133a: callq 0x133d <__start_bar> // DISASM: Disassembly of section foo: // DISASM-EMPTY: // DISASM: <__start_foo>: diff --git a/lld/test/ELF/x86-64-feature-cet.s b/lld/test/ELF/x86-64-feature-cet.s --- a/lld/test/ELF/x86-64-feature-cet.s +++ b/lld/test/ELF/x86-64-feature-cet.s @@ -42,8 +42,8 @@ # DISASM: Disassembly of section .text: # DISASM: 0000000000201330 : -# DISASM-NEXT: 201330: callq 0x2b -# DISASM-NEXT: 201335: callq 0x36 +# DISASM-NEXT: 201330: callq 0x20135b +# DISASM-NEXT: 201335: callq 0x20136b # DISASM-NEXT: retq # DISASM: Disassembly of section .plt: @@ -53,7 +53,7 @@ # DISASM-NEXT: nopl (%rax) # DISASM-NEXT: endbr64 # DISASM-NEXT: pushq $0x0 -# DISASM-NEXT: jmp -0x1e <.plt> +# DISASM-NEXT: jmp 0x20133b <.plt> # DISASM-NEXT: nop # DISASM: Disassembly of section .plt.sec: diff --git a/lld/test/ELF/x86-64-gotpc-relax.s b/lld/test/ELF/x86-64-gotpc-relax.s --- a/lld/test/ELF/x86-64-gotpc-relax.s +++ b/lld/test/ELF/x86-64-gotpc-relax.s @@ -33,19 +33,19 @@ # DISASM-NEXT: leaq -72(%rip), %rax # DISASM-NEXT: movq 4192(%rip), %rax # DISASM-NEXT: movq 4185(%rip), %rax -# DISASM-NEXT: callq -93 -# DISASM-NEXT: callq -99 -# DISASM-NEXT: callq -104 -# DISASM-NEXT: callq -110 +# DISASM-NEXT: callq 0x20116a +# DISASM-NEXT: callq 0x20116a +# DISASM-NEXT: callq 0x20116b +# DISASM-NEXT: callq 0x20116b # DISASM-NEXT: callq *4155(%rip) # DISASM-NEXT: callq *4149(%rip) -# DISASM-NEXT: jmp -128 +# DISASM-NEXT: jmp 0x20116b # DISASM-NEXT: nop -# DISASM-NEXT: jmp -134 +# DISASM-NEXT: jmp 0x20116b # DISASM-NEXT: nop -# DISASM-NEXT: jmp -139 +# DISASM-NEXT: jmp 0x20116c # DISASM-NEXT: nop -# DISASM-NEXT: jmp -145 +# DISASM-NEXT: jmp 0x20116c # DISASM-NEXT: nop # DISASM-NEXT: jmpq *4119(%rip) # DISASM-NEXT: jmpq *4113(%rip) diff --git a/lld/test/ELF/x86-64-plt.s b/lld/test/ELF/x86-64-plt.s --- a/lld/test/ELF/x86-64-plt.s +++ b/lld/test/ELF/x86-64-plt.s @@ -70,17 +70,17 @@ // DISASM-NEXT: : // DISASM-NEXT: 1330: jmpq *8450(%rip) // DISASM-NEXT: pushq $0 -// DISASM-NEXT: jmp -32 <.plt> +// DISASM-NEXT: jmp 0x131b <.plt> // DISASM-EMPTY: // DISASM-NEXT: : // DISASM-NEXT: 1340: jmpq *8442(%rip) // DISASM-NEXT: pushq $1 -// DISASM-NEXT: jmp -48 <.plt> +// DISASM-NEXT: jmp 0x131b <.plt> // DISASM-EMPTY: // DISASM-NEXT: <_start@plt>: // DISASM-NEXT: 1350: jmpq *8434(%rip) // DISASM-NEXT: pushq $2 -// DISASM-NEXT: jmp -64 <.plt> +// DISASM-NEXT: jmp 0x131b <.plt> // 0x201030 - (0x201000 + 1) - 4 = 43 // 0x201030 - (0x201005 + 1) - 4 = 38 @@ -88,10 +88,10 @@ // 0x201000 - (0x20100f + 1) - 4 = -20 // DISASM2: <_start>: -// DISASM2-NEXT: jmp 43 -// DISASM2-NEXT: jmp 38 -// DISASM2-NEXT: jmp 49 -// DISASM2-NEXT: jmp -20 <_start> +// DISASM2-NEXT: jmp 0x2012eb +// DISASM2-NEXT: jmp 0x2012eb +// DISASM2-NEXT: jmp 0x2012fb +// DISASM2-NEXT: jmp 0x2012bb <_start> // 0x202018 - 0x201036 = 4066 // 0x202020 - 0x201046 = 4058 @@ -106,12 +106,12 @@ // DISASM2-NEXT: : // DISASM2-NEXT: 2012f0: jmpq *8450(%rip) // DISASM2-NEXT: pushq $0 -// DISASM2-NEXT: jmp -32 <.plt> +// DISASM2-NEXT: jmp 0x2012db <.plt> // DISASM2-EMPTY: // DISASM2-NEXT: : // DISASM2-NEXT: 201300: jmpq *8442(%rip) // DISASM2-NEXT: pushq $1 -// DISASM2-NEXT: jmp -48 <.plt> +// DISASM2-NEXT: jmp 0x2012db <.plt> // DISASM2-NOT: {{.}} .global _start diff --git a/lld/test/ELF/x86-64-retpoline-linkerscript.s b/lld/test/ELF/x86-64-retpoline-linkerscript.s --- a/lld/test/ELF/x86-64-retpoline-linkerscript.s +++ b/lld/test/ELF/x86-64-retpoline-linkerscript.s @@ -17,10 +17,10 @@ // CHECK-NEXT: <.plt>: // CHECK-NEXT: 10: ff 35 32 01 00 00 pushq 306(%rip) // CHECK-NEXT: 16: 4c 8b 1d 33 01 00 00 movq 307(%rip), %r11 -// CHECK-NEXT: 1d: e8 0e 00 00 00 callq 14 <.plt+0x20> +// CHECK-NEXT: 1d: e8 0e 00 00 00 callq 0x2b <.plt+0x20> // CHECK-NEXT: 22: f3 90 pause // CHECK-NEXT: 24: 0f ae e8 lfence -// CHECK-NEXT: 27: eb f9 jmp -7 <.plt+0x12> +// CHECK-NEXT: 27: eb f9 jmp 0x20 <.plt+0x12> // CHECK-NEXT: 29: cc int3 // CHECK-NEXT: 2a: cc int3 // CHECK-NEXT: 2b: cc int3 @@ -42,20 +42,20 @@ // CHECK-NEXT: 3e: cc int3 // CHECK-NEXT: 3f: cc int3 // CHECK-NEXT: 40: 4c 8b 1d 11 01 00 00 movq 273(%rip), %r11 -// CHECK-NEXT: 47: e8 e4 ff ff ff callq -28 <.plt+0x20> -// CHECK-NEXT: 4c: e9 d1 ff ff ff jmp -47 <.plt+0x12> +// CHECK-NEXT: 47: e8 e4 ff ff ff callq 0x2b <.plt+0x20> +// CHECK-NEXT: 4c: e9 d1 ff ff ff jmp 0x1d <.plt+0x12> // CHECK-NEXT: 51: 68 00 00 00 00 pushq $0 -// CHECK-NEXT: 56: e9 b5 ff ff ff jmp -75 <.plt> +// CHECK-NEXT: 56: e9 b5 ff ff ff jmp 0xb <.plt> // CHECK-NEXT: 5b: cc int3 // CHECK-NEXT: 5c: cc int3 // CHECK-NEXT: 5d: cc int3 // CHECK-NEXT: 5e: cc int3 // CHECK-NEXT: 5f: cc int3 // CHECK-NEXT: 60: 4c 8b 1d f9 00 00 00 movq 249(%rip), %r11 -// CHECK-NEXT: 67: e8 c4 ff ff ff callq -60 <.plt+0x20> -// CHECK-NEXT: 6c: e9 b1 ff ff ff jmp -79 <.plt+0x12> +// CHECK-NEXT: 67: e8 c4 ff ff ff callq 0x2b <.plt+0x20> +// CHECK-NEXT: 6c: e9 b1 ff ff ff jmp 0x1d <.plt+0x12> // CHECK-NEXT: 71: 68 01 00 00 00 pushq $1 -// CHECK-NEXT: 76: e9 95 ff ff ff jmp -107 <.plt> +// CHECK-NEXT: 76: e9 95 ff ff ff jmp 0xb <.plt> // CHECK-NEXT: 7b: cc int3 // CHECK-NEXT: 7c: cc int3 // CHECK-NEXT: 7d: cc int3 diff --git a/lld/test/ELF/x86-64-retpoline-znow-linkerscript.s b/lld/test/ELF/x86-64-retpoline-znow-linkerscript.s --- a/lld/test/ELF/x86-64-retpoline-znow-linkerscript.s +++ b/lld/test/ELF/x86-64-retpoline-znow-linkerscript.s @@ -15,10 +15,10 @@ // CHECK: Disassembly of section .plt: // CHECK-EMPTY: // CHECK-NEXT: <.plt>: -// CHECK-NEXT: 10: e8 0b 00 00 00 callq 11 <.plt+0x10> +// CHECK-NEXT: 10: e8 0b 00 00 00 callq 0x1b <.plt+0x10> // CHECK-NEXT: 15: f3 90 pause // CHECK-NEXT: 17: 0f ae e8 lfence -// CHECK-NEXT: 1a: eb f9 jmp -7 <.plt+0x5> +// CHECK-NEXT: 1a: eb f9 jmp 0x13 <.plt+0x5> // CHECK-NEXT: 1c: cc int3 // CHECK-NEXT: 1d: cc int3 // CHECK-NEXT: 1e: cc int3 @@ -37,13 +37,13 @@ // CHECK-NEXT: 2e: cc int3 // CHECK-NEXT: 2f: cc int3 // CHECK-NEXT: 30: 4c 8b 1d 31 00 00 00 movq 49(%rip), %r11 -// CHECK-NEXT: 37: e9 d4 ff ff ff jmp -44 <.plt> +// CHECK-NEXT: 37: e9 d4 ff ff ff jmp 0xb <.plt> // CHECK-NEXT: 3c: cc int3 // CHECK-NEXT: 3d: cc int3 // CHECK-NEXT: 3e: cc int3 // CHECK-NEXT: 3f: cc int3 // CHECK-NEXT: 40: 4c 8b 1d 29 00 00 00 movq 41(%rip), %r11 -// CHECK-NEXT: 47: e9 c4 ff ff ff jmp -60 <.plt> +// CHECK-NEXT: 47: e9 c4 ff ff ff jmp 0xb <.plt> // CHECK-NEXT: 4c: cc int3 // CHECK-NEXT: 4d: cc int3 // CHECK-NEXT: 4e: cc int3 diff --git a/lld/test/ELF/x86-64-retpoline-znow-static-iplt.s b/lld/test/ELF/x86-64-retpoline-znow-static-iplt.s --- a/lld/test/ELF/x86-64-retpoline-znow-static-iplt.s +++ b/lld/test/ELF/x86-64-retpoline-znow-static-iplt.s @@ -5,16 +5,16 @@ #0x2011a9+5 + 34 = 0x2011d0 (foo@plt) # CHECK: <_start>: -# CHECK-NEXT: 2011a9: callq 34 +# CHECK-NEXT: 2011a9: callq 0x2011cb #Static IPLT header due to -z retpolineplt # CHECK: 00000000002011b0 <.plt>: -# CHECK-NEXT: 2011b0: callq 11 <.plt+0x10> +# CHECK-NEXT: 2011b0: callq 0x2011bb <.plt+0x10> # CHECK-NEXT: 2011b5: pause # CHECK-NEXT: 2011b7: lfence #foo@plt # CHECK: 2011d0: movq 4105(%rip), %r11 -# CHECK-NEXT: 2011d7: jmp -44 <.plt> +# CHECK-NEXT: 2011d7: jmp 0x2011ab <.plt> .type foo STT_GNU_IFUNC .globl foo diff --git a/lld/test/ELF/x86-64-retpoline-znow.s b/lld/test/ELF/x86-64-retpoline-znow.s --- a/lld/test/ELF/x86-64-retpoline-znow.s +++ b/lld/test/ELF/x86-64-retpoline-znow.s @@ -14,10 +14,10 @@ // CHECK: Disassembly of section .plt: // CHECK-EMPTY: // CHECK-NEXT: <.plt>: -// CHECK-NEXT: 12d0: callq 11 <.plt+0x10> +// CHECK-NEXT: 12d0: callq 0x12db <.plt+0x10> // CHECK-NEXT: pause // CHECK-NEXT: lfence -// CHECK-NEXT: jmp -7 <.plt+0x5> +// CHECK-NEXT: jmp 0x12d3 <.plt+0x5> // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 @@ -36,13 +36,13 @@ // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: 12f0: movq 4369(%rip), %r11 -// CHECK-NEXT: jmp -44 <.plt> +// CHECK-NEXT: jmp 0x12cb <.plt> // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: 1300: movq 4361(%rip), %r11 -// CHECK-NEXT: jmp -60 <.plt> +// CHECK-NEXT: jmp 0x12cb <.plt> // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 diff --git a/lld/test/ELF/x86-64-retpoline.s b/lld/test/ELF/x86-64-retpoline.s --- a/lld/test/ELF/x86-64-retpoline.s +++ b/lld/test/ELF/x86-64-retpoline.s @@ -16,10 +16,10 @@ // CHECK-NEXT: <.plt>: // CHECK-NEXT: 1300: pushq 8498(%rip) // CHECK-NEXT: movq 8499(%rip), %r11 -// CHECK-NEXT: callq 14 <.plt+0x20> +// CHECK-NEXT: callq 0x131b <.plt+0x20> // CHECK-NEXT: pause // CHECK-NEXT: lfence -// CHECK-NEXT: jmp -7 <.plt+0x12> +// CHECK-NEXT: jmp 0x1310 <.plt+0x12> // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 @@ -41,20 +41,20 @@ // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: 1330: movq 8465(%rip), %r11 -// CHECK-NEXT: callq -28 <.plt+0x20> -// CHECK-NEXT: jmp -47 <.plt+0x12> +// CHECK-NEXT: callq 0x131b <.plt+0x20> +// CHECK-NEXT: jmp 0x130d <.plt+0x12> // CHECK-NEXT: pushq $0 -// CHECK-NEXT: jmp -75 <.plt> +// CHECK-NEXT: jmp 0x12fb <.plt> // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: 1350: movq 8441(%rip), %r11 -// CHECK-NEXT: callq -60 <.plt+0x20> -// CHECK-NEXT: jmp -79 <.plt+0x12> +// CHECK-NEXT: callq 0x131b <.plt+0x20> +// CHECK-NEXT: jmp 0x130d <.plt+0x12> // CHECK-NEXT: pushq $1 -// CHECK-NEXT: jmp -107 <.plt> +// CHECK-NEXT: jmp 0x12fb <.plt> // CHECK-NEXT: int3 // CHECK-NEXT: int3 // CHECK-NEXT: int3 diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp --- a/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp +++ b/llvm/lib/Target/X86/MCTargetDesc/X86InstPrinterCommon.cpp @@ -13,6 +13,7 @@ #include "X86InstPrinterCommon.h" #include "X86BaseInfo.h" +#include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCInst.h" #include "llvm/MC/MCInstrDesc.h" @@ -294,9 +295,12 @@ void X86InstPrinterCommon::printPCRelImm(const MCInst *MI, uint64_t Address, unsigned OpNo, raw_ostream &O) { const MCOperand &Op = MI->getOperand(OpNo); - if (Op.isImm()) - O << formatImm(Op.getImm()); - else { + if (Op.isImm()) { + uint64_t Target = Address + Op.getImm(); + if (MAI.getCodePointerSize() == 4) + Target &= 0xffffffff; + O << formatHex(Target); + } else { assert(Op.isExpr() && "unknown pcrel immediate operand"); // If a symbolic branch target was added as a constant expression then print // that address in hex. diff --git a/llvm/test/Bindings/llvm-c/X86/disassemble.test b/llvm/test/Bindings/llvm-c/X86/disassemble.test --- a/llvm/test/Bindings/llvm-c/X86/disassemble.test +++ b/llvm/test/Bindings/llvm-c/X86/disassemble.test @@ -14,7 +14,7 @@ i686-apple-darwin NULL 0f b7 4c 24 0a e8 29 ce ff ff ;CHECK: triple: i686-apple-darwin, features: NULL ;CHECK: movzwl 10(%esp), %ecx -;CHECK: calll -12759 +;CHECK: calll 0xffffce29 i686-linux-unknown NULL dd 44 24 04 d9 e1 c3 ;CHECK: triple: i686-linux-unknown, features: NULL diff --git a/llvm/test/CodeGen/X86/call-imm.ll b/llvm/test/CodeGen/X86/call-imm.ll --- a/llvm/test/CodeGen/X86/call-imm.ll +++ b/llvm/test/CodeGen/X86/call-imm.ll @@ -18,8 +18,8 @@ ret i32 %0 } -; X86STA: {{call.*12345678}} -; X86PIC-NOT: {{call.*12345678}} -; X86DYN: {{call.*12345678}} +; X86STA: {{calll 0xbc614e}} +; X86PIC-NOT: {{calll 0x}} +; X86DYN: {{calll 0xbc614e}} ; X86WINSTA: {{call.*[*]%eax}} ; X64: {{call.*[*]%rax}} diff --git a/llvm/test/CodeGen/X86/callbr-asm-obj-file.ll b/llvm/test/CodeGen/X86/callbr-asm-obj-file.ll --- a/llvm/test/CodeGen/X86/callbr-asm-obj-file.ll +++ b/llvm/test/CodeGen/X86/callbr-asm-obj-file.ll @@ -3,7 +3,7 @@ ; RUN: | FileCheck %s ; CHECK: 0000000000000000 : -; CHECK-NEXT: 0: 74 00 je 0 +; CHECK-NEXT: 0: 74 00 je 0x0 ; CHECK-NEXT: 2: c3 retq define void @test1() { diff --git a/llvm/test/LTO/Resolution/X86/not-prevailing.ll b/llvm/test/LTO/Resolution/X86/not-prevailing.ll --- a/llvm/test/LTO/Resolution/X86/not-prevailing.ll +++ b/llvm/test/LTO/Resolution/X86/not-prevailing.ll @@ -6,9 +6,9 @@ ; Check that 'foo' and 'bar' were not inlined. ; CHECK: : ; CHECK-NEXT: {{.*}} pushq %rbx -; CHECK-NEXT: {{.*}} callq 0 +; CHECK-NEXT: {{.*}} callq 0x1 ; CHECK-NEXT: {{.*}} movl %eax, %ebx -; CHECK-NEXT: {{.*}} callq 0 +; CHECK-NEXT: {{.*}} callq 0x8 ; CHECK-NEXT: {{.*}} movl %ebx, %eax ; CHECK-NEXT: {{.*}} popq %rbx ; CHECK-NEXT: {{.*}} retq diff --git a/llvm/test/MC/COFF/cv-inline-linetable-unlikely.s b/llvm/test/MC/COFF/cv-inline-linetable-unlikely.s --- a/llvm/test/MC/COFF/cv-inline-linetable-unlikely.s +++ b/llvm/test/MC/COFF/cv-inline-linetable-unlikely.s @@ -26,13 +26,13 @@ # ASM-NEXT: 4: c7 05 fc ff ff ff 00 00 00 00 movl $0, -4(%rip) # Begin inline loc (matches cv_loc below) # ASM-NEXT: e: 83 3d ff ff ff ff 00 cmpl $0, -1(%rip) -# ASM-NEXT: 15: 75 0f jne 15 +# ASM-NEXT: 15: 75 0f jne 0x24 # End inline loc # ASM-NEXT: 17: c7 05 fc ff ff ff 00 00 00 00 movl $0, -4(%rip) # ASM-NEXT: 21: 48 83 c4 28 addq $40, %rsp # ASM-NEXT: 25: c3 retq # Begin inline loc (matches cv_loc below) -# ASM-NEXT: 26: e8 00 00 00 00 callq 0 +# ASM-NEXT: 26: e8 00 00 00 00 callq 0x26 # ASM-NEXT: 2b: 0f 0b ud2 # End inline loc diff --git a/llvm/test/MC/COFF/cv-loc-unreachable-2.s b/llvm/test/MC/COFF/cv-loc-unreachable-2.s --- a/llvm/test/MC/COFF/cv-loc-unreachable-2.s +++ b/llvm/test/MC/COFF/cv-loc-unreachable-2.s @@ -8,9 +8,9 @@ # ASM: 00000000 <_callit>: # begin inline { -# ASM-NEXT: 0: e8 00 00 00 00 calll 0 <_callit+0x5> +# ASM-NEXT: 0: e8 00 00 00 00 calll 0x0 <_callit+0x5> # ASM-NEXT: 5: 85 c0 testl %eax, %eax -# ASM-NEXT: 7: 75 01 jne 1 <_callit+0xa> +# ASM-NEXT: 7: 75 01 jne 0x8 <_callit+0xa> # } end inline # ASM-NEXT: 9: c3 retl # begin inline { diff --git a/llvm/test/MC/COFF/cv-loc-unreachable.s b/llvm/test/MC/COFF/cv-loc-unreachable.s --- a/llvm/test/MC/COFF/cv-loc-unreachable.s +++ b/llvm/test/MC/COFF/cv-loc-unreachable.s @@ -19,9 +19,9 @@ # ASM: 00000000 <_callit>: # begin inline { -# ASM-NEXT: 0: e8 00 00 00 00 calll 0 <_callit+0x5> +# ASM-NEXT: 0: e8 00 00 00 00 calll 0x0 <_callit+0x5> # ASM-NEXT: 5: 85 c0 testl %eax, %eax -# ASM-NEXT: 7: 75 01 jne 1 <_callit+0xa> +# ASM-NEXT: 7: 75 01 jne 0x8 <_callit+0xa> # } end inline # ASM-NEXT: 9: c3 retl # begin inline { diff --git a/llvm/test/MC/Disassembler/X86/simple-tests.txt b/llvm/test/MC/Disassembler/X86/simple-tests.txt --- a/llvm/test/MC/Disassembler/X86/simple-tests.txt +++ b/llvm/test/MC/Disassembler/X86/simple-tests.txt @@ -6,16 +6,16 @@ # CHECK: int $33 0xCD 0x21 -# CHECK: jrcxz -127 +# CHECK: jrcxz 0xffffffffffffff81 0xe3 0x81 -# CHECK: jecxz -127 +# CHECK: jecxz 0xffffffffffffff81 0x67 0xe3 0x81 # CHECK: addb %al, (%rax) 0 0 -# CHECK: callq -1234 +# CHECK: callq 0xfffffffffffffb2e 0xe8 0x2e 0xfb 0xff 0xff # CHECK: lfence diff --git a/llvm/test/MC/Disassembler/X86/x86-16.txt b/llvm/test/MC/Disassembler/X86/x86-16.txt --- a/llvm/test/MC/Disassembler/X86/x86-16.txt +++ b/llvm/test/MC/Disassembler/X86/x86-16.txt @@ -789,7 +789,7 @@ # CHECK: lretl 0x66 0xcb -# CHECK: callw -1 +# CHECK: callw 0xffffffff 0xe8 0xff 0xff # CHECK: wbnoinvd diff --git a/llvm/test/MC/Disassembler/X86/x86-32.txt b/llvm/test/MC/Disassembler/X86/x86-32.txt --- a/llvm/test/MC/Disassembler/X86/x86-32.txt +++ b/llvm/test/MC/Disassembler/X86/x86-32.txt @@ -11,10 +11,10 @@ # CHECK: calll 0xff 0xd0 -# CHECK: jecxz -127 +# CHECK: jecxz 0xffffff81 0xe3 0x81 -# CHECK: jcxz -127 +# CHECK: jcxz 0xffffff81 0x67 0xe3 0x81 # CHECK: incl @@ -51,10 +51,10 @@ # CHECK: addb %al, (%eax) 0 0 -# CHECK: calll -1234 +# CHECK: calll 0xfffffb2e 0xe8 0x2e 0xfb 0xff 0xff -# CHECK: callw -1 +# CHECK: callw 0xffffffff 0x66 0xe8 0xff 0xff # CHECK: lfence diff --git a/llvm/test/MC/Disassembler/X86/x86-64.txt b/llvm/test/MC/Disassembler/X86/x86-64.txt --- a/llvm/test/MC/Disassembler/X86/x86-64.txt +++ b/llvm/test/MC/Disassembler/X86/x86-64.txt @@ -110,10 +110,10 @@ # CHECK: adoxq (%rax), %rax 0xf3 0x48 0x0f 0x38 0xf6 0x00 -# CHECK: xbegin 53 +# CHECK: xbegin 0x35 0xc7 0xf8 0x35 0x00 0x00 0x00 -# CHECK: xbegin 53 +# CHECK: xbegin 0x35 0x66 0xc7 0xf8 0x35 0x00 # CHECK: xend @@ -326,115 +326,115 @@ # CHECK: movq %rax, 1515870810 0x67, 0x48 0xa3 0x5a 0x5a 0x5a 0x5a -# CHECK: callw 32767 +# CHECK: callw 0x7fff 0x66 0xe8 0xff 0x7f -# CHECK: callw 32767 +# CHECK: callw 0x7fff 0x66 0x66 0x48 0xe8 0xff 0x7f -# CHECK: jmp -32769 +# CHECK: jmp 0xffffffffffff7fff 0xe9 0xff 0x7f 0xff 0xff -# CHECK: jmp 32767 +# CHECK: jmp 0x7fff 0x66 0xe9 0xff 0x7f -# CHECK: jmp 32767 +# CHECK: jmp 0x7fff 0x66 0x66 0x48 0xe9 0xff 0x7f -# CHECK: jo -32769 +# CHECK: jo 0xffffffffffff7fff 0x0f 0x80 0xff 0x7f 0xff 0xff -# CHECK: jo 32767 +# CHECK: jo 0x7fff 0x66 0x0f 0x80 0xff 0x7f -# CHECK: jno -32769 +# CHECK: jno 0xffffffffffff7fff 0x0f 0x81 0xff 0x7f 0xff 0xff -# CHECK: jno 32767 +# CHECK: jno 0x7fff 0x66 0x0f 0x81 0xff 0x7f -# CHECK: jb -32769 +# CHECK: jb 0xffffffffffff7fff 0x0f 0x82 0xff 0x7f 0xff 0xff -# CHECK: jb 32767 +# CHECK: jb 0x7fff 0x66 0x0f 0x82 0xff 0x7f -# CHECK: jae -32769 +# CHECK: jae 0xffffffffffff7fff 0x0f 0x83 0xff 0x7f 0xff 0xff -# CHECK: jae 32767 +# CHECK: jae 0x7fff 0x66 0x0f 0x83 0xff 0x7f -# CHECK: je -32769 +# CHECK: je 0xffffffffffff7fff 0x0f 0x84 0xff 0x7f 0xff 0xff -# CHECK: je 32767 +# CHECK: je 0x7fff 0x66 0x0f 0x84 0xff 0x7f -# CHECK: jne -32769 +# CHECK: jne 0xffffffffffff7fff 0x0f 0x85 0xff 0x7f 0xff 0xff -# CHECK: jne 32767 +# CHECK: jne 0x7fff 0x66 0x0f 0x85 0xff 0x7f -# CHECK: jbe -32769 +# CHECK: jbe 0xffffffffffff7fff 0x0f 0x86 0xff 0x7f 0xff 0xff -# CHECK: jbe 32767 +# CHECK: jbe 0x7fff 0x66 0x0f 0x86 0xff 0x7f -# CHECK: ja -32769 +# CHECK: ja 0xffffffffffff7fff 0x0f 0x87 0xff 0x7f 0xff 0xff -# CHECK: ja 32767 +# CHECK: ja 0x7fff 0x66 0x0f 0x87 0xff 0x7f -# CHECK: js -32769 +# CHECK: js 0xffffffffffff7fff 0x0f 0x88 0xff 0x7f 0xff 0xff -# CHECK: js 32767 +# CHECK: js 0x7fff 0x66 0x0f 0x88 0xff 0x7f -# CHECK: jns -32769 +# CHECK: jns 0xffffffffffff7fff 0x0f 0x89 0xff 0x7f 0xff 0xff -# CHECK: jns 32767 +# CHECK: jns 0x7fff 0x66 0x0f 0x89 0xff 0x7f -# CHECK: jp -32769 +# CHECK: jp 0xffffffffffff7fff 0x0f 0x8a 0xff 0x7f 0xff 0xff -# CHECK: jp 32767 +# CHECK: jp 0x7fff 0x66 0x0f 0x8a 0xff 0x7f -# CHECK: jnp -32769 +# CHECK: jnp 0xffffffffffff7fff 0x0f 0x8b 0xff 0x7f 0xff 0xff -# CHECK: jnp 32767 +# CHECK: jnp 0x7fff 0x66 0x0f 0x8b 0xff 0x7f -# CHECK: jl -32769 +# CHECK: jl 0xffffffffffff7fff 0x0f 0x8c 0xff 0x7f 0xff 0xff -# CHECK: jl 32767 +# CHECK: jl 0x7fff 0x66 0x0f 0x8c 0xff 0x7f -# CHECK: jge -32769 +# CHECK: jge 0xffffffffffff7fff 0x0f 0x8d 0xff 0x7f 0xff 0xff -# CHECK: jge 32767 +# CHECK: jge 0x7fff 0x66 0x0f 0x8d 0xff 0x7f -# CHECK: jle -32769 +# CHECK: jle 0xffffffffffff7fff 0x0f 0x8e 0xff 0x7f 0xff 0xff -# CHECK: jle 32767 +# CHECK: jle 0x7fff 0x66 0x0f 0x8e 0xff 0x7f -# CHECK: jg -32769 +# CHECK: jg 0xffffffffffff7fff 0x0f 0x8f 0xff 0x7f 0xff 0xff -# CHECK: jg 32767 +# CHECK: jg 0x7fff 0x66 0x0f 0x8f 0xff 0x7f # CHECK: lcallw *-32769(%rip) @@ -482,10 +482,10 @@ # CHECK: vpandd 32(%rsi,%r14,4){1to16}, %zmm26, %zmm21 {%k4} {z} 0x62 0xa1 0x2d 0xd4 0xdb 0x6c 0xb6 0x08 -# CHECK: callq 32767 +# CHECK: callq 0x7fff 0xe8 0xff 0x7f 0x00 0x00 -# CHECK: callq -32769 +# CHECK: callq 0xffffffffffff7fff 0xe8 0xff 0x7f 0xff 0xff # CHECK: llwpcb %rax diff --git a/llvm/test/MC/X86/AlignedBundling/misaligned-bundle-group.s b/llvm/test/MC/X86/AlignedBundling/misaligned-bundle-group.s --- a/llvm/test/MC/X86/AlignedBundling/misaligned-bundle-group.s +++ b/llvm/test/MC/X86/AlignedBundling/misaligned-bundle-group.s @@ -16,8 +16,8 @@ # CHECK-RELAX: 1a: nop # CHECK-RELAX: 20: nopw %cs:(%eax,%eax) # CHECK-RELAX: 2a: nopw %cs:(%eax,%eax) -# CHECK-OPT: 1b: calll -4 -# CHECK-RELAX: 3b: calll -4 +# CHECK-OPT: 1b: calll 0x17 +# CHECK-RELAX: 3b: calll 0x37 calll bar # 5 bytes .bundle_unlock ret # 1 byte diff --git a/llvm/test/MC/X86/AlignedBundling/single-inst-bundling.s b/llvm/test/MC/X86/AlignedBundling/single-inst-bundling.s --- a/llvm/test/MC/X86/AlignedBundling/single-inst-bundling.s +++ b/llvm/test/MC/X86/AlignedBundling/single-inst-bundling.s @@ -30,8 +30,8 @@ jle .L_ELSE # Due to the padding that's inserted before the addl, the jump target # becomes farther by one byte. -# CHECK-OPT: jle 5 -# CHECK-RELAX: jle 7 +# CHECK-OPT: jle 0x22 +# CHECK-RELAX: jle 0x27 addl %ebp, %eax # CHECK-OPT: nop diff --git a/llvm/test/MC/X86/I386-32.s b/llvm/test/MC/X86/I386-32.s --- a/llvm/test/MC/X86/I386-32.s +++ b/llvm/test/MC/X86/I386-32.s @@ -176,7 +176,7 @@ // CHECK: encoding: [0x66,0xcf] iretw -// CHECK: jecxz 64 +// CHECK: jecxz 0x40 // CHECK: encoding: [0xe3,A] jecxz 64 diff --git a/llvm/test/MC/X86/I86-32.s b/llvm/test/MC/X86/I86-32.s --- a/llvm/test/MC/X86/I86-32.s +++ b/llvm/test/MC/X86/I86-32.s @@ -412,7 +412,7 @@ // CHECK: encoding: [0x66,0x83,0x22,0x00] andw $0, (%edx) -// CHECK: calll 64 +// CHECK: calll 0x40 // CHECK: encoding: [0xe8,A,A,A,A] calll 64 @@ -1028,71 +1028,71 @@ // CHECK: encoding: [0x66,0xcf] iretw -// CHECK: ja 64 +// CHECK: ja 0x40 // CHECK: encoding: [0x77,A] ja 64 -// CHECK: jae 64 +// CHECK: jae 0x40 // CHECK: encoding: [0x73,A] jae 64 -// CHECK: jb 64 +// CHECK: jb 0x40 // CHECK: encoding: [0x72,A] jb 64 -// CHECK: jbe 64 +// CHECK: jbe 0x40 // CHECK: encoding: [0x76,A] jbe 64 -// CHECK: je 64 +// CHECK: je 0x40 // CHECK: encoding: [0x74,A] je 64 -// CHECK: jg 64 +// CHECK: jg 0x40 // CHECK: encoding: [0x7f,A] jg 64 -// CHECK: jge 64 +// CHECK: jge 0x40 // CHECK: encoding: [0x7d,A] jge 64 -// CHECK: jl 64 +// CHECK: jl 0x40 // CHECK: encoding: [0x7c,A] jl 64 -// CHECK: jle 64 +// CHECK: jle 0x40 // CHECK: encoding: [0x7e,A] jle 64 -// CHECK: jmp 64 +// CHECK: jmp 0x40 // CHECK: encoding: [0xeb,A] jmp 64 -// CHECK: jne 64 +// CHECK: jne 0x40 // CHECK: encoding: [0x75,A] jne 64 -// CHECK: jno 64 +// CHECK: jno 0x40 // CHECK: encoding: [0x71,A] jno 64 -// CHECK: jnp 64 +// CHECK: jnp 0x40 // CHECK: encoding: [0x7b,A] jnp 64 -// CHECK: jns 64 +// CHECK: jns 0x40 // CHECK: encoding: [0x79,A] jns 64 -// CHECK: jo 64 +// CHECK: jo 0x40 // CHECK: encoding: [0x70,A] jo 64 -// CHECK: jp 64 +// CHECK: jp 0x40 // CHECK: encoding: [0x7a,A] jp 64 -// CHECK: js 64 +// CHECK: js 0x40 // CHECK: encoding: [0x78,A] js 64 @@ -1200,15 +1200,15 @@ // CHECK: encoding: [0x66,0x26,0xad] lodsw %es:(%esi), %ax -// CHECK: loop 64 +// CHECK: loop 0x40 // CHECK: encoding: [0xe2,A] loop 64 -// CHECK: loope 64 +// CHECK: loope 0x40 // CHECK: encoding: [0xe1,A] loope 64 -// CHECK: loopne 64 +// CHECK: loopne 0x40 // CHECK: encoding: [0xe0,A] loopne 64 diff --git a/llvm/test/MC/X86/I86-64.s b/llvm/test/MC/X86/I86-64.s --- a/llvm/test/MC/X86/I86-64.s +++ b/llvm/test/MC/X86/I86-64.s @@ -672,11 +672,11 @@ // CHECK: encoding: [0x66,0x44,0x23,0x32] andw (%rdx), %r14w -// CHECK: callq 64 +// CHECK: callq 0x40 // CHECK: encoding: [0xe8,A,A,A,A] callq 64 -// CHECK: callw 64 +// CHECK: callw 0x40 // CHECK: encoding: [0x66,0xe8,A,A] callw 64 @@ -1548,71 +1548,71 @@ // CHECK: encoding: [0x66,0xcf] iretw -// CHECK: ja 64 +// CHECK: ja 0x40 // CHECK: encoding: [0x77,A] ja 64 -// CHECK: jae 64 +// CHECK: jae 0x40 // CHECK: encoding: [0x73,A] jae 64 -// CHECK: jb 64 +// CHECK: jb 0x40 // CHECK: encoding: [0x72,A] jb 64 -// CHECK: jbe 64 +// CHECK: jbe 0x40 // CHECK: encoding: [0x76,A] jbe 64 -// CHECK: je 64 +// CHECK: je 0x40 // CHECK: encoding: [0x74,A] je 64 -// CHECK: jg 64 +// CHECK: jg 0x40 // CHECK: encoding: [0x7f,A] jg 64 -// CHECK: jge 64 +// CHECK: jge 0x40 // CHECK: encoding: [0x7d,A] jge 64 -// CHECK: jl 64 +// CHECK: jl 0x40 // CHECK: encoding: [0x7c,A] jl 64 -// CHECK: jle 64 +// CHECK: jle 0x40 // CHECK: encoding: [0x7e,A] jle 64 -// CHECK: jmp 64 +// CHECK: jmp 0x40 // CHECK: encoding: [0xeb,A] jmp 64 -// CHECK: jne 64 +// CHECK: jne 0x40 // CHECK: encoding: [0x75,A] jne 64 -// CHECK: jno 64 +// CHECK: jno 0x40 // CHECK: encoding: [0x71,A] jno 64 -// CHECK: jnp 64 +// CHECK: jnp 0x40 // CHECK: encoding: [0x7b,A] jnp 64 -// CHECK: jns 64 +// CHECK: jns 0x40 // CHECK: encoding: [0x79,A] jns 64 -// CHECK: jo 64 +// CHECK: jo 0x40 // CHECK: encoding: [0x70,A] jo 64 -// CHECK: jp 64 +// CHECK: jp 0x40 // CHECK: encoding: [0x7a,A] jp 64 -// CHECK: js 64 +// CHECK: js 0x40 // CHECK: encoding: [0x78,A] js 64 @@ -1648,15 +1648,15 @@ // CHECK: encoding: [0x66,0x65,0xad] lodsw %gs:(%rsi), %ax -// CHECK: loop 64 +// CHECK: loop 0x40 // CHECK: encoding: [0xe2,A] loop 64 -// CHECK: loope 64 +// CHECK: loope 0x40 // CHECK: encoding: [0xe1,A] loope 64 -// CHECK: loopne 64 +// CHECK: loopne 0x40 // CHECK: encoding: [0xe0,A] loopne 64 diff --git a/llvm/test/MC/X86/RTM.s b/llvm/test/MC/X86/RTM.s --- a/llvm/test/MC/X86/RTM.s +++ b/llvm/test/MC/X86/RTM.s @@ -4,7 +4,7 @@ // CHECK: encoding: [0xc6,0xf8,0x00] xabort $0 -// CHECK: xbegin 64 +// CHECK: xbegin 0x40 // CHECK: encoding: [0xc7,0xf8,A,A,A,A] xbegin 64 diff --git a/llvm/test/MC/X86/align-via-padding.s b/llvm/test/MC/X86/align-via-padding.s --- a/llvm/test/MC/X86/align-via-padding.s +++ b/llvm/test/MC/X86/align-via-padding.s @@ -35,12 +35,12 @@ # fewer nops by relaxing the branch, even though we don't need to # CHECK: : # CHECK: 45: 48 85 c0 testq %rax, %rax - # CHECK: 48: 2e 2e 2e 2e 0f 8e 1e 00 00 00 jle 30 + # CHECK: 48: 2e 2e 2e 2e 0f 8e 1e 00 00 00 jle 0x66 # CHECK: 52: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:(%rax,%rax) # CHECK: : # CHECK: 60: 48 83 e8 01 subq $1, %rax # CHECK: 64: 48 85 c0 testq %rax, %rax - # CHECK: 67: 7e 07 jle 7 + # CHECK: 67: 7e 07 jle 0x6e # CHECK: 69: 2e 2e e9 f0 ff ff ff jmp # CHECK: : # CHECK: 70: c3 retq @@ -62,7 +62,7 @@ # Correctness cornercase - can't prefix pad jmp without having relaxed it # first as doing so would make the relative offset too large # CHECK: fd: cc int3 - # CHECK: fe: eb 80 jmp -128 + # CHECK: fe: eb 80 jmp 0x7e # CHECK: 100: cc int3 .p2align 5 .L1: diff --git a/llvm/test/MC/X86/align-via-relaxation.s b/llvm/test/MC/X86/align-via-relaxation.s --- a/llvm/test/MC/X86/align-via-relaxation.s +++ b/llvm/test/MC/X86/align-via-relaxation.s @@ -9,13 +9,13 @@ # Demonstrate that we can relax instructions to provide padding, not # just insert nops. jmps are being used for ease of demonstration. # CHECK: .text - # CHECK: 0: eb 1f jmp 31 - # CHECK: 2: e9 1a 00 00 00 jmp 26 - # CHECK: 7: e9 15 00 00 00 jmp 21 - # CHECK: c: e9 10 00 00 00 jmp 16 - # CHECK: 11: e9 0b 00 00 00 jmp 11 - # CHECK: 16: e9 06 00 00 00 jmp 6 - # CHECK: 1b: e9 01 00 00 00 jmp 1 + # CHECK: 0: eb 1f jmp 0x1f + # CHECK: 2: e9 1a 00 00 00 jmp 0x1c + # CHECK: 7: e9 15 00 00 00 jmp 0x1c + # CHECK: c: e9 10 00 00 00 jmp 0x1c + # CHECK: 11: e9 0b 00 00 00 jmp 0x1c + # CHECK: 16: e9 06 00 00 00 jmp 0x1c + # CHECK: 1b: e9 01 00 00 00 jmp 0x1c # CHECK: 20: cc int3 .p2align 4 jmp foo @@ -33,7 +33,7 @@ # Check that we're not shifting aroudn the offsets of labels - doing # that would require a further round of relaxation # CHECK: : - # CHECK: 22: eb fe jmp -2 + # CHECK: 22: eb fe jmp 0x20 # CHECK: 24: 66 66 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:(%rax,%rax) # CHECK: 30: 0f 0b ud2 @@ -48,14 +48,14 @@ # fewer nops by relaxing the branch, even though we don't need to # CHECK: : # CHECK: 45: 48 85 c0 testq %rax, %rax - # CHECK: 48: 0f 8e 22 00 00 00 jle 34 + # CHECK: 48: 0f 8e 22 00 00 00 jle 0x6a # CHECK: 4e: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:(%rax,%rax) # CHECK: 5d: 0f 1f 00 nopl (%rax) # CHECK: : # CHECK: 60: 48 83 e8 01 subq $1, %rax # CHECK: 64: 48 85 c0 testq %rax, %rax - # CHECK: 67: 7e 07 jle 7 - # CHECK: 69: e9 f2 ff ff ff jmp -14 + # CHECK: 67: 7e 07 jle 0x6e + # CHECK: 69: e9 f2 ff ff ff jmp 0x5b # CHECK: 6e: 66 90 nop # CHECK: : # CHECK: 70: c3 retq diff --git a/llvm/test/MC/X86/x86-32-coverage.s b/llvm/test/MC/X86/x86-32-coverage.s --- a/llvm/test/MC/X86/x86-32-coverage.s +++ b/llvm/test/MC/X86/x86-32-coverage.s @@ -10200,13 +10200,13 @@ // CHECK: rcrb $127, 305419896 rcrb $0x7f,0x12345678 -// CHECK: calll 3133065982 +// CHECK: calll 0xbabecafe calll 0xbabecafe // CHECK: calll *3735928559(%ebx,%ecx,8) calll *0xdeadbeef(%ebx,%ecx,8) -// CHECK: calll 305419896 +// CHECK: calll 0x12345678 calll 0x12345678 // CHECK: calll *3135175374 @@ -10215,13 +10215,13 @@ // CHECK: calll *3735928559(%ebx,%ecx,8) call *0xdeadbeef(%ebx,%ecx,8) -// CHECK: calll 32493 +// CHECK: calll 0x7eed call 0x7eed -// CHECK: calll 3133065982 +// CHECK: calll 0xbabecafe call 0xbabecafe -// CHECK: calll 305419896 +// CHECK: calll 0x12345678 call 0x12345678 // CHECK: calll *3135175374 @@ -10230,25 +10230,25 @@ // CHECK: lcallw *32493 lcallw *0x7eed -// CHECK: jmp 32493 +// CHECK: jmp 0x7eed jmp 0x7eed -// CHECK: jmp 3133065982 +// CHECK: jmp 0xbabecafe jmp 0xbabecafe -// CHECK: jmp 305419896 +// CHECK: jmp 0x12345678 jmp 0x12345678 // CHECK: jmpl *3735928559(%ebx,%ecx,8) jmp *0xdeadbeef(%ebx,%ecx,8) -// CHECK: jmp 32493 +// CHECK: jmp 0x7eed jmp 0x7eed -// CHECK: jmp 3133065982 +// CHECK: jmp 0xbabecafe jmp 0xbabecafe -// CHECK: jmp 305419896 +// CHECK: jmp 0x12345678 jmp 0x12345678 // CHECK: jmpl *3135175374 @@ -10257,13 +10257,13 @@ // CHECK: jmpl *3735928559(%ebx,%ecx,8) jmp *0xdeadbeef(%ebx,%ecx,8) -// CHECK: jmp 32493 +// CHECK: jmp 0x7eed jmp 0x7eed -// CHECK: jmp 3133065982 +// CHECK: jmp 0xbabecafe jmp 0xbabecafe -// CHECK: jmp 305419896 +// CHECK: jmp 0x12345678 jmp 0x12345678 // CHECK: jmpl *3135175374 @@ -10284,148 +10284,148 @@ // CHECK: enter $31438, $127 enter $0x7ace,$0x7f -// CHECK: jo 32493 +// CHECK: jo 0x7eed jo 0x7eed -// CHECK: jo 3133065982 +// CHECK: jo 0xbabecafe jo 0xbabecafe -// CHECK: jo 305419896 +// CHECK: jo 0x12345678 jo 0x12345678 -// CHECK: jno 32493 +// CHECK: jno 0x7eed jno 0x7eed -// CHECK: jno 3133065982 +// CHECK: jno 0xbabecafe jno 0xbabecafe -// CHECK: jno 305419896 +// CHECK: jno 0x12345678 jno 0x12345678 -// CHECK: jb 32493 +// CHECK: jb 0x7eed jb 0x7eed -// CHECK: jb 3133065982 +// CHECK: jb 0xbabecafe jb 0xbabecafe -// CHECK: jb 305419896 +// CHECK: jb 0x12345678 jb 0x12345678 -// CHECK: jae 32493 +// CHECK: jae 0x7eed jae 0x7eed -// CHECK: jae 3133065982 +// CHECK: jae 0xbabecafe jae 0xbabecafe -// CHECK: jae 305419896 +// CHECK: jae 0x12345678 jae 0x12345678 -// CHECK: je 32493 +// CHECK: je 0x7eed je 0x7eed -// CHECK: je 3133065982 +// CHECK: je 0xbabecafe je 0xbabecafe -// CHECK: je 305419896 +// CHECK: je 0x12345678 je 0x12345678 -// CHECK: jne 32493 +// CHECK: jne 0x7eed jne 0x7eed -// CHECK: jne 3133065982 +// CHECK: jne 0xbabecafe jne 0xbabecafe -// CHECK: jne 305419896 +// CHECK: jne 0x12345678 jne 0x12345678 -// CHECK: jbe 32493 +// CHECK: jbe 0x7eed jbe 0x7eed -// CHECK: jbe 3133065982 +// CHECK: jbe 0xbabecafe jbe 0xbabecafe -// CHECK: jbe 305419896 +// CHECK: jbe 0x12345678 jbe 0x12345678 -// CHECK: ja 32493 +// CHECK: ja 0x7eed ja 0x7eed -// CHECK: ja 3133065982 +// CHECK: ja 0xbabecafe ja 0xbabecafe -// CHECK: ja 305419896 +// CHECK: ja 0x12345678 ja 0x12345678 -// CHECK: js 32493 +// CHECK: js 0x7eed js 0x7eed -// CHECK: js 3133065982 +// CHECK: js 0xbabecafe js 0xbabecafe -// CHECK: js 305419896 +// CHECK: js 0x12345678 js 0x12345678 -// CHECK: jns 32493 +// CHECK: jns 0x7eed jns 0x7eed -// CHECK: jns 3133065982 +// CHECK: jns 0xbabecafe jns 0xbabecafe -// CHECK: jns 305419896 +// CHECK: jns 0x12345678 jns 0x12345678 -// CHECK: jp 32493 +// CHECK: jp 0x7eed jp 0x7eed -// CHECK: jp 3133065982 +// CHECK: jp 0xbabecafe jp 0xbabecafe -// CHECK: jp 305419896 +// CHECK: jp 0x12345678 jp 0x12345678 -// CHECK: jnp 32493 +// CHECK: jnp 0x7eed jnp 0x7eed -// CHECK: jnp 3133065982 +// CHECK: jnp 0xbabecafe jnp 0xbabecafe -// CHECK: jnp 305419896 +// CHECK: jnp 0x12345678 jnp 0x12345678 -// CHECK: jl 32493 +// CHECK: jl 0x7eed jl 0x7eed -// CHECK: jl 3133065982 +// CHECK: jl 0xbabecafe jl 0xbabecafe -// CHECK: jl 305419896 +// CHECK: jl 0x12345678 jl 0x12345678 -// CHECK: jge 32493 +// CHECK: jge 0x7eed jge 0x7eed -// CHECK: jge 3133065982 +// CHECK: jge 0xbabecafe jge 0xbabecafe -// CHECK: jge 305419896 +// CHECK: jge 0x12345678 jge 0x12345678 -// CHECK: jle 32493 +// CHECK: jle 0x7eed jle 0x7eed -// CHECK: jle 3133065982 +// CHECK: jle 0xbabecafe jle 0xbabecafe -// CHECK: jle 305419896 +// CHECK: jle 0x12345678 jle 0x12345678 -// CHECK: jg 32493 +// CHECK: jg 0x7eed jg 0x7eed -// CHECK: jg 3133065982 +// CHECK: jg 0xbabecafe jg 0xbabecafe -// CHECK: jg 305419896 +// CHECK: jg 0x12345678 jg 0x12345678 // CHECK: int $127 diff --git a/llvm/test/MC/X86/x86-branch-relaxation.s b/llvm/test/MC/X86/x86-branch-relaxation.s --- a/llvm/test/MC/X86/x86-branch-relaxation.s +++ b/llvm/test/MC/X86/x86-branch-relaxation.s @@ -24,8 +24,8 @@ // CHECK16-LABEL: bar16 -// CHECK16-NEXT: e9 fe ff jmp -2 +// CHECK16-NEXT: e9 fe ff jmp 0xfffffffe // CHECK32-LABEL: baz32 -// CHECK32-NEXT: e9 fc ff ff ff jmp -4 +// CHECK32-NEXT: e9 fc ff ff ff jmp 0xfffffffc diff --git a/llvm/test/MC/X86/x86_64-encoding.s b/llvm/test/MC/X86/x86_64-encoding.s --- a/llvm/test/MC/X86/x86_64-encoding.s +++ b/llvm/test/MC/X86/x86_64-encoding.s @@ -1,7 +1,7 @@ // RUN: llvm-mc -triple x86_64-unknown-unknown --show-encoding %s | FileCheck %s // PR7195 -// CHECK: callw 42 +// CHECK: callw 0x2a // CHECK: encoding: [0x66,0xe8,A,A] callw 42 diff --git a/llvm/test/Object/X86/objdump-disassembly-inline-relocations.test b/llvm/test/Object/X86/objdump-disassembly-inline-relocations.test --- a/llvm/test/Object/X86/objdump-disassembly-inline-relocations.test +++ b/llvm/test/Object/X86/objdump-disassembly-inline-relocations.test @@ -42,9 +42,9 @@ # MACHO-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) # MACHO-i386: b: c7 04 24 24 00 00 00 movl $36, (%esp) # MACHO-i386: e: GENERIC_RELOC_VANILLA __cstring -# MACHO-i386: 12: e8 1f 00 00 00 calll 31 +# MACHO-i386: 12: e8 1f 00 00 00 calll 0x31 # MACHO-i386: 13: GENERIC_RELOC_VANILLA __jump_table -# MACHO-i386: 17: e8 15 00 00 00 calll 21 +# MACHO-i386: 17: e8 15 00 00 00 calll 0x2c # MACHO-i386: 18: GENERIC_RELOC_VANILLA __jump_table # MACHO-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax # MACHO-i386: 20: 83 c4 0c addl $12, %esp @@ -79,9 +79,9 @@ # ELF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) # ELF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp) # ELF-i386: e: R_386_32 .rodata.str1.1 -# ELF-i386: 12: e8 fc ff ff ff calll -4 +# ELF-i386: 12: e8 fc ff ff ff calll 0xe # ELF-i386: 13: R_386_PC32 puts -# ELF-i386: 17: e8 fc ff ff ff calll -4 +# ELF-i386: 17: e8 fc ff ff ff calll 0x13 # ELF-i386: 18: R_386_PC32 SomeOtherFunction # ELF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax # ELF-i386: 20: 83 c4 0c addl $12, %esp diff --git a/llvm/test/Object/X86/objdump-trivial-object.test b/llvm/test/Object/X86/objdump-trivial-object.test --- a/llvm/test/Object/X86/objdump-trivial-object.test +++ b/llvm/test/Object/X86/objdump-trivial-object.test @@ -34,8 +34,8 @@ # ELF-i386: 0: 83 ec 0c subl $12, %esp # ELF-i386: 3: c7 44 24 08 00 00 00 00 movl $0, 8(%esp) # ELF-i386: b: c7 04 24 00 00 00 00 movl $0, (%esp) -# ELF-i386: 12: e8 fc ff ff ff calll -4 -# ELF-i386: 17: e8 fc ff ff ff calll -4 +# ELF-i386: 12: e8 fc ff ff ff calll 0xe +# ELF-i386: 17: e8 fc ff ff ff calll 0x13 # ELF-i386: 1c: 8b 44 24 08 movl 8(%esp), %eax # ELF-i386: 20: 83 c4 0c addl $12, %esp # ELF-i386: 23: c3 ret diff --git a/llvm/test/tools/llvm-mca/X86/show-encoding.s b/llvm/test/tools/llvm-mca/X86/show-encoding.s --- a/llvm/test/tools/llvm-mca/X86/show-encoding.s +++ b/llvm/test/tools/llvm-mca/X86/show-encoding.s @@ -55,7 +55,7 @@ # NORMAL-NEXT: 1 1 0.50 vshufps $255, %xmm9, %xmm9, %xmm0 # NORMAL-NEXT: 1 1 1.00 * vmovups %xmm9, (%r11,%r9,4) # NORMAL-NEXT: 1 1 0.50 cmpl %r8d, %esi -# NORMAL-NEXT: 1 1 0.50 jl -90 +# NORMAL-NEXT: 1 1 0.50 jl 0xffffffffffffffa6 # WITHENCODINGS: [1] [2] [3] [4] [5] [6] [7] Encodings: Instructions: # WITHENCODINGS-NEXT: 1 3 1.00 * 7 4c 8b 95 70 01 00 00 movq 368(%rbp), %r10 @@ -74,4 +74,4 @@ # WITHENCODINGS-NEXT: 1 1 0.50 6 c4 c1 30 c6 c1 ff vshufps $255, %xmm9, %xmm9, %xmm0 # WITHENCODINGS-NEXT: 1 1 1.00 * 6 c4 01 78 11 0c 8b vmovups %xmm9, (%r11,%r9,4) # WITHENCODINGS-NEXT: 1 1 0.50 3 44 39 c6 cmpl %r8d, %esi -# WITHENCODINGS-NEXT: 1 1 0.50 6 0f 8c 00 00 00 00 jl -90 +# WITHENCODINGS-NEXT: 1 1 0.50 6 0f 8c 00 00 00 00 jl 0xffffffffffffffa6 diff --git a/llvm/test/tools/llvm-objdump/ELF/call-absolute-symbol.test b/llvm/test/tools/llvm-objdump/ELF/call-absolute-symbol.test --- a/llvm/test/tools/llvm-objdump/ELF/call-absolute-symbol.test +++ b/llvm/test/tools/llvm-objdump/ELF/call-absolute-symbol.test @@ -1,3 +1,3 @@ // REQUIRES: x86_64-linux // RUN: llvm-objdump -d %p/Inputs/call-absolute-symbol.elf-x86_64 | FileCheck %s -CHECK: 201000: e8 fb f0 df ff callq -2100997 +CHECK: 201000: e8 fb f0 df ff callq 0xfb diff --git a/llvm/test/tools/llvm-objdump/MachO/hex-displacement.test b/llvm/test/tools/llvm-objdump/MachO/hex-displacement.test --- a/llvm/test/tools/llvm-objdump/MachO/hex-displacement.test +++ b/llvm/test/tools/llvm-objdump/MachO/hex-displacement.test @@ -3,4 +3,4 @@ # RUN: llvm-objdump -d %p/Inputs/hello.exe.macho-i386 | FileCheck %s -# CHECK: 1f47: e8 00 00 00 00 calll 0 <_main+0xc> +# CHECK: 1f47: e8 00 00 00 00 calll 0x1f47 <_main+0xc> diff --git a/llvm/test/tools/llvm-objdump/X86/coff-disassemble-export.test b/llvm/test/tools/llvm-objdump/X86/coff-disassemble-export.test --- a/llvm/test/tools/llvm-objdump/X86/coff-disassemble-export.test +++ b/llvm/test/tools/llvm-objdump/X86/coff-disassemble-export.test @@ -2,7 +2,7 @@ // RUN: FileCheck %s // CHECK-LABEL: : -// CHECK: calll 8 +// CHECK: calll 0x1000100b // CHECK-LABEL: f: -// CHECK: calll -24 +// CHECK: calll 0x10000ffb diff --git a/llvm/test/tools/llvm-objdump/X86/demangle.s b/llvm/test/tools/llvm-objdump/X86/demangle.s --- a/llvm/test/tools/llvm-objdump/X86/demangle.s +++ b/llvm/test/tools/llvm-objdump/X86/demangle.s @@ -11,7 +11,7 @@ ## Check the case when relocations are inlined into disassembly. # RUN: llvm-objdump -d -r --demangle %t | FileCheck %s --check-prefix=INLINE # INLINE: : -# INLINE-NEXT: 0: {{.*}} callq 0 <_Z3foov+0x5> +# INLINE-NEXT: 0: {{.*}} callq 0x0 <_Z3foov+0x5> # INLINE-NEXT: 0000000000000001: R_X86_64_PLT32 foo()-0x4 .text diff --git a/llvm/test/tools/llvm-objdump/X86/elf-disassemble-no-symtab.test b/llvm/test/tools/llvm-objdump/X86/elf-disassemble-no-symtab.test --- a/llvm/test/tools/llvm-objdump/X86/elf-disassemble-no-symtab.test +++ b/llvm/test/tools/llvm-objdump/X86/elf-disassemble-no-symtab.test @@ -8,7 +8,7 @@ # CHECK: Disassembly of section .text: # CHECK-EMPTY: # CHECK-NEXT: 0000000000004000 <.text>: -# CHECK-NEXT: 4000: e8 42 00 00 00 callq 66 <.text+0x47> +# CHECK-NEXT: 4000: e8 42 00 00 00 callq 0x4042 <.text+0x47> --- !ELF FileHeader: diff --git a/llvm/test/tools/llvm-objdump/X86/elf-disassemble-relocs.test b/llvm/test/tools/llvm-objdump/X86/elf-disassemble-relocs.test --- a/llvm/test/tools/llvm-objdump/X86/elf-disassemble-relocs.test +++ b/llvm/test/tools/llvm-objdump/X86/elf-disassemble-relocs.test @@ -4,10 +4,10 @@ # RUN: yaml2obj %s --docnum=1 -o %t1.o # RUN: llvm-objdump %t1.o -d -r | FileCheck %s --implicit-check-not="RELOCATION RECORDS" -# CHECK: 0: e8 00 00 00 00 callq 0 <.text+0x5> +# CHECK: 0: e8 00 00 00 00 callq 0x0 <.text+0x5> # CHECK-NEXT: 0000000000000001: R_X86_64_PC32 foo-0x4 # CHECK-NEXT: 0000000000000002: R_X86_64_NONE bar+0x8 -# CHECK-NEXT: 5: e8 00 00 00 00 callq 0 <.text+0xa> +# CHECK-NEXT: 5: e8 00 00 00 00 callq 0x5 <.text+0xa> # CHECK-NEXT: 0000000000000006: R_X86_64_PLT32 foo+0x1 --- !ELF diff --git a/llvm/test/tools/llvm-objdump/X86/elf-disassemble-symbol-references.yaml b/llvm/test/tools/llvm-objdump/X86/elf-disassemble-symbol-references.yaml --- a/llvm/test/tools/llvm-objdump/X86/elf-disassemble-symbol-references.yaml +++ b/llvm/test/tools/llvm-objdump/X86/elf-disassemble-symbol-references.yaml @@ -3,9 +3,9 @@ # RUN: llvm-objdump %t -d | FileCheck %s --check-prefix=EXEC # EXEC: Disassembly of section .text1: -# EXEC: 4000: e8 00 00 00 00 callq 0 +# EXEC: 4000: e8 00 00 00 00 callq 0x4000 # EXEC: Disassembly of section .text2: -# EXEC: 4005: e8 12 34 56 78 callq 2018915346 +# EXEC: 4005: e8 12 34 56 78 callq 0x78567417 --- !ELF FileHeader: @@ -48,17 +48,17 @@ # REL: Disassembly of section .text1: # REL-EMPTY: # REL-NEXT: 0000000000000000 <.text1>: -# REL-NEXT: 0: e8 00 00 00 00 callq 0 <.text1+0x5> +# REL-NEXT: 0: e8 00 00 00 00 callq 0x0 <.text1+0x5> # REL-EMPTY: # REL-NEXT: Disassembly of section .text2: # REL-EMPTY: # REL-NEXT: 0000000000000000 <.text2>: -# REL-NEXT: 0: e8 00 00 00 00 callq 0 +# REL-NEXT: 0: e8 00 00 00 00 callq 0x0 # REL-EMPTY: # REL-NEXT: Disassembly of section .text3: # REL-EMPTY: # REL-NEXT: 0000000000000000 <.text3>: -# REL-NEXT: 0: e8 00 00 00 00 callq 0 <.text3+0x5> +# REL-NEXT: 0: e8 00 00 00 00 callq 0x0 <.text3+0x5> --- !ELF FileHeader: diff --git a/llvm/test/tools/llvm-objdump/X86/section-filter-relocs.test b/llvm/test/tools/llvm-objdump/X86/section-filter-relocs.test --- a/llvm/test/tools/llvm-objdump/X86/section-filter-relocs.test +++ b/llvm/test/tools/llvm-objdump/X86/section-filter-relocs.test @@ -10,7 +10,7 @@ # DISASM: Disassembly of section .text: # DISASM-EMPTY: # DISASM-NEXT: 0000000000000400 <.text>: -# DISASM-NEXT: 400: e8 00 00 00 00 callq 0 <.text+0x5> +# DISASM-NEXT: 400: e8 00 00 00 00 callq 0x400 <.text+0x5> # RELOC-NEXT: 00000401: R_X86_64_PC32 foo+0x1 # RELOC-NEXT: 00000401: R_X86_64_GOT32 foo # DISASM: Disassembly of section .rodata: