diff options
| author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-06-08 20:49:03 +0000 |
|---|---|---|
| committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-06-08 20:49:03 +0000 |
| commit | 60d411b66e90be73d800fcc0235d5ae8afd0264d (patch) | |
| tree | a7ea6b2ad2f6d8874622f7968f433de8ee23be60 /llvm/test | |
| parent | bc6d8b0f513c050c481d4c6d486edde04a31044e (diff) | |
| download | bcm5719-llvm-60d411b66e90be73d800fcc0235d5ae8afd0264d.tar.gz bcm5719-llvm-60d411b66e90be73d800fcc0235d5ae8afd0264d.zip | |
[MachO] Fix codegen of alias of alias.
Fixes PR33316.
llvm-svn: 305012
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/MC/MachO/alias.s | 12 | ||||
| -rw-r--r-- | llvm/test/MC/MachO/variable-exprs.s | 8 |
2 files changed, 16 insertions, 4 deletions
diff --git a/llvm/test/MC/MachO/alias.s b/llvm/test/MC/MachO/alias.s new file mode 100644 index 00000000000..aec04c63b68 --- /dev/null +++ b/llvm/test/MC/MachO/alias.s @@ -0,0 +1,12 @@ +// RUN: llvm-mc -triple x86_64-apple-macosx10.12.0 %s -filetype=obj | llvm-readobj -r | FileCheck %s + +l_a: +l_b = l_a +l_c = l_b + .long l_c + +// CHECK: Relocations [ +// CHECK-NEXT: Section __text { +// CHECK-NEXT: 0x0 0 2 1 X86_64_RELOC_UNSIGNED 0 l_c +// CHECK-NEXT: } +// CHECK-NEXT: ] diff --git a/llvm/test/MC/MachO/variable-exprs.s b/llvm/test/MC/MachO/variable-exprs.s index 5369622d8cf..380e7e75cc7 100644 --- a/llvm/test/MC/MachO/variable-exprs.s +++ b/llvm/test/MC/MachO/variable-exprs.s @@ -110,8 +110,8 @@ Lt0_x = Lt0_a - Lt0_b // CHECK-I386: 0x2C 0 2 0 GENERIC_RELOC_VANILLA 0 __data // CHECK-I386: 0x28 0 2 0 GENERIC_RELOC_VANILLA 0 __data // CHECK-I386: 0x24 0 2 1 GENERIC_RELOC_VANILLA 0 d3 -// CHECK-I386: 0x20 0 2 1 GENERIC_RELOC_VANILLA 0 d2 -// CHECK-I386: 0x1C 0 2 1 GENERIC_RELOC_VANILLA 0 d +// CHECK-I386: 0x20 0 2 1 GENERIC_RELOC_VANILLA 0 d{{$}} +// CHECK-I386: 0x1C 0 2 1 GENERIC_RELOC_VANILLA 0 d{{$}} // CHECK-I386: 0x18 0 2 n/a GENERIC_RELOC_VANILLA 1 0x5 // CHECK-I386: 0x14 0 2 0 GENERIC_RELOC_VANILLA 0 __data // CHECK-I386: 0x10 0 2 0 GENERIC_RELOC_VANILLA 0 __data @@ -319,8 +319,8 @@ Lt0_x = Lt0_a - Lt0_b // CHECK-X86_64: 0x2C 0 2 1 X86_64_RELOC_UNSIGNED 0 g // CHECK-X86_64: 0x28 0 2 1 X86_64_RELOC_UNSIGNED 0 f // CHECK-X86_64: 0x24 0 2 1 X86_64_RELOC_UNSIGNED 0 d3 -// CHECK-X86_64: 0x20 0 2 1 X86_64_RELOC_UNSIGNED 0 d2 -// CHECK-X86_64: 0x1C 0 2 1 X86_64_RELOC_UNSIGNED 0 d +// CHECK-X86_64: 0x20 0 2 1 X86_64_RELOC_UNSIGNED 0 d{{$}} +// CHECK-X86_64: 0x1C 0 2 1 X86_64_RELOC_UNSIGNED 0 d{{$}} // CHECK-X86_64: 0x18 0 2 1 X86_64_RELOC_UNSIGNED 0 a // CHECK-X86_64: 0x14 0 2 1 X86_64_RELOC_UNSIGNED 0 e // CHECK-X86_64: 0x10 0 2 1 X86_64_RELOC_UNSIGNED 0 b |

