aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2013-06-10 01:04:42 +0000
committerSandra Loosemore <sandra@codesourcery.com>2013-06-10 01:04:42 +0000
commit9daf7bab4f17d991098169b448e30d575c87b36d (patch)
tree866a502237423b8c8ad1322e0d7df2af652d3b5d /gas
parenta7cfa99ecff40a27c2d98e3ead69ce66113e88ad (diff)
downloadgdb-9daf7bab4f17d991098169b448e30d575c87b36d.zip
gdb-9daf7bab4f17d991098169b448e30d575c87b36d.tar.gz
gdb-9daf7bab4f17d991098169b448e30d575c87b36d.tar.bz2
2013-06-09 Sandra Loosemore <sandra@codesourcery.com>
opcodes/ * nios2-opc.c (nios2_builtin_opcodes): Give "trap" a type-"b" argument. gas/ * config/tc-nios2.c (nios2_parse_args): Allow trap argument to omitted. gas/testsuite/ * gas/nios2/trap.s: Add additional test cases for optional argument. * gas/nios2/trap.d: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-nios2.c6
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/nios2/trap.d5
-rw-r--r--gas/testsuite/gas/nios2/trap.s5
5 files changed, 24 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 5e7964d..6c2d60f 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-09 Sandra Loosemore <sandra@codesourcery.com>
+
+ * config/tc-nios2.c (nios2_parse_args): Allow trap argument to
+ omitted.
+
2013-06-08 Catherine Moore <clm@codesourcery.com>
* config/tc-mips.c (is_opcode_valid): Build ASE mask.
diff --git a/gas/config/tc-nios2.c b/gas/config/tc-nios2.c
index 9f303e7..6c91fbe 100644
--- a/gas/config/tc-nios2.c
+++ b/gas/config/tc-nios2.c
@@ -2078,7 +2078,11 @@ nios2_parse_args (nios2_insn_infoS *insn, char *argstr,
parsed_args[i] = NULL;
- if (*parsestr != '\0' && insn->insn_nios2_opcode->match != OP_MATCH_BREAK)
+ /* The argument to break and trap instructions is optional; complain
+ for other cases of missing arguments. */
+ if (*parsestr != '\0'
+ && insn->insn_nios2_opcode->match != OP_MATCH_BREAK
+ && insn->insn_nios2_opcode->match != OP_MATCH_TRAP)
as_bad (_("missing argument"));
}
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index c572d9c..72a20ec 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2013-06-09 Sandra Loosemore <sandra@codesourcery.com>
+
+ * gas/nios2/trap.s: Add additional test cases for optional
+ argument.
+ * gas/nios2/trap.d: Likewise.
+
2013-05-31 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/size-3.d: Updated for text/data/bss section alignment
diff --git a/gas/testsuite/gas/nios2/trap.d b/gas/testsuite/gas/nios2/trap.d
index d9d07f1..0712d86 100644
--- a/gas/testsuite/gas/nios2/trap.d
+++ b/gas/testsuite/gas/nios2/trap.d
@@ -4,4 +4,7 @@
.*: +file format elf32-littlenios2
Disassembly of section .text:
-0+0000 <[^>]*> 003b683a trap
+0+0000 <[^>]*> 003b683a trap 0
+0+0004 <[^>]*> 003b683a trap 0
+0+0008 <[^>]*> 003b6ffa trap 31
+0+000c <[^>]*> 003b6bba trap 14
diff --git a/gas/testsuite/gas/nios2/trap.s b/gas/testsuite/gas/nios2/trap.s
index 1eb3c7e..df260fa 100644
--- a/gas/testsuite/gas/nios2/trap.s
+++ b/gas/testsuite/gas/nios2/trap.s
@@ -1,3 +1,6 @@
-# Source file used to test the ret instructions
+# Source file used to test the trap instructions
foo:
trap
+ trap 0
+ trap 31
+ trap 14