diff options
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 9 | ||||
-rw-r--r-- | opcodes/avr-dis.c | 19 |
2 files changed, 26 insertions, 2 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 26eec2b..800df07 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,12 @@ +2014-07-01 Barney Stratford <barney_stratford@fastmail.fm> + Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> + Pitchumani Sivanupandi <pitchumani.s@atmel.com> + Soundararajan <Sounderarajan.D@atmel.com> + + * avr-dis.c (avr_operand): Handle constraint j for 16 bit lds/sts. + (print_insn_avr): Do not select opcode if insn ISA is avrtiny and machine + is not avrtiny. + 2014-06-26 Philippe De Muyter <phdm@macqel.be> * or1k-desc.h (spr_field_masks): Add U suffix to the end of long diff --git a/opcodes/avr-dis.c b/opcodes/avr-dis.c index 9a8ae33..78c9948 100644 --- a/opcodes/avr-dis.c +++ b/opcodes/avr-dis.c @@ -186,6 +186,17 @@ avr_operand (unsigned int insn, unsigned int insn2, unsigned int pc, int constra case 'i': sprintf (buf, "0x%04X", insn2); break; + + case 'j': + { + unsigned int val = ((insn & 0xf) | ((insn & 0x600) >> 5) + | ((insn & 0x100) >> 2)); + if (val > 0 && !(insn & 0x100)) + val |= 0x80; + sprintf (buf, "0x%02x", val); + sprintf (buf, "%d", val); + } + break; case 'M': sprintf (buf, "0x%02X", ((insn & 0xf00) >> 4) | (insn & 0xf)); @@ -329,8 +340,12 @@ print_insn_avr (bfd_vma addr, disassemble_info *info) for (opcode = avr_opcodes, maskptr = avr_bin_masks; opcode->name; opcode++, maskptr++) - if ((insn & *maskptr) == opcode->bin_opcode) - break; + { + if ((opcode->isa == AVR_ISA_TINY) && (info->mach != bfd_mach_avrtiny)) + continue; + if ((insn & *maskptr) == opcode->bin_opcode) + break; + } /* Special case: disassemble `ldd r,b+0' as `ld r,b', and `std b+0,r' as `st b,r' (next entry in the table). */ |