Simplify calls to init_psymbol_list
[deliverable/binutils-gdb.git] / opcodes / arc-opc.c
index 56c9aaffa86a44ee19c46a10db303b323782ac63..fe2c4fae6323d6defa49a03c9d14026f6ea272f7 100644 (file)
@@ -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)
 
@@ -171,6 +171,8 @@ insert_rhv2 (unsigned long long  insn,
 {
   if (value == 0x1E)
     *errmsg = _("register R30 is a limm indicator");
+  else if (value < 0 || value > 31)
+    *errmsg = _("register out of range");
   return insn |= ((value & 0x07) << 5) | ((value >> 3) & 0x03);
 }
 
@@ -649,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;
 }
 
This page took 0.023759 seconds and 4 git commands to generate.