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 /opcodes/microblaze-dis.c | |
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 'opcodes/microblaze-dis.c')
-rw-r--r-- | opcodes/microblaze-dis.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c index bdbf831..e204e36 100644 --- a/opcodes/microblaze-dis.c +++ b/opcodes/microblaze-dis.c @@ -65,6 +65,15 @@ get_field_imm5 (long instr) } static char * +get_field_imm5_mbar (long instr) +{ + char tmpstr[25]; + + sprintf(tmpstr, "%d", (short)((instr & IMM5_MBAR_MASK) >> IMM_MBAR)); + return(strdup(tmpstr)); +} + +static char * get_field_rfsl (long instr) { char tmpstr[25]; @@ -374,6 +383,13 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) case INST_TYPE_RD_IMM15: print_func (stream, "\t%s, %s", get_field_rd (inst), get_field_imm15 (inst)); break; + /* For mbar insn. */ + case INST_TYPE_IMM5: + print_func (stream, "\t%s", get_field_imm5_mbar (inst)); + break; + /* For mbar 16 or sleep insn. */ + case INST_TYPE_NONE: + break; /* For tuqula instruction */ case INST_TYPE_RD: print_func (stream, "\t%s", get_field_rd (inst)); |