diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/opcode/ChangeLog | 7 | ||||
-rw-r--r-- | include/opcode/ppc.h | 13 |
2 files changed, 20 insertions, 0 deletions
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog index d378910..e3132d8 100644 --- a/include/opcode/ChangeLog +++ b/include/opcode/ChangeLog @@ -1,3 +1,10 @@ +2015-07-10 Alan Modra <amodra@gmail.com> + + Apply from master + 2015-06-19 Peter Bergner <bergner@vnet.ibm.com> + * ppc.h (PPC_OPERAND_OPTIONAL_VALUE): New. + (ppc_optional_operand_value): New inline function. + 2014-10-09 Jose E. Marchesi <jose.marchesi@oracle.com> * sparc.h (sparc_opcode): new field `hwcaps2'. diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h index c797fa5..5add00f 100644 --- a/include/opcode/ppc.h +++ b/include/opcode/ppc.h @@ -380,6 +380,11 @@ extern const unsigned int num_powerpc_operands; /* This is a CR FIELD that does not use symbolic names. */ #define PPC_OPERAND_CR_REG (0x200000) + +/* This flag is only used with PPC_OPERAND_OPTIONAL. If this operand + is omitted, then the value it should use for the operand is stored + in the SHIFT field of the immediatly following operand field. */ +#define PPC_OPERAND_OPTIONAL_VALUE (0x400000) /* The POWER and PowerPC assemblers use a few macros. We keep them with the operands table for simplicity. The macro table is an @@ -409,4 +414,12 @@ extern const int powerpc_num_macros; extern ppc_cpu_t ppc_parse_cpu (ppc_cpu_t, ppc_cpu_t *, const char *); +static inline long +ppc_optional_operand_value (const struct powerpc_operand *operand) +{ + if ((operand->flags & PPC_OPERAND_OPTIONAL_VALUE) != 0) + return (operand+1)->shift; + return 0; +} + #endif /* PPC_H */ |