aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2016-08-19 12:57:20 +0100
committerNick Clifton <nickc@redhat.com>2016-08-19 12:58:49 +0100
commit873f10f02f5959ce9b74cc5b599f5006147de940 (patch)
treecc5f5385bddb342e589d152abff9868161c6e6af /gas/testsuite
parent0646e07d6e88045d650ee1ec5b674da1cdeaa6b6 (diff)
downloadgdb-873f10f02f5959ce9b74cc5b599f5006147de940.zip
gdb-873f10f02f5959ce9b74cc5b599f5006147de940.tar.gz
gdb-873f10f02f5959ce9b74cc5b599f5006147de940.tar.bz2
ARM: Issue a warning when the MRRC and MRRC2 instructions are used with the same destination registers.
* 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.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/arm/dest-unpredictable.d2
-rw-r--r--gas/testsuite/gas/arm/dest-unpredictable.l5
-rw-r--r--gas/testsuite/gas/arm/dest-unpredictable.s29
3 files changed, 36 insertions, 0 deletions
diff --git a/gas/testsuite/gas/arm/dest-unpredictable.d b/gas/testsuite/gas/arm/dest-unpredictable.d
new file mode 100644
index 0000000..129d08c
--- /dev/null
+++ b/gas/testsuite/gas/arm/dest-unpredictable.d
@@ -0,0 +1,2 @@
+# name: Unpredictable MRRC and MRRC2 instructions. - ARM
+# error-output: dest-unpredictable.l
diff --git a/gas/testsuite/gas/arm/dest-unpredictable.l b/gas/testsuite/gas/arm/dest-unpredictable.l
new file mode 100644
index 0000000..7c17c25
--- /dev/null
+++ b/gas/testsuite/gas/arm/dest-unpredictable.l
@@ -0,0 +1,5 @@
+[^:]*: 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'
diff --git a/gas/testsuite/gas/arm/dest-unpredictable.s b/gas/testsuite/gas/arm/dest-unpredictable.s
new file mode 100644
index 0000000..fae22be
--- /dev/null
+++ b/gas/testsuite/gas/arm/dest-unpredictable.s
@@ -0,0 +1,29 @@
+.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