diff options
author | Nick Clifton <nickc@redhat.com> | 2000-12-01 20:05:32 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2000-12-01 20:05:32 +0000 |
commit | 54a876cc9a3ca50339110a9aeb095e1234e410c0 (patch) | |
tree | 3493331d0c72708d88e37bb5b5baac7b4e83ee6b /opcodes/mips-dis.c | |
parent | 64845fab0f053dabf94e31f3e4f8d6944677d8a2 (diff) | |
download | binutils-redhat-54a876cc9a3ca50339110a9aeb095e1234e410c0.tar.gz |
Improve MIPS32 support
Diffstat (limited to 'opcodes/mips-dis.c')
-rw-r--r-- | opcodes/mips-dis.c | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c index 4c76cde4aa..39bcf336c7 100644 --- a/opcodes/mips-dis.c +++ b/opcodes/mips-dis.c @@ -157,6 +157,30 @@ print_insn_arg (d, l, pc, info) reg_names[(l >> OP_SH_RD) & OP_MASK_RD]); break; + case 'U': + { + /* First check for both rd and rt being equal. */ + int reg = (l >> OP_SH_RD) & OP_MASK_RD; + if (reg == ((l >> OP_SH_RT) & OP_MASK_RT)) + (*info->fprintf_func) (info->stream, "$%s", + reg_names[reg]); + else + { + /* If one is zero use the other. */ + if (reg == 0) + (*info->fprintf_func) (info->stream, "$%s", + reg_names[(l >> OP_SH_RT) & OP_MASK_RT]); + else if (((l >> OP_SH_RT) & OP_MASK_RT) == 0) + (*info->fprintf_func) (info->stream, "$%s", + reg_names[reg]); + else /* Bogus, result depends on processor. */ + (*info->fprintf_func) (info->stream, "$%s or $%s", + reg_names[reg], + reg_names[(l >> OP_SH_RT) & OP_MASK_RT]); + } + } + break; + case 'z': (*info->fprintf_func) (info->stream, "$%s", reg_names[0]); break; @@ -171,17 +195,11 @@ print_insn_arg (d, l, pc, info) (l >> OP_SH_CODE) & OP_MASK_CODE); break; - case 'q': (*info->fprintf_func) (info->stream, "0x%x", (l >> OP_SH_CODE2) & OP_MASK_CODE2); break; - case 'm': - (*info->fprintf_func) (info->stream, "0x%x", - (l >> OP_SH_CODE20) & OP_MASK_CODE20); - break; - case 'C': (*info->fprintf_func) (info->stream, "0x%x", (l >> OP_SH_COPZ) & OP_MASK_COPZ); @@ -189,7 +207,12 @@ print_insn_arg (d, l, pc, info) case 'B': (*info->fprintf_func) (info->stream, "0x%x", - (l >> OP_SH_SYSCALL) & OP_MASK_SYSCALL); + (l >> OP_SH_CODE20) & OP_MASK_CODE20); + break; + + case 'J': + (*info->fprintf_func) (info->stream, "0x%x", + (l >> OP_SH_CODE19) & OP_MASK_CODE19); break; case 'S': @@ -198,7 +221,6 @@ print_insn_arg (d, l, pc, info) (l >> OP_SH_FS) & OP_MASK_FS); break; - case 'T': case 'W': (*info->fprintf_func) (info->stream, "$f%d", |