Heuristic: If the number of operands in the alias are more than the number of
[llvm/stm8.git] / test / MC / MachO / relax-recompute-align.s
blob249402502f714787d8493731a3f639fcd60fdec6
1 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s
3 // FIXME: This is a horrible way of checking the output, we need an llvm-mc
4 // based 'otool'.
6 // This is a case where llvm-mc computes a better layout than Darwin 'as'. This
7 // issue is that after the first jmp slides, the .align size must be
8 // recomputed -- otherwise the second jump will appear to be out-of-range for a
9 // 1-byte jump.
11 // CHECK: # Section 0
12 // CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
13 // CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
14 // CHECK: ('address', 0)
15 // CHECK: ('size', 306)
16 // CHECK: ('offset', 324)
17 // CHECK: ('alignment', 4)
18 // CHECK: ('reloc_offset', 0)
19 // CHECK: ('num_reloc', 0)
20 // CHECK: ('flags', 0x80000400)
21 // CHECK: ('reserved1', 0)
22 // CHECK: ('reserved2', 0)
23 // CHECK: ),
25 L0:
26 .space 0x8a, 0x90
27 jmp L0
28 .space (0xb3 - 0x8f), 0x90
29 jle L2
30 .space (0xcd - 0xb5), 0x90
31 .align 4, 0x90
32 L1:
33 .space (0x130 - 0xd0),0x90
34 jl L1
35 L2:
37 .zerofill __DATA,__bss,_sym,4,2