Skip to content

Commit bf0d76d

Browse files
committed
[MC,test] Reorganize relax-recompute-align.s & layout-interdependency.s
relax-recompute-align.s might change when we change the fragment relaxation approach.
1 parent 4403cdb commit bf0d76d

File tree

3 files changed

+23
-42
lines changed

3 files changed

+23
-42
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// RUN: llvm-mc -filetype=obj -triple i386 %s -o - | llvm-objdump -d --no-show-raw-insn - | FileCheck %s
2+
3+
// This is a case where llvm-mc computes a better layout than Darwin 'as'. This
4+
// issue is that after the first jmp slides, the .align size must be
5+
// recomputed -- otherwise the second jump will appear to be out-of-range for a
6+
// 1-byte jump.
7+
8+
// CHECK: int3
9+
// CHECK-NEXT: ce: int3
10+
// CHECK: d0: pushal
11+
// CHECK: 130: jl 0xd0
12+
13+
L0:
14+
.space 0x8a, 0x90
15+
jmp L0
16+
.space (0xb3 - 0x8f), 0x90
17+
jle L2
18+
.space (0xcd - 0xb5), 0x90
19+
.p2align 4, 0xcc
20+
L1:
21+
.space (0x130 - 0xd0),0x60
22+
jl L1
23+
L2:

llvm/test/MC/MachO/relax-recompute-align.s

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)