From 5d73b1f18fc65bc905549c25db448bbcc6914c1c Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 1 Jul 2011 16:11:27 +0000 Subject: [PATCH] PR binutils/12329 * avr-dis.c (avr_operand): Fix disassembly of ELPM, LPM and SPM insns using post-increment addressing. * avr.h (AVR_ISA_AVR6): Fix typo, adding AVR_ISA_SPMX. --- include/opcode/ChangeLog | 4 ++++ include/opcode/avr.h | 2 +- opcodes/ChangeLog | 6 ++++++ opcodes/arm-dis.c | 3 +++ opcodes/avr-dis.c | 3 ++- 5 files changed, 16 insertions(+), 2 deletions(-) diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog index 5474c8569ad..71ea157bacf 100644 --- a/include/opcode/ChangeLog +++ b/include/opcode/ChangeLog @@ -1,3 +1,7 @@ +2011-07-01 Nick Clifton + + * avr.h (AVR_ISA_AVR6): Fix typo, adding AVR_ISA_SPMX. + 2011-06-18 Robin Getz * bfin.h (is_macmod_signed): New func diff --git a/include/opcode/avr.h b/include/opcode/avr.h index c754234bd6a..cc03c8018a0 100644 --- a/include/opcode/avr.h +++ b/include/opcode/avr.h @@ -68,7 +68,7 @@ #define AVR_ISA_AVR6 (AVR_ISA_1200 | AVR_ISA_LPM | AVR_ISA_LPMX | \ AVR_ISA_SRAM | AVR_ISA_MEGA | AVR_ISA_MUL | \ AVR_ISA_ELPM | AVR_ISA_ELPMX | AVR_ISA_SPM | \ - AVR_ISA_SPM | AVR_ISA_BRK | AVR_ISA_EIND | \ + AVR_ISA_SPMX | AVR_ISA_BRK | AVR_ISA_EIND | \ AVR_ISA_MOVW) #define REGISTER_P(x) ((x) == 'r' \ diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 2e04791f931..16e907542d0 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,9 @@ +2011-07-01 Nick Clifton + + PR binutils/12329 + * avr-dis.c (avr_operand): Fix disassembly of ELPM, LPM and SPM + insns using post-increment addressing. + 2011-06-30 H.J. Lu * i386-dis.c (vex_len_table): Update rorxS. diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index fafa7f6853d..2e6d4e8ef38 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -2997,6 +2997,9 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given) /* PC relative with immediate offset. */ bfd_vma offset = ((given & 0xf00) >> 4) | (given & 0xf); + if (NEGATIVE_BIT_SET) + offset = - offset; + if (PRE_BIT_SET) { /* Elide positive zero offset. */ diff --git a/opcodes/avr-dis.c b/opcodes/avr-dis.c index 85d7ab3fec6..b895ad53fff 100644 --- a/opcodes/avr-dis.c +++ b/opcodes/avr-dis.c @@ -125,7 +125,8 @@ avr_operand (unsigned int insn, unsigned int insn2, unsigned int pc, int constra { if (*s == '+') { - *buf++ = '+'; + if (insn & (1 << (15 - (s - opcode_str)))) + *buf++ = '+'; break; } } -- 2.30.2