aboutsummaryrefslogtreecommitdiff
path: root/opcodes/moxie-dis.c
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2014-12-27 10:57:04 -0500
committerAnthony Green <green@moxielogic.com>2014-12-27 10:57:51 -0500
commitbffb60047d90919d8c3a11db9ae7e9f45553a657 (patch)
treeddec1391ed980be8ff3c38bb54c5860f1349b283 /opcodes/moxie-dis.c
parent3b146284444f889294f0c1db13015c18bde0cf20 (diff)
downloadgdb-bffb60047d90919d8c3a11db9ae7e9f45553a657.zip
gdb-bffb60047d90919d8c3a11db9ae7e9f45553a657.tar.gz
gdb-bffb60047d90919d8c3a11db9ae7e9f45553a657.tar.bz2
Limit moxie sto/ldo offsets to 16 bits
Diffstat (limited to 'opcodes/moxie-dis.c')
-rw-r--r--opcodes/moxie-dis.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/opcodes/moxie-dis.c b/opcodes/moxie-dis.c
index 90e0464..923dda1 100644
--- a/opcodes/moxie-dis.c
+++ b/opcodes/moxie-dis.c
@@ -140,37 +140,37 @@ print_insn_moxie (bfd_vma addr, struct disassemble_info * info)
length = 6;
}
break;
- case MOXIE_F1_AiB4:
+ case MOXIE_F1_AiB2:
{
unsigned imm;
- if ((status = info->read_memory_func (addr+2, buffer, 4, info)))
+ if ((status = info->read_memory_func (addr+2, buffer, 2, info)))
goto fail;
if (info->endian == BFD_ENDIAN_BIG)
- imm = bfd_getb32 (buffer);
+ imm = bfd_getb16 (buffer);
else
- imm = bfd_getl32 (buffer);
+ imm = bfd_getl16 (buffer);
fpr (stream, "%s\t0x%x(%s), %s", opcode->name,
imm,
reg_names[OP_A(iword)],
reg_names[OP_B(iword)]);
- length = 6;
+ length = 4;
}
break;
- case MOXIE_F1_ABi4:
+ case MOXIE_F1_ABi2:
{
unsigned imm;
- if ((status = info->read_memory_func (addr+2, buffer, 4, info)))
+ if ((status = info->read_memory_func (addr+2, buffer, 2, info)))
goto fail;
if (info->endian == BFD_ENDIAN_BIG)
- imm = bfd_getb32 (buffer);
+ imm = bfd_getb16 (buffer);
else
- imm = bfd_getl32 (buffer);
+ imm = bfd_getl16 (buffer);
fpr (stream, "%s\t%s, 0x%x(%s)",
opcode->name,
reg_names[OP_A(iword)],
imm,
reg_names[OP_B(iword)]);
- length = 6;
+ length = 4;
}
break;
case MOXIE_BAD: