X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=opcodes%2Favr-dis.c;h=23d5b3f6f2c834c96e0c1c00c140960895838e16;hb=5018ce90c1205d79f29adf954b0fd5e613d08430;hp=e32c2b6fe43dbadfc56a3c8d480cd0b393bc1e10;hpb=0a7e10188e3c08403fb00b728644d7a95092c732;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/avr-dis.c b/opcodes/avr-dis.c index e32c2b6fe4..23d5b3f6f2 100644 --- a/opcodes/avr-dis.c +++ b/opcodes/avr-dis.c @@ -1,5 +1,5 @@ /* Disassemble AVR instructions. - Copyright (C) 1999-2016 Free Software Foundation, Inc. + Copyright (C) 1999-2020 Free Software Foundation, Inc. Contributed by Denis Chertykov @@ -22,7 +22,7 @@ #include "sysdep.h" #include -#include "dis-asm.h" +#include "disassemble.h" #include "opintl.h" #include "libiberty.h" #include "bfd_stdint.h" @@ -198,6 +198,8 @@ avr_operand (unsigned int insn, unsigned int insn2, unsigned int pc, int constra { unsigned int val = ((insn & 0xf) | ((insn & 0x600) >> 5) | ((insn & 0x100) >> 2)); + if ((insn & 0x100) == 0) + val |= 0x80; *sym = 1; *sym_addr = val | 0x800000; sprintf (buf, "0x%02x", val); @@ -212,7 +214,8 @@ avr_operand (unsigned int insn, unsigned int insn2, unsigned int pc, int constra case 'n': sprintf (buf, "??"); - fprintf (stderr, _("Internal disassembler error")); + /* xgettext:c-format */ + opcodes_error_handler (_("internal disassembler error")); ok = 0; break; @@ -265,7 +268,8 @@ avr_operand (unsigned int insn, unsigned int insn2, unsigned int pc, int constra default: sprintf (buf, "??"); - fprintf (stderr, _("unknown constraint `%c'"), constraint); + /* xgettext:c-format */ + opcodes_error_handler (_("unknown constraint `%c'"), constraint); ok = 0; }