diff options
author | Peter Bergner <bergner@vnet.ibm.com> | 2008-06-13 20:16:00 +0000 |
---|---|---|
committer | Peter Bergner <bergner@vnet.ibm.com> | 2008-06-13 20:16:00 +0000 |
commit | fa452fa6833cbb3088361ac35f4c51716afde520 (patch) | |
tree | 6917de78cd81cfeb39fb48674abadb80a17239ec /include/opcode | |
parent | 6ae37fefeb44d97562e8ca67413e418893653a9b (diff) | |
download | gdb-fa452fa6833cbb3088361ac35f4c51716afde520.zip gdb-fa452fa6833cbb3088361ac35f4c51716afde520.tar.gz gdb-fa452fa6833cbb3088361ac35f4c51716afde520.tar.bz2 |
include/opcode/
* ppc.h (ppc_cpu_t): New typedef.
(struct powerpc_opcode <flags>): Use it.
(struct powerpc_operand <insert, extract>): Likewise.
(struct powerpc_macro <flags>): Likewise.
gas/
* config/tc-ppc.c (ppc_cpu): Use ppc_cpu_t typedef.
(ppc_insert_operand): Likewise.
(ppc_machine): Likewise.
* config/tc-ppc.h: #include "opcode/ppc.h"
(struct _ppc_fix_extra <ppc_cpu>): Use ppc_cpu_t typedef.
(ppc_cpu): Update extern decl.
opcodes/
* ppc-dis.c (print_insn_powerpc): Update prototye to use new
ppc_cpu_t typedef.
(struct dis_private): New.
(POWERPC_DIALECT): New define.
(powerpc_dialect): Renamed to...
(powerpc_init_dialect): This. Update to use ppc_cpu_t and
struct dis_private.
(print_insn_big_powerpc): Update for using structure in
info->private_data.
(print_insn_little_powerpc): Likewise.
(operand_value_powerpc): Change type of dialect param to ppc_cpu_t.
(skip_optional_operands): Likewise.
(print_insn_powerpc): Likewise. Remove initialization of dialect.
* ppc-opc.c (extract_bat, extract_bba, extract_bdm, extract_bdp,
extract_bo, extract_boe, extract_fxm, extract_mb6, extract_mbe,
extract_nb, extract_nsi, extract_rbs, extract_sh6, extract_spr,
extract_sprg, extract_tbr insert_bat, insert_bba, insert_bdm,
insert_bdp, insert_bo, insert_boe, insert_fxm, insert_mb6, insert_mbe,
insert_nsi, insert_ral, insert_ram, insert_raq, insert_ras, insert_rbs,
insert_sh6, insert_spr, insert_sprg, insert_tbr): Change the dialect
param to be of type ppc_cpu_t. Update prototype.
Diffstat (limited to 'include/opcode')
-rw-r--r-- | include/opcode/ChangeLog | 7 | ||||
-rw-r--r-- | include/opcode/ppc.h | 10 |
2 files changed, 13 insertions, 4 deletions
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog index 32b9728..d217ca4 100644 --- a/include/opcode/ChangeLog +++ b/include/opcode/ChangeLog @@ -1,3 +1,10 @@ +2008-06-13 Peter Bergner <bergner@vnet.ibm.com> + + * ppc.h (ppc_cpu_t): New typedef. + (struct powerpc_opcode <flags>): Use it. + (struct powerpc_operand <insert, extract>): Likewise. + (struct powerpc_macro <flags>): Likewise. + 2008-06-12 Adam Nemet <anemet@caviumnetworks.com> * mips.h: Document new field descriptors +x, +X, +p, +P, +s, +S. diff --git a/include/opcode/ppc.h b/include/opcode/ppc.h index f4023c7..7b789aa 100644 --- a/include/opcode/ppc.h +++ b/include/opcode/ppc.h @@ -22,6 +22,8 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, US #ifndef PPC_H #define PPC_H +typedef unsigned long ppc_cpu_t; + /* The opcode table is an array of struct powerpc_opcode. */ struct powerpc_opcode @@ -42,7 +44,7 @@ struct powerpc_opcode /* One bit flags for the opcode. These are used to indicate which specific processors support the instructions. The defined values are listed below. */ - unsigned long flags; + ppc_cpu_t flags; /* An array of operand codes. Each code is an index into the operand table. They appear in the order which the operands must @@ -183,7 +185,7 @@ struct powerpc_operand operand value is legal, *ERRMSG will be unchanged (most operands can accept any value). */ unsigned long (*insert) - (unsigned long instruction, long op, int dialect, const char **errmsg); + (unsigned long instruction, long op, ppc_cpu_t dialect, const char **errmsg); /* Extraction function. This is used by the disassembler. To extract this operand type from an instruction, check this field. @@ -201,7 +203,7 @@ struct powerpc_operand non-zero if this operand type can not actually be extracted from this operand (i.e., the instruction does not match). If the operand is valid, *INVALID will not be changed. */ - long (*extract) (unsigned long instruction, int dialect, int *invalid); + long (*extract) (unsigned long instruction, ppc_cpu_t dialect, int *invalid); /* One bit syntax flags. */ unsigned long flags; @@ -318,7 +320,7 @@ struct powerpc_macro /* One bit flags for the opcode. These are used to indicate which specific processors support the instructions. The values are the same as those for the struct powerpc_opcode flags field. */ - unsigned long flags; + ppc_cpu_t flags; /* A format string to turn the macro into a normal instruction. Each %N in the string is replaced with operand number N (zero |