aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2006-05-02 11:12:41 +0000
committerThiemo Seufer <ths@networkno.de>2006-05-02 11:12:41 +0000
commit022fac6d2a2b74313c0262e97b280b1c7fc720f4 (patch)
tree068c947c075442817549d00f24f0186cca6093af /opcodes
parentb48c61bccb90f21e146389b29828671551f381d1 (diff)
downloadgdb-022fac6d2a2b74313c0262e97b280b1c7fc720f4.zip
gdb-022fac6d2a2b74313c0262e97b280b1c7fc720f4.tar.gz
gdb-022fac6d2a2b74313c0262e97b280b1c7fc720f4.tar.bz2
* mips-dis.c (print_insn_args): Force mips16 to odd addresses.
(print_mips16_insn_arg): Force mips16 to odd addresses.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog7
-rw-r--r--opcodes/mips-dis.c21
2 files changed, 25 insertions, 3 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index c384080..f4bf383 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,10 @@
+2006-05-02 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+ David Ung <davidu@mips.com>
+
+ * mips-dis.c (print_insn_args): Force mips16 to odd addresses.
+ (print_mips16_insn_arg): Force mips16 to odd addresses.
+
2006-04-30 Thiemo Seufer <ths@mips.com>
David Ung <davidu@mips.com>
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index ee1e9af..59e1824 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -984,6 +984,10 @@ print_insn_args (const char *d,
case 'a':
info->target = (((pc + 4) & ~(bfd_vma) 0x0fffffff)
| (((l >> OP_SH_TARGET) & OP_MASK_TARGET) << 2));
+ /* For gdb disassembler, force odd address on jalx. */
+ if (info->flavour == bfd_target_unknown_flavour
+ && strcmp (opp->name, "jalx") == 0)
+ info->target |= 1;
(*info->print_address_func) (info->target, info);
break;
@@ -1632,15 +1636,26 @@ print_mips16_insn_arg (char type,
}
}
info->target = (baseaddr & ~((1 << shift) - 1)) + immed;
+ if (pcrel && branch
+ && info->flavour == bfd_target_unknown_flavour)
+ /* For gdb disassembler, maintain odd address. */
+ info->target |= 1;
(*info->print_address_func) (info->target, info);
}
}
break;
case 'a':
- if (! use_extend)
- extend = 0;
- l = ((l & 0x1f) << 23) | ((l & 0x3e0) << 13) | (extend << 2);
+ {
+ int jalx = l & 0x400;
+
+ if (! use_extend)
+ extend = 0;
+ l = ((l & 0x1f) << 23) | ((l & 0x3e0) << 13) | (extend << 2);
+ if (!jalx && info->flavour == bfd_target_unknown_flavour)
+ /* For gdb disassembler, maintain odd address. */
+ l |= 1;
+ }
info->target = ((memaddr + 4) & ~(bfd_vma) 0x0fffffff) | l;
(*info->print_address_func) (info->target, info);
info->insn_type = dis_jsr;