Silence -Wunused-variable in release builds.
[llvm/stm8.git] / test / MC / MBlaze / mblaze_imm.s
blob08b8a0f2681840752d88785b3d5aa499a2f88dd1
1 # RUN: llvm-mc -triple mblaze-unknown-unknown -show-encoding %s | FileCheck %s
3 # In the microblaze instruction set, any TYPE-B instruction with a
4 # signed immediate value requiring more than 16-bits must be prefixed
5 # with an IMM instruction that contains the high 16-bits. The higher
6 # 16-bits are then combined with the lower 16-bits in the original
7 # instruction to form a 32-bit immediate value.
9 # The generation of IMM instructions is handled automatically by the
10 # code emitter. Test to ensure that IMM instructions are generated
11 # when they are suppose to and are not generated when they are not
12 # needed.
14 # CHECK: addi
15 # BINARY: 001000 00000 00000 0000000000000000
16 # CHECK: encoding: [0x20,0x00,0x00,0x00]
17 addi r0, r0, 0x00000000
19 # CHECK: addi
20 # BINARY: 001000 00000 00000 0000000000000001
21 # CHECK: encoding: [0x20,0x00,0x00,0x01]
22 addi r0, r0, 0x00000001
24 # CHECK: addi
25 # BINARY: 001000 00000 00000 0000000000000010
26 # CHECK: encoding: [0x20,0x00,0x00,0x02]
27 addi r0, r0, 0x00000002
29 # CHECK: addi
30 # BINARY: 001000 00000 00000 0000000000000100
31 # CHECK: encoding: [0x20,0x00,0x00,0x04]
32 addi r0, r0, 0x00000004
34 # CHECK: addi
35 # BINARY: 001000 00000 00000 0000000000001000
36 # CHECK: encoding: [0x20,0x00,0x00,0x08]
37 addi r0, r0, 0x00000008
39 # CHECK: addi
40 # BINARY: 001000 00000 00000 0000000000010000
41 # CHECK: encoding: [0x20,0x00,0x00,0x10]
42 addi r0, r0, 0x00000010
44 # CHECK: addi
45 # BINARY: 001000 00000 00000 0000000000100000
46 # CHECK: encoding: [0x20,0x00,0x00,0x20]
47 addi r0, r0, 0x00000020
49 # CHECK: addi
50 # BINARY: 001000 00000 00000 0000000001000000
51 # CHECK: encoding: [0x20,0x00,0x00,0x40]
52 addi r0, r0, 0x00000040
54 # CHECK: addi
55 # BINARY: 001000 00000 00000 0000000010000000
56 # CHECK: encoding: [0x20,0x00,0x00,0x80]
57 addi r0, r0, 0x00000080
59 # CHECK: addi
60 # BINARY: 001000 00000 00000 0000000100000000
61 # CHECK: encoding: [0x20,0x00,0x01,0x00]
62 addi r0, r0, 0x00000100
64 # CHECK: addi
65 # BINARY: 001000 00000 00000 0000001000000000
66 # CHECK: encoding: [0x20,0x00,0x02,0x00]
67 addi r0, r0, 0x00000200
69 # CHECK: addi
70 # BINARY: 001000 00000 00000 0000010000000000
71 # CHECK: encoding: [0x20,0x00,0x04,0x00]
72 addi r0, r0, 0x00000400
74 # CHECK: addi
75 # BINARY: 001000 00000 00000 0000100000000000
76 # CHECK: encoding: [0x20,0x00,0x08,0x00]
77 addi r0, r0, 0x00000800
79 # CHECK: addi
80 # BINARY: 001000 00000 00000 0001000000000000
81 # CHECK: encoding: [0x20,0x00,0x10,0x00]
82 addi r0, r0, 0x00001000
84 # CHECK: addi
85 # BINARY: 001000 00000 00000 0010000000000000
86 # CHECK: encoding: [0x20,0x00,0x20,0x00]
87 addi r0, r0, 0x00002000
89 # CHECK: addi
90 # BINARY: 001000 00000 00000 0100000000000000
91 # CHECK: encoding: [0x20,0x00,0x40,0x00]
92 addi r0, r0, 0x00004000
94 # CHECK: addi
95 # BINARY: 101100 00000 00000 0000000000000000
96 # BINARY: 001000 00000 00000 1000000000000000
97 # CHECK: encoding: [0xb0,0x00,0x00,0x00,0x20,0x00,0x80,0x00]
98 addi r0, r0, 0x00008000
100 # CHECK: addi
101 # BINARY: 101100 00000 00000 0000000000000001
102 # 001000 00000 00000 0000000000000000
103 # CHECK: encoding: [0xb0,0x00,0x00,0x01,0x20,0x00,0x00,0x00]
104 addi r0, r0, 0x00010000
106 # CHECK: addi
107 # BINARY: 101100 00000 00000 0000000000000010
108 # 001000 00000 00000 0000000000000000
109 # CHECK: encoding: [0xb0,0x00,0x00,0x02,0x20,0x00,0x00,0x00]
110 addi r0, r0, 0x00020000
112 # CHECK: addi
113 # BINARY: 101100 00000 00000 0000000000000100
114 # 001000 00000 00000 0000000000000000
115 # CHECK: encoding: [0xb0,0x00,0x00,0x04,0x20,0x00,0x00,0x00]
116 addi r0, r0, 0x00040000
118 # CHECK: addi
119 # BINARY: 101100 00000 00000 0000000000001000
120 # 001000 00000 00000 0000000000000000
121 # CHECK: encoding: [0xb0,0x00,0x00,0x08,0x20,0x00,0x00,0x00]
122 addi r0, r0, 0x00080000
124 # CHECK: addi
125 # BINARY: 101100 00000 00000 0000000000010000
126 # 001000 00000 00000 0000000000000000
127 # CHECK: encoding: [0xb0,0x00,0x00,0x10,0x20,0x00,0x00,0x00]
128 addi r0, r0, 0x00100000
130 # CHECK: addi
131 # BINARY: 101100 00000 00000 0000000000100000
132 # 001000 00000 00000 0000000000000000
133 # CHECK: encoding: [0xb0,0x00,0x00,0x20,0x20,0x00,0x00,0x00]
134 addi r0, r0, 0x00200000
136 # CHECK: addi
137 # BINARY: 101100 00000 00000 0000000001000000
138 # 001000 00000 00000 0000000000000000
139 # CHECK: encoding: [0xb0,0x00,0x00,0x40,0x20,0x00,0x00,0x00]
140 addi r0, r0, 0x00400000
142 # CHECK: addi
143 # BINARY: 101100 00000 00000 0000000010000000
144 # 001000 00000 00000 0000000000000000
145 # CHECK: encoding: [0xb0,0x00,0x00,0x80,0x20,0x00,0x00,0x00]
146 addi r0, r0, 0x00800000
148 # CHECK: addi
149 # BINARY: 101100 00000 00000 0000000100000000
150 # 001000 00000 00000 0000000000000000
151 # CHECK: encoding: [0xb0,0x00,0x01,0x00,0x20,0x00,0x00,0x00]
152 addi r0, r0, 0x01000000
154 # CHECK: addi
155 # BINARY: 101100 00000 00000 0000001000000000
156 # 001000 00000 00000 0000000000000000
157 # CHECK: encoding: [0xb0,0x00,0x02,0x00,0x20,0x00,0x00,0x00]
158 addi r0, r0, 0x02000000
160 # CHECK: addi
161 # BINARY: 101100 00000 00000 0000010000000000
162 # 001000 00000 00000 0000000000000000
163 # CHECK: encoding: [0xb0,0x00,0x04,0x00,0x20,0x00,0x00,0x00]
164 addi r0, r0, 0x04000000
166 # CHECK: addi
167 # BINARY: 101100 00000 00000 0000100000000000
168 # 001000 00000 00000 0000000000000000
169 # CHECK: encoding: [0xb0,0x00,0x08,0x00,0x20,0x00,0x00,0x00]
170 addi r0, r0, 0x08000000
172 # CHECK: addi
173 # BINARY: 101100 00000 00000 0001000000000000
174 # 001000 00000 00000 0000000000000000
175 # CHECK: encoding: [0xb0,0x00,0x10,0x00,0x20,0x00,0x00,0x00]
176 addi r0, r0, 0x10000000
178 # CHECK: addi
179 # BINARY: 101100 00000 00000 0010000000000000
180 # 001000 00000 00000 0000000000000000
181 # CHECK: encoding: [0xb0,0x00,0x20,0x00,0x20,0x00,0x00,0x00]
182 addi r0, r0, 0x20000000
184 # CHECK: addi
185 # BINARY: 101100 00000 00000 0100000000000000
186 # 001000 00000 00000 0000000000000000
187 # CHECK: encoding: [0xb0,0x00,0x40,0x00,0x20,0x00,0x00,0x00]
188 addi r0, r0, 0x40000000
190 # CHECK: addi
191 # BINARY: 101100 00000 00000 1000000000000000
192 # 001000 00000 00000 0000000000000000
193 # CHECK: encoding: [0xb0,0x00,0x80,0x00,0x20,0x00,0x00,0x00]
194 addi r0, r0, 0x80000000