diff options
author | Michael Eager <eager@eagercon.com> | 2012-11-14 17:05:24 +0000 |
---|---|---|
committer | Michael Eager <eager@eagercon.com> | 2012-11-14 17:05:24 +0000 |
commit | d3da77419a529a0af2c3e5109bebed65752bc52f (patch) | |
tree | f243496979f4234e3783a6c5215a8cb3f0660e93 /gas/config | |
parent | ed8ec0ec784e7e2fd114f4a14e2751add8942c9c (diff) | |
download | gdb-d3da77419a529a0af2c3e5109bebed65752bc52f.zip gdb-d3da77419a529a0af2c3e5109bebed65752bc52f.tar.gz gdb-d3da77419a529a0af2c3e5109bebed65752bc52f.tar.bz2 |
opcodes/
* microblaze-opc.h: Define new instruction type INST_TYPE_IMM5,
update OPCODE_MASK_H13S, add OPCODE_MASK_HN, define MIN_IMM5 / MAX_IMM5,
and increase MAX_OPCODES.
(op_code_struct): add mbar and sleep
* microblaze-opcm.h (microblaze_instr): add mbar
Define IMM_MBAR and IMM5_MBAR_MASK
* microblaze-dis.c: Add get_field_imm5_mbar
(print_insn_microblaze): Add support for INST_TYPE_IMM5 and INST_TYPE_NONE
gas/
* config/tc-microblaze.c (md_assemble): Add support for INST_TYPE_IMM5
gas/testsuite/
* gas/microblaze/allinsn.s: Add mbar and sleep
* gas/microblaze/allinsn.d: Likewise
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-microblaze.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c index 04dfa1e..b71383b 100644 --- a/gas/config/tc-microblaze.c +++ b/gas/config/tc-microblaze.c @@ -1605,6 +1605,24 @@ md_assemble (char * str) output = frag_more (isize); break; + case INST_TYPE_IMM5: + if (strcmp(op_end, "")) + op_end = parse_imm (op_end + 1, & exp, MIN_IMM5, MAX_IMM5); + else + as_fatal(_("Error in statement syntax")); + if (exp.X_op != O_constant) { + as_warn(_("Symbol used as immediate for mbar instruction")); + } else { + output = frag_more (isize); + immed = exp.X_add_number; + } + if (immed != (immed % 32)) { + as_warn(_("Immediate value for mbar > 32. using <value %% 32>")); + immed = immed % 32; + } + inst |= (immed << IMM_MBAR); + break; + default: as_fatal (_("unimplemented opcode \"%s\""), name); } |