From 22121af151999b1dc165eee856e948812524d81d Mon Sep 17 00:00:00 2001
From: Paul Brook <paul@codesourcery.com>
Date: Sat, 24 Mar 2007 21:29:45 +0000
Subject: 2007-03-24  Paul Brook  <paul@codesourcery.com> 	Mark Shinwell 
 <shinwell@codesourcery.com>

	gas/
	* config/tc-arm.c (operand_parse_code): Add OP_oRRw.
	(parse_operands): Don't expect comma if first operand missing.
	Handle OP_oRRw.
	(do_srs): Encode register number, checking it is r13.  Update comment.
	(insns): Update SRS entries to take a register.

	gas/testsuite/
	* gas/arm/archv6.s: Add new SRS tests.
	* gas/arm/archv6.d: Update expected output.
	* gas/arm/thumb32.s: Add new SRS tests.
	* gas/arm/thumb32.d: Update expected output.
	* gas/arm/srs-t2.d: New.
	* gas/arm/srs-t2.l: New.
	* gas/arm/srs-t2.s: New.
	* gas/arm/srs-arm.d: New.
	* gas/arm/srs-arm.l: New.
	* gas/arm/srs-arm.s: New.

	opcodes/
	* arm-dis.c (arm_opcodes): Print SRS base register.
---
 gas/testsuite/gas/arm/srs-arm.d |  2 ++
 gas/testsuite/gas/arm/srs-arm.l |  5 +++++
 gas/testsuite/gas/arm/srs-arm.s | 16 ++++++++++++++++
 gas/testsuite/gas/arm/srs-t2.d  |  2 ++
 gas/testsuite/gas/arm/srs-t2.l  |  3 +++
 gas/testsuite/gas/arm/srs-t2.s  | 10 ++++++++++
 6 files changed, 38 insertions(+)
 create mode 100644 gas/testsuite/gas/arm/srs-arm.d
 create mode 100644 gas/testsuite/gas/arm/srs-arm.l
 create mode 100644 gas/testsuite/gas/arm/srs-arm.s
 create mode 100644 gas/testsuite/gas/arm/srs-t2.d
 create mode 100644 gas/testsuite/gas/arm/srs-t2.l
 create mode 100644 gas/testsuite/gas/arm/srs-t2.s

(limited to 'gas/testsuite')

diff --git a/gas/testsuite/gas/arm/srs-arm.d b/gas/testsuite/gas/arm/srs-arm.d
new file mode 100644
index 0000000..844c692
--- /dev/null
+++ b/gas/testsuite/gas/arm/srs-arm.d
@@ -0,0 +1,2 @@
+# name: SRS instruction in ARM mode
+# error-output: srs-arm.l
diff --git a/gas/testsuite/gas/arm/srs-arm.l b/gas/testsuite/gas/arm/srs-arm.l
new file mode 100644
index 0000000..ad992f8
--- /dev/null
+++ b/gas/testsuite/gas/arm/srs-arm.l
@@ -0,0 +1,5 @@
+[^:]*: Assembler messages:
+[^:]*:12: Error: SRS base register must be r13 -- `srsdb r4,#13'
+[^:]*:13: Error: SRS base register must be r13 -- `srsda r4,#13'
+[^:]*:14: Error: SRS base register must be r13 -- `srsia r4,#13'
+[^:]*:15: Error: SRS base register must be r13 -- `srsib r4,#13'
diff --git a/gas/testsuite/gas/arm/srs-arm.s b/gas/testsuite/gas/arm/srs-arm.s
new file mode 100644
index 0000000..7d00fc8
--- /dev/null
+++ b/gas/testsuite/gas/arm/srs-arm.s
@@ -0,0 +1,16 @@
+       .arch   armv6
+
+foo:
+       srsdb   r13, #13
+       srsdb   r13!, #13
+       srsia   r13, #13
+       srsia   r13!, #13
+       srsda   r13, #13
+       srsda   r13!, #13
+       srsib   r13, #13
+       srsib   r13!, #13
+       srsdb   r4, #13
+       srsda   r4, #13
+       srsia   r4, #13
+       srsib   r4, #13
+
diff --git a/gas/testsuite/gas/arm/srs-t2.d b/gas/testsuite/gas/arm/srs-t2.d
new file mode 100644
index 0000000..dfa57db
--- /dev/null
+++ b/gas/testsuite/gas/arm/srs-t2.d
@@ -0,0 +1,2 @@
+# name: SRS instruction in Thumb-2 mode
+# error-output: srs-t2.l
diff --git a/gas/testsuite/gas/arm/srs-t2.l b/gas/testsuite/gas/arm/srs-t2.l
new file mode 100644
index 0000000..f070375
--- /dev/null
+++ b/gas/testsuite/gas/arm/srs-t2.l
@@ -0,0 +1,3 @@
+[^:]*: Assembler messages:
+[^:]*:8: Error: SRS base register must be r13 -- `srsdb r4,#13'
+[^:]*:9: Error: SRS base register must be r13 -- `srsia r4,#13'
diff --git a/gas/testsuite/gas/arm/srs-t2.s b/gas/testsuite/gas/arm/srs-t2.s
new file mode 100644
index 0000000..7132626
--- /dev/null
+++ b/gas/testsuite/gas/arm/srs-t2.s
@@ -0,0 +1,10 @@
+       .arch   armv6t2
+
+foo:
+       srsdb   r13, #13
+       srsdb   r13!, #13
+       srsia   r13, #13
+       srsia   r13!, #13
+       srsdb   r4, #13
+       srsia   r4, #13
+
-- 
cgit v1.1