+2016-08-19 Tamar Christina <tamar.christina@arm.com>
+
+ * config/tc-arm.c (do_co_reg2c): Added constraint.
+ * testsuite/gas/arm/dest-unpredictable.s: New.
+ * testsuite/gas/arm/dest-unpredictable.l: New.
+ * testsuite/gas/arm/dest-unpredictable.d: New.
+
2016-08-19 Nick Clifton <nickc@redhat.com>
* testsuite/gas/i386/ilp32/x86-64-unwind.d: Adjust expected
constraint (Rn == REG_PC, BAD_PC);
}
+ /* Only check the MRRC{2} variants. */
+ if ((inst.instruction & 0x0FF00000) == 0x0C500000)
+ {
+ /* If Rd == Rn, error that the operation is
+ unpredictable (example MRRC p3,#1,r1,r1,c4). */
+ constraint (Rd == Rn, BAD_OVERLAP);
+ }
+
inst.instruction |= inst.operands[0].reg << 8;
inst.instruction |= inst.operands[1].imm << 4;
inst.instruction |= Rd << 12;
--- /dev/null
+[^:]*: Assembler messages:
+[^:]*:6: Error: registers may not be the same -- `mrrc p0,#1,r1,r1,c4'
+[^:]*:7: Error: registers may not be the same -- `mrrc2 p0,#1,r1,r1,c4'
+[^:]*:20: Error: registers may not be the same -- `mrrc p0,#1,r1,r1,c4'
+[^:]*:21: Error: registers may not be the same -- `mrrc2 p0,#1,r1,r1,c4'
--- /dev/null
+.syntax unified
+
+.arm
+
+@ warnings
+mrrc p0,#1,r1,r1,c4 @ unpredictable
+mrrc2 p0,#1,r1,r1,c4 @ ditto
+
+@ normal
+mrrc p0,#1,r1,r2,c4 @ predictable
+mrrc2 p0,#1,r1,r2,c4 @ ditto
+mcrr p0,#1,r1,r2,c4 @ ditto
+mcrr2 p0,#1,r1,r2,c4 @ ditto
+mcrr p0,#1,r1,r1,c4 @ ditto
+mcrr2 p0,#1,r1,r1,c4 @ ditto
+
+.thumb
+
+@ warnings
+mrrc p0,#1,r1,r1,c4 @ unpredictable
+mrrc2 p0,#1,r1,r1,c4 @ ditto
+
+@ normal
+mrrc p0,#1,r1,r2,c4 @ predictable
+mrrc2 p0,#1,r1,r2,c4 @ ditto
+mcrr p0,#1,r1,r2,c4 @ ditto
+mcrr2 p0,#1,r1,r2,c4 @ ditto
+mcrr p0,#1,r1,r1,c4 @ ditto
+mcrr2 p0,#1,r1,r1,c4 @ ditto