[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / MC / ARM / arm-branches.s
blobe18fa5de12584295ab0d58d9c811ec4d580af08e
1 @ RUN: llvm-mc -triple=armv7-apple-darwin -show-encoding < %s | FileCheck %s
3 @------------------------------------------------------------------------------
4 @ Branch targets destined for ARM mode must == 0 (mod 4), otherwise (mod 2).
5 @------------------------------------------------------------------------------
7 b #4
8 bl #4
9 beq #4
10 blx #2
12 @ CHECK: b #4 @ encoding: [0x01,0x00,0x00,0xea]
13 @ CHECK: bl #4 @ encoding: [0x01,0x00,0x00,0xeb]
14 @ CHECK: beq #4 @ encoding: [0x01,0x00,0x00,0x0a]
15 @ CHECK: blx #2 @ encoding: [0x00,0x00,0x00,0xfb]
17 @------------------------------------------------------------------------------
18 @ Leading '$' on branch targets must not be dropped if part of symbol names
19 @------------------------------------------------------------------------------
21 .global $foo
22 .global $4
23 b $foo
24 bl $foo
25 beq $foo
26 blx $foo
27 b $foo + 4
28 bl $4
29 beq $4 + 4
31 @ CHECK: b ($foo) @ encoding: [A,A,A,0xea]
32 @ CHECK: bl ($foo) @ encoding: [A,A,A,0xeb]
33 @ CHECK: beq ($foo) @ encoding: [A,A,A,0x0a]
34 @ CHECK: blx ($foo) @ encoding: [A,A,A,0xfa]
35 @ CHECK: b #($foo)+4 @ encoding: [A,A,A,0xea]
36 @ CHECK: bl ($4) @ encoding: [A,A,A,0xeb]
37 @ CHECK: beq #($4)+4 @ encoding: [A,A,A,0x0a]
39 @------------------------------------------------------------------------------
40 @ Leading '$' should be allowed to introduce an expression
41 @------------------------------------------------------------------------------
43 .global bar
44 b $ 4
45 bl $ bar + 4
46 blx $ bar
47 @ CHECK: b #4 @ encoding: [0x01,0x00,0x00,0xea]
48 @ CHECK: bl #bar+4 @ encoding: [A,A,A,0xeb]
49 @ CHECK: blx bar @ encoding: [A,A,A,0xfa]