diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-09-04 13:52:06 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-09-04 13:52:06 +0000 |
commit | b3e14edafcdc558d724452ee5b803ff096c32d0f (patch) | |
tree | 44a3814f838c0bdf05c27616bfc7828962d33eb9 /gas/config/tc-ia64.c | |
parent | c6d8cab4ac5c906937dcd4f884e65fb4d1052381 (diff) | |
download | gdb-b3e14edafcdc558d724452ee5b803ff096c32d0f.zip gdb-b3e14edafcdc558d724452ee5b803ff096c32d0f.tar.gz gdb-b3e14edafcdc558d724452ee5b803ff096c32d0f.tar.bz2 |
Add Intel Itanium Series 9500 support
bfd/
2012-09-04 Sergey A. Guriev <sergey.a.guriev@intel.com>
* cpu-ia64-opc.c (ins_cnt6a): New function.
(ext_cnt6a): Ditto.
(ins_strd5b): Ditto.
(ext_strd5b): Ditto.
(elf64_ia64_operands): Add new operand types.
gas/
2012-09-04 Sergey A. Guriev <sergey.a.guriev@intel.com>
* config/tc-ia64.c (reg_symbol): Add a new register.
(indirect_reg): Ditto.
(pseudo_func): Add new symbolic constants.
(operand_match): Add new operand types recognition.
(operand_insn): Add new register recognition.
(md_begin): Add new register definition.
(specify_resource): Add new register recognition.
gas/testsuite/
2012-09-04 Sergey A. Guriev <sergey.a.guriev@intel.com>
* gas/testsuite/gas/ia64/psn.d: New file.
* gas/testsuite/gas/ia64/psn.s: New file.
* gas/testsuite/gas/ia64/ia64.exp: Add new testcase.
* gas/testsuite/gas/ia64/opc-i.d: Fixed failing tests.
* gas/testsuite/gas/ia64/opc-m.d: Ditto.
include/opcode/
2012-09-04 Sergey A. Guriev <sergey.a.guriev@intel.com>
* ia64.h (ia64_opnd): Add new operand types.
opcodes/
2012-09-04 Sergey A. Guriev <sergey.a.guriev@intel.com>
* ia64-asmtab.h (completer_index): Extend bitfield to full uint.
* ia64-gen.c: Promote completer index type to longlong.
(irf_operand): Add new register recognition.
(in_iclass_mov_x): Add an entry for the new mov_* instruction type.
(lookup_specifier): Add new resource recognition.
(insert_bit_table_ent): Relax abort condition according to the
changed completer index type.
(print_dis_table): Fix printf format for completer index.
* ia64-ic.tbl: Add a new instruction class.
* ia64-opc-i.c (ia64_opcodes_i): Define new I-instructions.
* ia64-opc-m.c (ia64_opcodes_m): Define new M-instructions.
* ia64-opc.h: Define short names for new operand types.
* ia64-raw.tbl: Add new RAW resource for DAHR register.
* ia64-waw.tbl: Add new WAW resource for DAHR register.
* ia64-asmtab.c: Regenerate.
Diffstat (limited to 'gas/config/tc-ia64.c')
-rw-r--r-- | gas/config/tc-ia64.c | 78 |
1 files changed, 77 insertions, 1 deletions
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index 0366ac4..a4e702f 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -114,7 +114,8 @@ enum reg_symbol REG_FR = (REG_GR + 128), REG_AR = (REG_FR + 128), REG_CR = (REG_AR + 128), - REG_P = (REG_CR + 128), + REG_DAHR = (REG_CR + 128), + REG_P = (REG_DAHR + 8), REG_BR = (REG_P + 64), REG_IP = (REG_BR + 8), REG_CFM, @@ -133,6 +134,7 @@ enum reg_symbol IND_PKR, IND_PMC, IND_PMD, + IND_DAHR, IND_RR, /* The following pseudo-registers are used for unwind directives only: */ REG_PSP, @@ -539,6 +541,7 @@ indirect_reg[] = { "pkr", IND_PKR }, { "pmc", IND_PMC }, { "pmd", IND_PMD }, + { "dahr", IND_DAHR }, { "rr", IND_RR }, }; @@ -609,6 +612,12 @@ pseudo_func[] = /* hint constants: */ { "pause", PSEUDO_FUNC_CONST, { 0x0 } }, + { "priority", PSEUDO_FUNC_CONST, { 0x1 } }, + + /* tf constants: */ + { "clz", PSEUDO_FUNC_CONST, { 32 } }, + { "mpy", PSEUDO_FUNC_CONST, { 33 } }, + { "datahints", PSEUDO_FUNC_CONST, { 34 } }, /* unwind-related constants: */ { "svr4", PSEUDO_FUNC_CONST, { ELFOSABI_NONE } }, @@ -5567,6 +5576,12 @@ operand_match (const struct ia64_opcode *idesc, int res_index, expressionS *e) return OPERAND_MATCH; break; + case IA64_OPND_DAHR3: + if (e->X_op == O_register && e->X_add_number >= REG_DAHR + && e->X_add_number < REG_DAHR + 8) + return OPERAND_MATCH; + break; + case IA64_OPND_F1: case IA64_OPND_F2: case IA64_OPND_F3: @@ -5611,6 +5626,7 @@ operand_match (const struct ia64_opcode *idesc, int res_index, expressionS *e) case IA64_OPND_PKR_R3: case IA64_OPND_PMC_R3: case IA64_OPND_PMD_R3: + case IA64_OPND_DAHR_R3: case IA64_OPND_RR_R3: if (e->X_op == O_index && e->X_op_symbol && (S_GET_VALUE (e->X_op_symbol) - IND_CPUID @@ -5731,6 +5747,8 @@ operand_match (const struct ia64_opcode *idesc, int res_index, expressionS *e) case IA64_OPND_IMMU2: case IA64_OPND_IMMU7a: case IA64_OPND_IMMU7b: + case IA64_OPND_IMMU16: + case IA64_OPND_IMMU19: case IA64_OPND_IMMU21: case IA64_OPND_IMMU24: case IA64_OPND_MBTYPE4: @@ -5987,6 +6005,39 @@ operand_match (const struct ia64_opcode *idesc, int res_index, expressionS *e) ++CURR_SLOT.num_fixups; return OPERAND_MATCH; + case IA64_OPND_STRD5b: + if (e->X_op == O_constant) + { + /* 5-bit signed scaled by 64 */ + if ((e->X_add_number <= ( 0xf << 6 )) + && (e->X_add_number >= -( 0x10 << 6 ))) + { + + /* Must be a multiple of 64 */ + if ((e->X_add_number & 0x3f) != 0) + as_warn (_("stride must be a multiple of 64; lower 6 bits ignored")); + + e->X_add_number &= ~ 0x3f; + return OPERAND_MATCH; + } + else + return OPERAND_OUT_OF_RANGE; + } + break; + case IA64_OPND_CNT6a: + if (e->X_op == O_constant) + { + /* 6-bit unsigned biased by 1 -- count 0 is meaningless */ + if ((e->X_add_number <= 64) + && (e->X_add_number > 0) ) + { + return OPERAND_MATCH; + } + else + return OPERAND_OUT_OF_RANGE; + } + break; + default: break; } @@ -6437,6 +6488,10 @@ build_insn (struct slot *slot, bfd_vma *insnp) val -= REG_CR; break; + case IA64_OPND_DAHR3: + val -= REG_DAHR; + break; + case IA64_OPND_F1: case IA64_OPND_F2: case IA64_OPND_F3: @@ -6463,6 +6518,7 @@ build_insn (struct slot *slot, bfd_vma *insnp) case IA64_OPND_PKR_R3: case IA64_OPND_PMC_R3: case IA64_OPND_PMD_R3: + case IA64_OPND_DAHR_R3: case IA64_OPND_RR_R3: val -= REG_GR; break; @@ -7435,6 +7491,9 @@ md_begin (void) for (i = 0; i < NELEMS (cr); ++i) declare_register (cr[i].name, REG_CR + cr[i].regnum); + /* dahr registers: */ + declare_register_set ("dahr", 8, REG_DAHR); + declare_register ("ip", REG_IP); declare_register ("cfm", REG_CFM); declare_register ("psr", REG_PSR); @@ -8688,6 +8747,22 @@ dep->name, idesc->name, (rsrc_write?"write":"read"), note) } break; + case IA64_RS_DAHR: + if (note == 0) + { + if (idesc->operands[!rsrc_write] == IA64_OPND_DAHR3) + { + specs[count] = tmpl; + specs[count++].index = + CURR_SLOT.opnd[!rsrc_write].X_add_number - REG_DAHR; + } + } + else + { + UNHANDLED; + } + break; + case IA64_RS_FR: case IA64_RS_FRb: if (note != 1) @@ -8762,6 +8837,7 @@ dep->name, idesc->name, (rsrc_write?"write":"read"), note) || idesc->operands[i] == IA64_OPND_PKR_R3 || idesc->operands[i] == IA64_OPND_PMC_R3 || idesc->operands[i] == IA64_OPND_PMD_R3 + || idesc->operands[i] == IA64_OPND_DAHR_R3 || idesc->operands[i] == IA64_OPND_RR_R3 || ((i >= idesc->num_outputs) && (idesc->operands[i] == IA64_OPND_R1 |