X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=opcodes%2Farc-opc.c;h=27c2303fa13293d1843fe1f2394aca8954943460;hb=234c306803e0b3c423b3935562a029f3bad04482;hp=a17df4b3ce30eb77fcad1866479993df6d4a9fc1;hpb=dc958481429708ecf91f9b2c445063d43397f07e;p=deliverable%2Fbinutils-gdb.git diff --git a/opcodes/arc-opc.c b/opcodes/arc-opc.c index a17df4b3ce..27c2303fa1 100644 --- a/opcodes/arc-opc.c +++ b/opcodes/arc-opc.c @@ -1,5 +1,5 @@ /* Opcode table for the ARC. - Copyright (C) 1994-2017 Free Software Foundation, Inc. + Copyright (C) 1994-2019 Free Software Foundation, Inc. Contributed by Claudiu Zissulescu (claziss@synopsys.com) @@ -651,10 +651,14 @@ static long long extract_w6 (unsigned long long insn, bfd_boolean * invalid ATTRIBUTE_UNUSED) { - unsigned value = 0; + int value = 0; value |= ((insn >> 6) & 0x003f) << 0; + /* Extend the sign. */ + int signbit = 1 << 5; + value = (value ^ signbit) - signbit; + return value; } @@ -1818,7 +1822,9 @@ const struct arc_operand arc_operands[] = #define RAD (RBdup + 1) { 6, 0, 0, ARC_OPERAND_IR | ARC_OPERAND_TRUNCATE, insert_rad, 0 }, -#define RCD (RAD + 1) +#define RAD_CHK (RAD + 1) + { 6, 0, 0, ARC_OPERAND_IR | ARC_OPERAND_TRUNCATE, insert_rad, 0 }, +#define RCD (RAD_CHK + 1) { 6, 6, 0, ARC_OPERAND_IR | ARC_OPERAND_TRUNCATE, insert_rcd, 0 }, /* The plain integer register fields. Used by short