For ARCv2, h-regs are only valid unitl r31.
gas/
2017-11-21 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/gas/arc/hregs-err.s: New test.
opcodes/
2017-11-21 Claudiu Zissulescu <claziss@synopsys.com>
* arc-opc.c (insert_rhv2): Check h-regs range.
+2017-11-22 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * testsuite/gas/arc/hregs-err.s: New test.
+
2017-11-21 H.J. Lu <hongjiu.lu@intel.com>
PR gas/22464
--- /dev/null
+; { dg-do assemble { target arc*-*-* } }
+ .cpu HS
+ .text
+ ld_s r0,[r32,28] ; { dg-error "Error: register must be R1 for instruction 'ld_s'" }
+ ld_s r0,[r28,28]
+ ld_s r1,[r32,28] ; { dg-error "Error: register must be GP for instruction 'ld_s'" }
+ ld_s r2,[r32,28] ; { dg-error "Error: register must be R1 for instruction 'ld_s'" }
+ ld_s r3,[pcl,0x10]
+ add_s r0,r0,r32 ; { dg-error "Error: inappropriate arguments for opcode 'add_s'" }
+ add_s r0,r0,r28
+ mov_s.ne r0,r32 ; { dg-error "Error: inappropriate arguments for opcode 'mov_s'" }
+2017-11-22 Claudiu Zissulescu <claziss@synopsys.com>
+
+ *arc-opc (insert_rhv2): Check h-regs range.
+
2017-11-21 Claudiu Zissulescu <claziss@synopsys.com>
* arc-dis.c (print_insn_arc): Pretty print pc-relative offsets.
{
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);
}