xref: /llvm-project/llvm/test/MC/ELF/relax-recompute-align.s (revision 9d0754ada5dbbc0c009bcc2f7824488419cc5530)
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 the computed layout is not optimal. The
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:  d2:  int3
10// CHECK:       e0:  pushal
11// CHECK:      140:  jl      0xe0
12
13L0:
14        .space 0x8a, 0x90
15	jmp	L0
16        .space (0xb3 - 0x8f), 0x90
17	jle	L2
18        .space (0xcd - 0xb5), 0x90
19	.p2align 4, 0xcc
20L1:
21        .space (0x130 - 0xd0),0x60
22	jl	L1
23L2:
24