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 @
------------------------------------------------------------------------------
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 @
------------------------------------------------------------------------------
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 @
------------------------------------------------------------------------------
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]