• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1@ RUN: llvm-mc -triple arm-unknown-unknown -show-encoding < %s | FileCheck %s
2
3foo:
4@ CHECK: foo
5
6sub r2, r2, #6
7sub r2, #6
8sub r2, r2, r3
9sub r2, r3
10
11@ CHECK: sub r2, r2, #6              @ encoding: [0x06,0x20,0x42,0xe2]
12@ CHECK: sub r2, r2, #6              @ encoding: [0x06,0x20,0x42,0xe2]
13@ CHECK: sub r2, r2, r3              @ encoding: [0x03,0x20,0x42,0xe0]
14@ CHECK: sub r2, r2, r3              @ encoding: [0x03,0x20,0x42,0xe0]
15
16add r2, r2, #6
17add r2, #6
18add r2, r2, r3
19add r2, r3
20
21@ CHECK: add r2, r2, #6              @ encoding: [0x06,0x20,0x82,0xe2]
22@ CHECK: add r2, r2, #6              @ encoding: [0x06,0x20,0x82,0xe2]
23@ CHECK: add r2, r2, r3              @ encoding: [0x03,0x20,0x82,0xe0]
24@ CHECK: add r2, r2, r3              @ encoding: [0x03,0x20,0x82,0xe0]
25
26and r2, r2, #6
27and r2, #6
28and r2, r2, r3
29and r2, r3
30
31@ CHECK: and r2, r2, #6              @ encoding: [0x06,0x20,0x02,0xe2]
32@ CHECK: and r2, r2, #6              @ encoding: [0x06,0x20,0x02,0xe2]
33@ CHECK: and r2, r2, r3              @ encoding: [0x03,0x20,0x02,0xe0]
34@ CHECK: and r2, r2, r3              @ encoding: [0x03,0x20,0x02,0xe0]
35
36orr r2, r2, #6
37orr r2, #6
38orr r2, r2, r3
39orr r2, r3
40
41@ CHECK: orr r2, r2, #6              @ encoding: [0x06,0x20,0x82,0xe3]
42@ CHECK: orr r2, r2, #6              @ encoding: [0x06,0x20,0x82,0xe3]
43@ CHECK: orr r2, r2, r3              @ encoding: [0x03,0x20,0x82,0xe1]
44@ CHECK: orr r2, r2, r3              @ encoding: [0x03,0x20,0x82,0xe1]
45
46eor r2, r2, #6
47eor r2, #6
48eor r2, r2, r3
49eor r2, r3
50
51@ CHECK: eor r2, r2, #6              @ encoding: [0x06,0x20,0x22,0xe2]
52@ CHECK: eor r2, r2, #6              @ encoding: [0x06,0x20,0x22,0xe2]
53@ CHECK: eor r2, r2, r3              @ encoding: [0x03,0x20,0x22,0xe0]
54@ CHECK: eor r2, r2, r3              @ encoding: [0x03,0x20,0x22,0xe0]
55
56bic r2, r2, #6
57bic r2, #6
58bic r2, r2, r3
59bic r2, r3
60
61@ CHECK: bic r2, r2, #6              @ encoding: [0x06,0x20,0xc2,0xe3]
62@ CHECK: bic r2, r2, #6              @ encoding: [0x06,0x20,0xc2,0xe3]
63@ CHECK: bic r2, r2, r3              @ encoding: [0x03,0x20,0xc2,0xe1]
64@ CHECK: bic r2, r2, r3              @ encoding: [0x03,0x20,0xc2,0xe1]
65
66
67@ Also check that we handle the predicate and cc_out operands.
68subseq r2, r2, #6
69subseq r2, #6
70subseq r2, r2, r3
71subseq r2, r3
72
73@ CHECK: subseq r2, r2, #6              @ encoding: [0x06,0x20,0x52,0x02]
74@ CHECK: subseq r2, r2, #6              @ encoding: [0x06,0x20,0x52,0x02]
75@ CHECK: subseq r2, r2, r3              @ encoding: [0x03,0x20,0x52,0x00]
76@ CHECK: subseq r2, r2, r3              @ encoding: [0x03,0x20,0x52,0x00]
77
78addseq r2, r2, #6
79addseq r2, #6
80addseq r2, r2, r3
81addseq r2, r3
82
83@ CHECK: addseq r2, r2, #6              @ encoding: [0x06,0x20,0x92,0x02]
84@ CHECK: addseq r2, r2, #6              @ encoding: [0x06,0x20,0x92,0x02]
85@ CHECK: addseq r2, r2, r3              @ encoding: [0x03,0x20,0x92,0x00]
86@ CHECK: addseq r2, r2, r3              @ encoding: [0x03,0x20,0x92,0x00]
87
88andseq r2, r2, #6
89andseq r2, #6
90andseq r2, r2, r3
91andseq r2, r3
92
93@ CHECK: andseq r2, r2, #6              @ encoding: [0x06,0x20,0x12,0x02]
94@ CHECK: andseq r2, r2, #6              @ encoding: [0x06,0x20,0x12,0x02]
95@ CHECK: andseq r2, r2, r3              @ encoding: [0x03,0x20,0x12,0x00]
96@ CHECK: andseq r2, r2, r3              @ encoding: [0x03,0x20,0x12,0x00]
97
98orrseq r2, r2, #6
99orrseq r2, #6
100orrseq r2, r2, r3
101orrseq r2, r3
102
103@ CHECK: orrseq r2, r2, #6              @ encoding: [0x06,0x20,0x92,0x03]
104@ CHECK: orrseq r2, r2, #6              @ encoding: [0x06,0x20,0x92,0x03]
105@ CHECK: orrseq r2, r2, r3              @ encoding: [0x03,0x20,0x92,0x01]
106@ CHECK: orrseq r2, r2, r3              @ encoding: [0x03,0x20,0x92,0x01]
107
108eorseq r2, r2, #6
109eorseq r2, #6
110eorseq r2, r2, r3
111eorseq r2, r3
112
113@ CHECK: eorseq r2, r2, #6              @ encoding: [0x06,0x20,0x32,0x02]
114@ CHECK: eorseq r2, r2, #6              @ encoding: [0x06,0x20,0x32,0x02]
115@ CHECK: eorseq r2, r2, r3              @ encoding: [0x03,0x20,0x32,0x00]
116@ CHECK: eorseq r2, r2, r3              @ encoding: [0x03,0x20,0x32,0x00]
117
118bicseq r2, r2, #6
119bicseq r2, #6
120bicseq r2, r2, r3
121bicseq r2, r3
122
123@ CHECK: bicseq r2, r2, #6              @ encoding: [0x06,0x20,0xd2,0x03]
124@ CHECK: bicseq r2, r2, #6              @ encoding: [0x06,0x20,0xd2,0x03]
125@ CHECK: bicseq r2, r2, r3              @ encoding: [0x03,0x20,0xd2,0x01]
126@ CHECK: bicseq r2, r2, r3              @ encoding: [0x03,0x20,0xd2,0x01]
127
128add r0, pc, #123
129
130@ CHECK: adr	r0, #123                @ encoding: [0x7b,0x00,0x8f,0xe2]
131