1 # RUN: llvm-mc %s -triple=csky -show-encoding -csky-no-aliases -enable-csky-asm-compressed-inst=true -mattr=+e1 \
2 # RUN: -mattr=+e2 -mattr=+2e3 -mattr=+btst16 | FileCheck -check-prefixes=CHECK-ASM %s
4 # CHECK-ASM: addu16 a0, a1
5 # CHECK-ASM: encoding: [0x04,0x60]
8 # CHECK-ASM: addu16 a0, a1
9 # CHECK-ASM: encoding: [0x04,0x60]
12 # CHECK-ASM: addu16 a0, a1, a2
13 # CHECK-ASM: encoding: [0x08,0x59]
16 # CHECK-ASM: subu16 a0, a1
17 # CHECK-ASM: encoding: [0x06,0x60]
20 # CHECK-ASM: subu16 a0, a1, a2
21 # CHECK-ASM: encoding: [0x09,0x59]
24 # CHECK-ASM: addc16 a0, a1
25 # CHECK-ASM: encoding: [0x05,0x60]
28 # CHECK-ASM: subc16 a0, a1
29 # CHECK-ASM: encoding: [0x07,0x60]
32 # CHECK-ASM: addi16 a0, a1, 1
33 # CHECK-ASM: encoding: [0x02,0x59]
36 # CHECK-ASM: subi16 a0, a1, 1
37 # CHECK-ASM: encoding: [0x03,0x59]
40 # CHECK-ASM: addi16 a0, 10
41 # CHECK-ASM: encoding: [0x09,0x20]
44 # CHECK-ASM: subi16 a0, 10
45 # CHECK-ASM: encoding: [0x09,0x28]
48 # CHECK-ASM: addi16 sp, sp, 4
49 # CHECK-ASM: encoding: [0x01,0x14]
52 # CHECK-ASM: subi16 sp, sp, 4
53 # CHECK-ASM: encoding: [0x21,0x14]
56 # CHECK-ASM: addi16 a0, sp, 4
57 # CHECK-ASM: encoding: [0x01,0x18]
60 # CHECK-ASM: mult16 a0, a1
61 # CHECK-ASM: encoding: [0x04,0x7c]
64 # CHECK-ASM: mult16 a0, a1
65 # CHECK-ASM: encoding: [0x04,0x7c]
68 # CHECK-ASM: and16 a0, a1
69 # CHECK-ASM: encoding: [0x04,0x68]
72 # CHECK-ASM: and16 a0, a1
73 # CHECK-ASM: encoding: [0x04,0x68]
76 # CHECK-ASM: or16 a0, a1
77 # CHECK-ASM: encoding: [0x04,0x6c]
80 # CHECK-ASM: or16 a0, a1
81 # CHECK-ASM: encoding: [0x04,0x6c]
84 # CHECK-ASM: xor16 a0, a1
85 # CHECK-ASM: encoding: [0x05,0x6c]
88 # CHECK-ASM: xor16 a0, a1
89 # CHECK-ASM: encoding: [0x05,0x6c]
92 # CHECK-ASM: andn16 a0, a1
93 # CHECK-ASM: encoding: [0x05,0x68]
96 # CHECK-ASM: nor16 a0, a1
97 # CHECK-ASM: encoding: [0x06,0x6c]
100 # CHECK-ASM: lsl16 a0, a1
101 # CHECK-ASM: encoding: [0x04,0x70]
104 # CHECK-ASM: lsr16 a0, a1
105 # CHECK-ASM: encoding: [0x05,0x70]
108 # CHECK-ASM: asr16 a0, a1
109 # CHECK-ASM: encoding: [0x06,0x70]
112 # CHECK-ASM: rotl16 a0, a1
113 # CHECK-ASM: encoding: [0x07,0x70]
116 # CHECK-ASM: revb16 a0, a1
117 # CHECK-ASM: encoding: [0x06,0x78]
120 # CHECK-ASM: lsli16 a0, a1, 2
121 # CHECK-ASM: encoding: [0x02,0x41]
124 # CHECK-ASM: lsri16 a0, a1, 2
125 # CHECK-ASM: encoding: [0x02,0x49]
128 # CHECK-ASM: asri16 a0, a1, 2
129 # CHECK-ASM: encoding: [0x02,0x51]
132 # CHECK-ASM: cmphs16 a0, a1
133 # CHECK-ASM: encoding: [0x40,0x64]
136 # CHECK-ASM: cmplt16 a0, a1
137 # CHECK-ASM: encoding: [0x41,0x64]
140 # CHECK-ASM: cmpne16 a0, a1
141 # CHECK-ASM: encoding: [0x42,0x64]
144 # CHECK-ASM: cmphsi16 a0, 1
145 # CHECK-ASM: encoding: [0x00,0x38]
148 # CHECK-ASM: cmplti16 a0, 1
149 # CHECK-ASM: encoding: [0x20,0x38]
152 # CHECK-ASM: cmpnei16 a0, 1
153 # CHECK-ASM: encoding: [0x41,0x38]
156 # CHECK-ASM: jsr16 a0
157 # CHECK-ASM: encoding: [0xc1,0x7b]
160 # CHECK-ASM: mvcv16 a0
161 # CHECK-ASM: encoding: [0x03,0x64]
164 # CHECK-ASM: movi16 a0, 1
165 # CHECK-ASM: encoding: [0x01,0x30]
168 # CHECK-ASM: ld16.b a0, (a1, 1)
169 # CHECK-ASM: encoding: [0x01,0x81]
172 # CHECK-ASM: ld16.h a0, (a1, 2)
173 # CHECK-ASM: encoding: [0x01,0x89]
176 # CHECK-ASM: ld16.w a0, (a1, 4)
177 # CHECK-ASM: encoding: [0x01,0x91]
180 # CHECK-ASM: ld16.w a0, (sp, 4)
181 # CHECK-ASM: encoding: [0x01,0x98]
184 # CHECK-ASM: st16.b a0, (a1, 1)
185 # CHECK-ASM: encoding: [0x01,0xa1]
188 # CHECK-ASM: st16.h a0, (a1, 2)
189 # CHECK-ASM: encoding: [0x01,0xa9]
192 # CHECK-ASM: st16.w a0, (a1, 4)
193 # CHECK-ASM: encoding: [0x01,0xb1]
196 # CHECK-ASM: st16.w a0, (sp, 4)
197 # CHECK-ASM: encoding: [0x01,0xb8]
200 # CHECK-ASM: btsti16 a0, 1
201 # CHECK-ASM: encoding: [0xc1,0x38]
204 # CHECK-ASM: bclri16 a0, 1
205 # CHECK-ASM: encoding: [0x81,0x38]
208 # CHECK-ASM: bseti16 a0, 1
209 # CHECK-ASM: encoding: [0xa1,0x38]