diff options
| author | Lang Hames <lhames@gmail.com> | 2016-03-15 01:43:05 +0000 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2016-03-15 01:43:05 +0000 |
| commit | 1b640e05ba57e805ed00831771b75cd2e617f656 (patch) | |
| tree | fcc141a61034a512698448e79a382c32963b7ec1 /llvm/test/MC/MachO/variable-exprs.s | |
| parent | cdbac995518f20653bc89cc992592ee510ac0873 (diff) | |
| download | bcm5719-llvm-1b640e05ba57e805ed00831771b75cd2e617f656.tar.gz bcm5719-llvm-1b640e05ba57e805ed00831771b75cd2e617f656.zip | |
[MachO] Add MachO alt-entry directive support.
This patch adds support for the MachO .alt_entry assembly directive, and uses
it for global aliases with non-zero GEP offsets. The alt_entry flag indicates
that a symbol should be layed out immediately after the preceding symbol.
Conceptually it introduces an alternate entry point for a function or data
structure. E.g.:
safe_foo:
// check preconditions for foo
.alt_entry fast_foo
fast_foo:
// body of foo, can assume preconditions.
The .alt_entry flag is also implicitly set on assembly aliases of the form:
a = b + C
where C is a non-zero constant, since these have the same effect as an
alt_entry symbol: they introduce a label that cannot be moved relative to the
preceding one. Setting the alt_entry flag on aliases of this form fixes
http://llvm.org/PR25381.
llvm-svn: 263521
Diffstat (limited to 'llvm/test/MC/MachO/variable-exprs.s')
| -rw-r--r-- | llvm/test/MC/MachO/variable-exprs.s | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/test/MC/MachO/variable-exprs.s b/llvm/test/MC/MachO/variable-exprs.s index 85f395fd3be..5369622d8cf 100644 --- a/llvm/test/MC/MachO/variable-exprs.s +++ b/llvm/test/MC/MachO/variable-exprs.s @@ -151,7 +151,7 @@ Lt0_x = Lt0_a - Lt0_b // CHECK-I386: Type: Section (0xE) // CHECK-I386: Section: __data (0x2) // CHECK-I386: RefType: UndefinedNonLazy (0x0) -// CHECK-I386: Flags [ (0x0) +// CHECK-I386: Flags [ (0x200) // CHECK-I386: ] // CHECK-I386: Value: 0x9 // CHECK-I386: } @@ -208,7 +208,7 @@ Lt0_x = Lt0_a - Lt0_b // CHECK-I386: Type: Undef (0x0) // CHECK-I386: Section: (0x0) // CHECK-I386: RefType: UndefinedNonLazy (0x0) -// CHECK-I386: Flags [ (0x0) +// CHECK-I386: Flags [ (0x200) // CHECK-I386: ] // CHECK-I386: Value: 0x0 // CHECK-I386: } @@ -360,7 +360,7 @@ Lt0_x = Lt0_a - Lt0_b // CHECK-X86_64: Type: Section (0xE) // CHECK-X86_64: Section: __data (0x2) // CHECK-X86_64: RefType: UndefinedNonLazy (0x0) -// CHECK-X86_64: Flags [ (0x0) +// CHECK-X86_64: Flags [ (0x200) // CHECK-X86_64: ] // CHECK-X86_64: Value: 0x9 // CHECK-X86_64: } @@ -417,7 +417,7 @@ Lt0_x = Lt0_a - Lt0_b // CHECK-X86_64: Type: Undef (0x0) // CHECK-X86_64: Section: (0x0) // CHECK-X86_64: RefType: UndefinedNonLazy (0x0) -// CHECK-X86_64: Flags [ (0x0) +// CHECK-X86_64: Flags [ (0x200) // CHECK-X86_64: ] // CHECK-X86_64: Value: 0x0 // CHECK-X86_64: } |

