[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / ARM / multi-section-mapping.s
blob7e62b10f5b0961a7367d8437ce20bb7fd5098c13
1 @ RUN: llvm-mc -triple=armv7-linux-gnueabi -filetype=obj < %s | llvm-objdump -t - | FileCheck %s
3 .text
4 add r0, r0, r0
6 @ .wibble should *not* inherit .text's mapping symbol. It's a completely different section.
7 .section .wibble
8 add r0, r0, r0
10 @ A section should be able to start with a $t
11 .section .starts_thumb
12 .thumb
13 adds r0, r0, r0
15 @ A setion should be able to start with a $d
16 .section .starts_data
17 .word 42
19 @ Changing back to .text should not emit a redundant $a
20 .text
21 .arm
22 add r0, r0, r0
24 @ Similarly no $t if we change back .starts_thumb using .pushsection
25 .pushsection .starts_thumb
26 .thumb
27 adds r0, r0, r0
29 @ When we change back to .text using .popsection .thumb is still active, so we
30 @ should emit a $t
31 .popsection
32 add r0, r0, r0
34 @ .ident does a push then pop of the .comment section, so the .word should
35 @ cause $d to appear in the .text section
36 .ident "ident"
37 .word 0
39 @ With all those constraints, we want:
40 @ + .text to have $a at 0, $t at 8, $d at 12
41 @ + .wibble to have $a at 0
42 @ + .starts_thumb to have $t at 0
43 @ + .starts_data to have $d at 0
45 @ CHECK: 00000000 .text 00000000 $a
46 @ CHECK-NEXT: 00000000 .wibble 00000000 $a
47 @ CHECK-NEXT: 0000000a .text 00000000 $d
48 @ CHECK-NEXT: 00000000 .starts_thumb 00000000 $t
49 @ CHECK-NEXT: 00000008 .text 00000000 $t
50 @ CHECK-NOT: ${{[adt]}}