Produce an error instead of a crash in an expr we cannot represent.
[oota-llvm.git] / test / MC / AArch64 / mapping-across-sections.s
1 // RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj < %s | llvm-objdump -t - | FileCheck %s
2 // RUN: llvm-mc -triple=arm64-none-linux-gnu -filetype=obj < %s | llvm-objdump -t - | FileCheck %s
3
4         .text
5         add w0, w0, w0
6
7 // .wibble should *not* inherit .text's mapping symbol. It's a completely different section.
8         .section .wibble
9         add w0, w0, w0
10
11 // A setion should be able to start with a $d
12         .section .starts_data
13         .word 42
14
15 // Changing back to .text should not emit a redundant $x
16         .text
17         add w0, w0, w0
18
19 // With all those constraints, we want:
20 //   + .text to have $x at 0 and no others
21 //   + .wibble to have $x at 0
22 //   + .starts_data to have $d at 0
23
24
25 // CHECK: 00000000 .starts_data 00000000 $d
26 // CHECK-NEXT: 00000000 .text 00000000 $x
27 // CHECK-NEXT: 00000000 .wibble 00000000 $x
28 // CHECK-NOT: ${{[adtx]}}
29