From e4d0d12b41075e705e78d21cbb087850f2c1a27b Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Sat, 24 Mar 2007 21:29:45 +0000 Subject: [PATCH] 2007-03-24 Paul Brook Mark Shinwell 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 diff --git a/gas/testsuite/gas/arm/srs-arm.d b/gas/testsuite/gas/arm/srs-arm.d new file mode 100644 index 0000000000..844c692dd9 --- /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 0000000000..ad992f8f71 --- /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 0000000000..7d00fc8f0d --- /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 0000000000..dfa57dbd8a --- /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 0000000000..f070375919 --- /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 0000000000..7132626a59 --- /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 + -- 2.11.0