73 #define lanai_architecture bfd_lanai_architecture
74 #define architecture_pname bfd_lanai_architecture_pname
75 #define lanai_opcode bfd_lanai_opcode
76 #define lanai_opcodes bfd_lanai_opcodes
110 #define F_SPLS 0x1000
111 #define F_PUNT 0x2000
115 #define F_BYTE 0x20000
116 #define F_HALF 0x10000
117 #define F_FULL 0x00000
118 #define F_DATA_SIZE(X) (4 >> ((X)&0x30000))
119 #define F_CONDITIONAL 0x40000
120 #define F_REL 0x80000
122 #define F_LEADZ 0x100000
123 #define F_POPC 0x200000
125 #define F_CONDBR (F_BR | F_CONDITIONAL)
126 #define F_UNBR (F_BR)
127 #define F_RELCONDBR (F_REL | F_BR | F_CONDITIONAL)
128 #define F_RELUNBR (F_REL | F_BR)
218 #define L3_RI (0x00000000)
219 #define L3_RI_OPCODE_MASK (0x80000000)
220 #define L3_RI_MASK (0xf0030000)
221 #define L3_RR (0xc0000000)
222 #define L3_RR_OPCODE_MASK (0xf0000003)
223 #define L3_RR_MASK (0xf00207fb)
224 #define L3_LEADZ (0xc0000002)
225 #define L3_LEADZ_OPCODE_MASK L3_RR_OPCODE_MASK
226 #define L3_LEADZ_MASK (0xf00207fb)
227 #define L3_POPC (0xc0000003)
228 #define L3_POPC_OPCODE_MASK L3_RR_OPCODE_MASK
229 #define L3_POPC_MASK (0xf00207fb)
230 #define L3_RRR (0xd0000000)
231 #define L3_RRR_OPCODE_MASK (0xf0000000)
232 #define L3_RRR_MASK (0xf0000000)
233 #define L3_RM (0x80000000)
234 #define L3_RM_OPCODE_MASK (0xe0000000)
235 #define L3_RM_MASK (0xf0030000)
236 #define L3_RRM (0xa0000000)
237 #define L3_RRM_OPCODE_MASK (0xe0000000)
238 #define L3_RRM_MASK (0xe0030007)
239 #define L3_BR (0xe0000000)
240 #define L3_BR_OPCODE_MASK (0xf0000002)
241 #define L3_BR_MASK (0xfe000003)
242 #define L3_BRR (0xe1000002)
243 #define L3_BRR_OPCODE_MASK (0xf1000002)
244 #define L3_BRR_MASK (0xff000003)
245 #define L3_SCC (0xe0000002)
246 #define L3_SCC_OPCODE_MASK (0xf1000002)
247 #define L3_SCC_MASK (0xff000003)
248 #define L3_SLS (0xf0000000)
249 #define L3_SLS_OPCODE_MASK (0xf0020000)
250 #define L3_SLS_MASK (0xf0030000)
251 #define L3_SLI (0xf0020000)
252 #define L3_SLI_OPCODE_MASK (0xf0030000)
253 #define L3_SLI_MASK (0xf0030000)
254 #define L3_SPLS (0xf0030000)
255 #define L3_SPLS_OPCODE_MASK (0xf0038000)
256 #define L3_SPLS_MASK (0xf003fc00)
259 #define L3_SI (0xf0038000)
260 #define L3_SI_OPCODE_MASK ___bogus___
261 #define L3_SI_MASK (0xf003cf47)
263 #define L3_PUNT (0xf003ff47)
264 #define L3_PUNT_OPCODE_MASK (0xf003ff47)
265 #define L3_PUNT_MASK (0xf003ff47)
266 #define L3_SBR (0xf003c000)
267 #define L3_SBR_OPCODE_MASK (0xf003f806)
268 #define L3_SBR_MASK (0xfe03f807)
271 #define L3_ADD (0x00)
272 #define L3_ADDC (0x01)
273 #define L3_SUB (0x02)
274 #define L3_SUBB (0x03)
275 #define L3_AND (0x04)
277 #define L3_XOR (0x06)
279 #define L3_OP_MASK (0x07)
280 #define L3_FLAGS (0x08)
281 #define L3_ARITH (0x10)
284 #define L3_HALFWORD 0
286 #define L3_FULLWORD 2
290 #define L3_UNSIGNED 1
292 #define L3_SIGNED_HALFWORD (L3_SIGNED | L3_HALFWORD)
293 #define L3_SIGNED_BYTE (L3_SIGNED | L3_BYTE)
294 #define L3_SIGNED_FULLWORD (L3_SIGNED | L3_FULLWORD)
295 #define L3_UNSIGNED_HALFWORD (L3_UNSIGNED | L3_HALFWORD)
296 #define L3_UNSIGNED_BYTE (L3_UNSIGNED | L3_BYTE)
297 #define L3_UNSIGNED_FULLWORD (L3_UNSIGNED | L3_FULLWORD)
300 #define L3_RI_F (0x00020000)
301 #define L3_RI_H (0x00010000)
303 #define L3_RR_F (0x00020000)
304 #define L3_LEADZ_F L3_RR_F
305 #define L3_POPC_F L3_RR_F
307 #define L3_RRR_F (0x00020000)
308 #define L3_RRR_H (0x00010000)
310 #define L3_RM_P (0x00020000)
311 #define L3_RM_Q (0x00010000)
312 #define L3_RM_S (0x10000000)
314 #define L3_RRM_P (0x00020000)
315 #define L3_RRM_Q (0x00010000)
316 #define L3_RRM_S (0x10000000)
317 #define L3_RRM_Y (0x00000004)
318 #define L3_RRM_L (0x00000002)
319 #define L3_RRM_E (0x00000001)
321 #define L3_BR_R (0x00000002)
323 #define L3_SLS_S (0x00010000)
325 #define L3_SPLS_Y (0x00004000)
326 #define L3_SPLS_S (0x00002000)
327 #define L3_SPLS_E (0x00001000)
328 #define L3_SPLS_P (0x00000800)
329 #define L3_SPLS_Q (0x00000400)
331 #define L3_SI_F (0x00002000)
333 #define L3_SBR_H (0x00000004)
334 #define L3_SBR_R (0x00000002)
335 #define L3_SBR_N (0x00000001)
339 #define L3_CONST_MASK (0x0000ffff)
340 #define L3_BR_CONST_MASK (0x01fffffc)
341 #define L3_SPLS_CONST_MASK (0x000003ff)
344 #define L3_RD(x) (((x)&0x1f) << 23)
345 #define L3_RS1(x) (((x)&0x1f) << 18)
346 #define L3_RS2(x) (((x)&0x1f) << 11)
347 #define L3_RS3(x) (((x)&0x1f) << 3)
349 #define L3_RI_OP(x) (((x)&L3_OP_MASK) << 28)
350 #define L3_RR_OP(x) (((x)&L3_OP_MASK) << 8)
351 #define L3_RRR_OP1(x) (((x)&L3_OP_MASK) << 0)
352 #define L3_RRR_OP2(x) (((x)&L3_OP_MASK) << 8)
353 #define L3_RRM_OP(x) (((x)&L3_OP_MASK) << 8)
354 #define L3_RRM_MODE(x) (((x)&0x7) << 0)
355 #define L3_BR_COND(x) ((((x)&0xe) << 24) | ((x)&1))
356 #define L3_SBR_COND(x) ((((x)&0xe) << 24) | ((x)&1))
357 #define L3_SLS_HIBITS(x) (((x)&0x1f) << 18)
358 #define L3_SLS_CONST(x) ((((x)&0x1f) << 18) | ((x)&0xffff))
362 #define L3_SLI_CONST(x) ((((x)&0x1f) << 18) | ((x)&0xffff))
363 #define L3_SPLS_MODE(x) (((x)&0x5) << 12)
364 #define L3_SBR_OP(x) (((x)&0x7) << 8)
366 #define L3_OP1(x) (((x)&0x7) << 0)
367 #define L3_OP2(x) (((x)&0x7) << 8)
370 #define SIGN_EXT(value, bits) \
371 ((((int)(value)) << ((8 * sizeof(int)) - bits)) >> ((8 * sizeof(int)) - bits))
376 #define X_RD(i) (((i) >> 23) & 0x1f)
377 #define X_RS1(i) (((i) >> 18) & 0x1f)
378 #define X_RS2(i) (((i) >> 11) & 0x1f)
379 #define X_RS3(i) (((i) >> 3) & 0x1f)
381 #define X_OP1(i) (((i) >> 0) & 0x07)
382 #define X_OP2(i) (((i) >> 8) & 0x07)
383 #define X_RI_OP(i) (((i) >> 28) & 0x07)
384 #define X_RR_OP(i) X_OP2(i)
385 #define X_RRM_OP(i) X_OP2(i)
386 #define X_RRR_OP1(i) X_OP1(i)
387 #define X_RRR_OP2(i) X_OP2(i)
389 #define X_C10(i) ((i)&0x3ff)
390 #define X_C16(i) ((i)&0xffff)
391 #define X_C21(i) (((i)&0xffff) | (((i)&0x7c0000) >> 2))
392 #define X_C25(i) ((i)&0x1fffffc)
397 #define NUMOPCODES bfd_lanai_num_opcodes
const int bfd_lanai_num_opcodes
#define architecture_pname
enum lanai_architecture architecture