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 | 4372b673222291cc81879e291c0233c6cc08a4d3 (patch) | |
tree | 25e1fe72333a5b5eb8a0cd24724df167adb9ba02 /opcodes/mips-dis.c | |
parent | 0c92ba5f58ea1b2c2ee6401419899883b726b39e (diff) | |
download | gdb-4372b673222291cc81879e291c0233c6cc08a4d3.zip gdb-4372b673222291cc81879e291c0233c6cc08a4d3.tar.gz gdb-4372b673222291cc81879e291c0233c6cc08a4d3.tar.bz2 |
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 4c76cde..39bcf33 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", |