1 # RUN: llvm-mc -triple=i686-linux -filetype=obj %s -o - | \
2 # RUN: llvm-objdump -disassemble -no-show-raw-insn -r - | FileCheck %s
3 # RUN: llvm-mc -triple=i686-nacl -filetype=obj %s -o - | \
4 # RUN: llvm-objdump -disassemble -no-show-raw-insn -r - | FileCheck %s
5 # RUN: llvm-mc -triple=i686-nacl -filetype=obj -mc-relax-all %s -o - | \
6 # RUN: llvm-objdump -disassemble -no-show-raw-insn -r - | FileCheck %s
15 # Call + pop sequence for determining the PIC base.
16 .bundle_lock align_to_end
22 # 26 bytes of instructions between the pop and the use of the pic base symbol.
23 movl $
3, 2(%ebx
, %ebx
)
24 movl $
3, 2(%ebx
, %ebx
)
25 movl $
3, 2(%ebx
, %ebx
)
30 addl
(.Ltmp0-.L0$pb), %eax
31 # The addl has bundle padding to push it from 0x3b to 0x40.
32 # The difference between the labels should be 0x20 (0x40-0x20) not 0x1b
34 # CHECK: 40: addl 32, %eax
39 # Also make sure it works with a non-relaxable instruction (cmp vs add)
40 # and for 2 adjacent labels that both point to the correct instruction
41 .section .text.bar, "ax"
47 .bundle_lock align_to_end
53 # 26 bytes of instructions between the pop and the use of the pic base symbol.
54 movl $
3, 2(%ebx
, %ebx
)
55 movl $
3, 2(%ebx
, %ebx
)
56 movl $
3, 2(%ebx
, %ebx
)
63 # CHECK: 40: cmpl %eax, 64
64 cmpl %eax
, (.Ltmp2-.L1$pb)
65 # CHECK: 46: cmpl %eax, 32
70 # Switch sections in the middle of a function
71 .section .text.foo, "ax"