1 ; RUN
: llvm-mc
-triple msp430
-show-encoding
< %s | FileCheck
%s
12 ; CHECK
: mov
r8, r15 ; encoding
: [0x0f,0x48]
13 ; CHECK
: mov disp+
2(r8), r15 ; encoding
: [0x1f,0x48,A,A]
14 ; CHECK
: mov disp+
2, r15 ; encoding
: [0x1f,0x40,A,A]
15 ; CHECK
: mov
&disp+
2, r15 ; encoding
: [0x1f,0x42,A,A]
16 ; CHECK
: mov @
r8, r15 ; encoding
: [0x2f,0x48]
17 ; CHECK
: mov @r8+
, r15 ; encoding
: [0x3f,0x48]
18 ; CHECK
: mov
#disp+2, r15 ; encoding: [0x3f,0x40,A,A]
26 ; CHECK
: mov
#42, r15 ; encoding: [0x3f,0x40,0x2a,0x00]
27 ; CHECK
: mov
#42, 12(r15) ; encoding: [0xbf,0x40,0x2a,0x00,0x0c,0x00]
28 ; CHECK
: mov
#42, &disp ; encoding: [0xb2,0x40,0x2a,0x00,A,A]
29 ; CHECK
: mov disp
, disp+
2 ; encoding
: [0x90,0x40,A,A,B,B]
30 ; CHECK
: mov
r7, 0(r15) ; encoding
: [0x8f,0x47,0x00,0x00]
40 ; CHECK
: add r7, r8 ; encoding
: [0x08,0x57]
41 ; CHECK
: add 6(r7), r8 ; encoding
: [0x18,0x57,0x06,0x00]
42 ; CHECK
: add &disp
, r8 ; encoding
: [0x18,0x52,A,A]
43 ; CHECK
: add disp
, r8 ; encoding
: [0x18,0x50,A,A]
44 ; CHECK
: add @
r9, r8 ; encoding
: [0x28,0x59]
45 ; CHECK
: add @r9+
, r8 ; encoding
: [0x38,0x59]
46 ; CHECK
: add #42, r8 ; encoding: [0x38,0x50,0x2a,0x00]
56 ; CHECK
: add r7, 6(r5) ; encoding
: [0x85,0x57,0x06,0x00]
57 ; CHECK
: add 6(r7), 6(r5) ; encoding
: [0x95,0x57,0x06,0x00,0x06,0x00]
58 ; CHECK
: add &disp
, 6(r5) ; encoding
: [0x95,0x52,A,A,0x06,0x00]
59 ; CHECK
: add disp
, 6(r5) ; encoding
: [0x95,0x50,A,A,0x06,0x00]
60 ; CHECK
: add @
r9, 6(r5) ; encoding
: [0xa5,0x59,0x06,0x00]
61 ; CHECK
: add @r9+
, 6(r5) ; encoding
: [0xb5,0x59,0x06,0x00]
62 ; CHECK
: add #42, 6(r5) ; encoding: [0xb5,0x50,0x2a,0x00,0x06,0x00]
72 ; CHECK
: add r7, &disp ; encoding
: [0x82,0x57,A,A]
73 ; CHECK
: add 6(r7), &disp ; encoding
: [0x92,0x57,0x06,0x00,A,A]
74 ; CHECK
: add &disp
, &disp ; encoding
: [0x92,0x52,A,A,B,B]
75 ; CHECK
: add disp
, &disp ; encoding
: [0x92,0x50,A,A,B,B]
76 ; CHECK
: add @
r9, &disp ; encoding
: [0xa2,0x59,A,A]
77 ; CHECK
: add @r9+
, &disp ; encoding
: [0xb2,0x59,A,A]
78 ; CHECK
: add #42, &disp ; encoding: [0xb2,0x50,0x2a,0x00,A,A]
88 ; CHECK
: add r7, disp ; encoding
: [0x80,0x57,A,A]
89 ; CHECK
: add 6(r7), disp ; encoding
: [0x90,0x57,0x06,0x00,A,A]
90 ; CHECK
: add &disp
, disp ; encoding
: [0x90,0x52,A,A,B,B]
91 ; CHECK
: add disp
, disp ; encoding
: [0x90,0x50,A,A,B,B]
92 ; CHECK
: add @
r9, disp ; encoding
: [0xa0,0x59,A,A]
93 ; CHECK
: add @r9+
, disp ; encoding
: [0xb0,0x59,A,A]
94 ; CHECK
: add #42, disp ; encoding: [0xb0,0x50,0x2a,0x00,A,A]
105 ; CHECK
: call
r7 ; encoding
: [0x87,0x12]
106 ; CHECK
: call
6(r7) ; encoding
: [0x97,0x12,0x06,0x00]
107 ; CHECK
: call @
r7 ; encoding
: [0xa7,0x12]
108 ; CHECK
: call @r7+ ; encoding
: [0xb7,0x12]
109 ; CHECK
: call disp+
6(r7) ; encoding
: [0x97,0x12,A,A]
110 ; CHECK
: call
&disp ; encoding
: [0x92,0x12,A,A]
111 ; CHECK
: call disp ; encoding
: [0x90,0x12,A,A]
112 ; CHECK
: call
#disp ; encoding: [0xb0,0x12,A,A]
114 rra
r7 ; CHECK
: rra
r7 ; encoding
: [0x07,0x11]
115 rra
2(r7) ; CHECK
: rra
2(r7) ; encoding
: [0x17,0x11,0x02,0x00]
116 rra @
r7 ; CHECK
: rra @
r7 ; encoding
: [0x27,0x11]
117 rra @r7+ ; CHECK
: rra @r7+ ; encoding
: [0x37,0x11]
119 rrc
r7 ; CHECK
: rrc
r7 ; encoding
: [0x07,0x10]
120 rrc
2(r7) ; CHECK
: rrc
2(r7) ; encoding
: [0x17,0x10,0x02,0x00]
121 rrc @
r7 ; CHECK
: rrc @
r7 ; encoding
: [0x27,0x10]
122 rrc @r7+ ; CHECK
: rrc @r7+ ; encoding
: [0x37,0x10]
124 swpb
r7 ; CHECK
: swpb
r7 ; encoding
: [0x87,0x10]
125 swpb
2(r7) ; CHECK
: swpb
2(r7) ; encoding
: [0x97,0x10,0x02,0x00]
126 swpb @
r7 ; CHECK
: swpb @
r7 ; encoding
: [0xa7,0x10]
127 swpb @r7+ ; CHECK
: swpb @r7+ ; encoding
: [0xb7,0x10]
129 sxt
r7 ; CHECK
: sxt
r7 ; encoding
: [0x87,0x11]
130 sxt
2(r7) ; CHECK
: sxt
2(r7) ; encoding
: [0x97,0x11,0x02,0x00]
131 sxt @
r7 ; CHECK
: sxt @
r7 ; encoding
: [0xa7,0x11]
132 sxt @r7+ ; CHECK
: sxt @r7+ ; encoding
: [0xb7,0x11]
134 cmp r5, r7 ; CHECK
: cmp r5, r7 ; encoding
: [0x07,0x95]
135 cmp 2(r5), r7 ; CHECK
: cmp 2(r5), r7 ; encoding
: [0x17,0x95,0x02,0x00]
136 cmp #-1, r7 ; CHECK: cmp #-1, r7 ; encoding: [0x37,0x93]
137 cmp #42, r7 ; CHECK: cmp #42, r7 ; encoding: [0x37,0x90,0x2a,0x00]
138 cmp @
r5, r7 ; CHECK
: cmp @
r5, r7 ; encoding
: [0x27,0x95]
139 cmp @r5+
, r7 ; CHECK
: cmp @r5+
, r7 ; encoding
: [0x37,0x95]
141 cmp r5, 2(r7) ; CHECK
: cmp r5, 2(r7) ; encoding
: [0x87,0x95,0x02,0x00]
142 cmp 2(r7), 2(r7) ; CHECK
: cmp 2(r7), 2(r7) ; encoding
: [0x97,0x97,0x02,0x00,0x02,0x00]
143 cmp #-1, 2(r7) ; CHECK: cmp #-1, 2(r7) ; encoding: [0xb7,0x93,0x02,0x00]
144 cmp #42, 2(r7) ; CHECK: cmp #42, 2(r7) ; encoding: [0xb7,0x90,0x2a,0x00,0x02,0x00]
145 cmp @
r5, 2(r7) ; CHECK
: cmp @
r5, 2(r7) ; encoding
: [0xa7,0x95,0x02,0x00]
146 cmp @r5+
, 2(r7) ; CHECK
: cmp @r5+
, 2(r7) ; encoding
: [0xb7,0x95,0x02,0x00]
148 bit
r5, r7 ; CHECK
: bit
r5, r7 ; encoding
: [0x07,0xb5]
149 bit
2(r5), r7 ; CHECK
: bit
2(r5), r7 ; encoding
: [0x17,0xb5,0x02,0x00]
150 bit
#-1, r7 ; CHECK: bit #-1, r7 ; encoding: [0x37,0xb3]
151 bit
#42, r7 ; CHECK: bit #42, r7 ; encoding: [0x37,0xb0,0x2a,0x00]
152 bit @
r5, r7 ; CHECK
: bit @
r5, r7 ; encoding
: [0x27,0xb5]
153 bit @r5+
, r7 ; CHECK
: bit @r5+
, r7 ; encoding
: [0x37,0xb5]
155 bit
r5, 2(r7) ; CHECK
: bit
r5, 2(r7) ; encoding
: [0x87,0xb5,0x02,0x00]
156 bit
2(r7), 2(r7) ; CHECK
: bit
2(r7), 2(r7) ; encoding
: [0x97,0xb7,0x02,0x00,0x02,0x00]
157 bit
#-1, 2(r7) ; CHECK: bit #-1, 2(r7) ; encoding: [0xb7,0xb3,0x02,0x00]
158 bit
#42, 2(r7) ; CHECK: bit #42, 2(r7) ; encoding: [0xb7,0xb0,0x2a,0x00,0x02,0x00]
159 bit @
r5, 2(r7) ; CHECK
: bit @
r5, 2(r7) ; encoding
: [0xa7,0xb5,0x02,0x00]
160 bit @r5+
, 2(r7) ; CHECK
: bit @r5+
, 2(r7) ; encoding
: [0xb7,0xb5,0x02,0x00]