Rev 5191 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5191 | Rev 6324 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* ppc.h -- Header file for PowerPC opcode table |
1 | /* ppc.h -- Header file for PowerPC opcode table |
2 | Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
- | |
3 | 2007, 2008, 2009, 2010, 2012 Free Software Foundation, Inc. |
2 | Copyright (C) 1994-2015 Free Software Foundation, Inc. |
4 | Written by Ian Lance Taylor, Cygnus Support |
3 | Written by Ian Lance Taylor, Cygnus Support |
Line 5... | Line 4... | ||
5 | 4 | ||
Line 6... | Line 5... | ||
6 | This file is part of GDB, GAS, and the GNU binutils. |
5 | This file is part of GDB, GAS, and the GNU binutils. |
Line 194... | Line 193... | ||
194 | /* Opcode which is supported by the Hardware Transactional Memory extension. */ |
193 | /* Opcode which is supported by the Hardware Transactional Memory extension. */ |
195 | /* Currently, this is the same as the POWER8 mask. If another cpu comes out |
194 | /* Currently, this is the same as the POWER8 mask. If another cpu comes out |
196 | that isn't a superset of POWER8, we can define this to its own mask. */ |
195 | that isn't a superset of POWER8, we can define this to its own mask. */ |
197 | #define PPC_OPCODE_HTM PPC_OPCODE_POWER8 |
196 | #define PPC_OPCODE_HTM PPC_OPCODE_POWER8 |
Line -... | Line 197... | ||
- | 197 | ||
- | 198 | /* Opcode is supported by ppc750cl. */ |
|
- | 199 | #define PPC_OPCODE_750 0x4000000000ull |
|
- | 200 | ||
- | 201 | /* Opcode is supported by ppc7450. */ |
|
- | 202 | #define PPC_OPCODE_7450 0x8000000000ull |
|
- | 203 | ||
- | 204 | /* Opcode is supported by ppc821/850/860. */ |
|
- | 205 | #define PPC_OPCODE_860 0x10000000000ull |
|
- | 206 | ||
- | 207 | /* Opcode is only supported by Power9 architecture. */ |
|
- | 208 | #define PPC_OPCODE_POWER9 0x20000000000ull |
|
- | 209 | ||
- | 210 | /* Opcode is supported by Vector-Scalar (VSX) Unit from ISA 2.08. */ |
|
- | 211 | #define PPC_OPCODE_VSX3 0x40000000000ull |
|
198 | 212 | ||
199 | /* A macro to extract the major opcode from an instruction. */ |
213 | /* A macro to extract the major opcode from an instruction. */ |
Line 200... | Line 214... | ||
200 | #define PPC_OP(i) (((i) >> 26) & 0x3f) |
214 | #define PPC_OP(i) (((i) >> 26) & 0x3f) |
201 | 215 | ||
Line 276... | Line 290... | ||
276 | extern const unsigned int num_powerpc_operands; |
290 | extern const unsigned int num_powerpc_operands; |
Line 277... | Line 291... | ||
277 | 291 | ||
278 | /* Use with the shift field of a struct powerpc_operand to indicate |
292 | /* Use with the shift field of a struct powerpc_operand to indicate |
279 | that BITM and SHIFT cannot be used to determine where the operand |
293 | that BITM and SHIFT cannot be used to determine where the operand |
280 | goes in the insn. */ |
294 | goes in the insn. */ |
Line 281... | Line 295... | ||
281 | #define PPC_OPSHIFT_INV (-1 << 31) |
295 | #define PPC_OPSHIFT_INV (-1U << 31) |
Line 282... | Line 296... | ||
282 | 296 | ||
283 | /* Values defined for the flags field of a struct powerpc_operand. */ |
297 | /* Values defined for the flags field of a struct powerpc_operand. */ |
Line 380... | Line 394... | ||
380 | #define PPC_OPERAND_VSR (0x100000) |
394 | #define PPC_OPERAND_VSR (0x100000) |
Line 381... | Line 395... | ||
381 | 395 | ||
382 | /* This is a CR FIELD that does not use symbolic names. */ |
396 | /* This is a CR FIELD that does not use symbolic names. */ |
383 | #define PPC_OPERAND_CR_REG (0x200000) |
397 | #define PPC_OPERAND_CR_REG (0x200000) |
- | 398 | ||
- | 399 | /* This flag is only used with PPC_OPERAND_OPTIONAL. If this operand |
|
- | 400 | is omitted, then the value it should use for the operand is stored |
|
- | 401 | in the SHIFT field of the immediatly following operand field. */ |
|
- | 402 | #define PPC_OPERAND_OPTIONAL_VALUE (0x400000) |
|
384 | 403 | ||
385 | /* The POWER and PowerPC assemblers use a few macros. We keep them |
404 | /* The POWER and PowerPC assemblers use a few macros. We keep them |
386 | with the operands table for simplicity. The macro table is an |
405 | with the operands table for simplicity. The macro table is an |
Line 387... | Line 406... | ||
387 | array of struct powerpc_macro. */ |
406 | array of struct powerpc_macro. */ |
Line 408... | Line 427... | ||
408 | extern const struct powerpc_macro powerpc_macros[]; |
427 | extern const struct powerpc_macro powerpc_macros[]; |
409 | extern const int powerpc_num_macros; |
428 | extern const int powerpc_num_macros; |
Line 410... | Line 429... | ||
410 | 429 | ||
Line -... | Line 430... | ||
- | 430 | extern ppc_cpu_t ppc_parse_cpu (ppc_cpu_t, ppc_cpu_t *, const char *); |
|
- | 431 | ||
- | 432 | static inline long |
|
- | 433 | ppc_optional_operand_value (const struct powerpc_operand *operand) |
|
- | 434 | { |
|
- | 435 | if ((operand->flags & PPC_OPERAND_OPTIONAL_VALUE) != 0) |
|
- | 436 | return (operand+1)->shift; |
|
- | 437 | return 0; |
|
411 | extern ppc_cpu_t ppc_parse_cpu (ppc_cpu_t, ppc_cpu_t *, const char *); |
438 | } |