aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2013-03-12 01:41:41 +0000
committerSandra Loosemore <sandra@codesourcery.com>2013-03-12 01:41:41 +0000
commit21fde85cfdf7ab1aaa4c24e18c16f99d5b8cc1a1 (patch)
treebc851d0da51ddbe0dd9cb7269b4c16dc8d80758c
parent57420c208463c85912f56abf49ce9f3546f9fbe7 (diff)
downloadgdb-21fde85cfdf7ab1aaa4c24e18c16f99d5b8cc1a1.zip
gdb-21fde85cfdf7ab1aaa4c24e18c16f99d5b8cc1a1.tar.gz
gdb-21fde85cfdf7ab1aaa4c24e18c16f99d5b8cc1a1.tar.bz2
2013-03-11 Sebastian Huber <sebastian.huber@embedded-brains.de>
opcodes/ * nios2-opc.c (nios2_builtin_regs): Add sstatus alias for ba register. gas/testsuite/ * gas/nios2/nios2.exp: Run registers. * gas/nios2/registers.d: New file. * gas/nios2/registers.s: Likewise.
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/nios2/nios2.exp1
-rw-r--r--gas/testsuite/gas/nios2/registers.d51
-rw-r--r--gas/testsuite/gas/nios2/registers.s51
-rw-r--r--opcodes/ChangeLog4
-rw-r--r--opcodes/nios2-opc.c1
6 files changed, 114 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 7b2cdab..5b5306f 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2013-03-11 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * gas/nios2/nios2.exp: Run registers.
+ * gas/nios2/registers.d: New file.
+ * gas/nios2/registers.s: Likewise.
+
2013-03-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gas/arm/crc32-bad.d: New file.
diff --git a/gas/testsuite/gas/nios2/nios2.exp b/gas/testsuite/gas/nios2/nios2.exp
index 38935e2..13be1c1 100644
--- a/gas/testsuite/gas/nios2/nios2.exp
+++ b/gas/testsuite/gas/nios2/nios2.exp
@@ -52,6 +52,7 @@ if { [istarget nios2-*-*] } then {
run_dump_test "ctl"
run_dump_test "ret"
run_dump_test "rotate"
+ run_dump_test "registers"
run_dump_test "stw"
run_dump_test "sth"
diff --git a/gas/testsuite/gas/nios2/registers.d b/gas/testsuite/gas/nios2/registers.d
new file mode 100644
index 0000000..f92bda1
--- /dev/null
+++ b/gas/testsuite/gas/nios2/registers.d
@@ -0,0 +1,51 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 registers
+
+# Test the register names
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> movi zero,123
+0+0004 <[^>]*> movi at,123
+0+0008 <[^>]*> movi r2,123
+0+000c <[^>]*> movi r3,123
+0+0010 <[^>]*> movi r4,123
+0+0014 <[^>]*> movi r5,123
+0+0018 <[^>]*> movi r6,123
+0+001c <[^>]*> movi r7,123
+0+0020 <[^>]*> movi r8,123
+0+0024 <[^>]*> movi r9,123
+0+0028 <[^>]*> movi r10,123
+0+002c <[^>]*> movi r11,123
+0+0030 <[^>]*> movi r12,123
+0+0034 <[^>]*> movi r13,123
+0+0038 <[^>]*> movi r14,123
+0+003c <[^>]*> movi r15,123
+0+0040 <[^>]*> movi r16,123
+0+0044 <[^>]*> movi r17,123
+0+0048 <[^>]*> movi r18,123
+0+004c <[^>]*> movi r19,123
+0+0050 <[^>]*> movi r20,123
+0+0054 <[^>]*> movi r21,123
+0+0058 <[^>]*> movi r22,123
+0+005c <[^>]*> movi r23,123
+0+0060 <[^>]*> movi et,123
+0+0064 <[^>]*> movi bt,123
+0+0068 <[^>]*> movi gp,123
+0+006c <[^>]*> movi sp,123
+0+0070 <[^>]*> movi fp,123
+0+0074 <[^>]*> movi ea,123
+0+0078 <[^>]*> movi ba,123
+0+007c <[^>]*> movi ra,123
+0+0080 <[^>]*> movi zero,123
+0+0084 <[^>]*> movi at,123
+0+0088 <[^>]*> movi et,123
+0+008c <[^>]*> movi bt,123
+0+0090 <[^>]*> movi gp,123
+0+0094 <[^>]*> movi sp,123
+0+0098 <[^>]*> movi fp,123
+0+009c <[^>]*> movi ea,123
+0+00a0 <[^>]*> movi ba,123
+0+00a4 <[^>]*> movi ba,123
+0+00a8 <[^>]*> movi ra,123
diff --git a/gas/testsuite/gas/nios2/registers.s b/gas/testsuite/gas/nios2/registers.s
new file mode 100644
index 0000000..df8217f
--- /dev/null
+++ b/gas/testsuite/gas/nios2/registers.s
@@ -0,0 +1,51 @@
+# Source file used to test the register names
+
+.set noat
+.set nobreak
+
+foo:
+# Standard register names
+ movi zero, 123
+ movi at, 123
+ movi r2, 123
+ movi r3, 123
+ movi r4, 123
+ movi r5, 123
+ movi r6, 123
+ movi r7, 123
+ movi r8, 123
+ movi r9, 123
+ movi r10, 123
+ movi r11, 123
+ movi r12, 123
+ movi r13, 123
+ movi r14, 123
+ movi r15, 123
+ movi r16, 123
+ movi r17, 123
+ movi r18, 123
+ movi r19, 123
+ movi r20, 123
+ movi r21, 123
+ movi r22, 123
+ movi r23, 123
+ movi et, 123
+ movi bt, 123
+ movi gp, 123
+ movi sp, 123
+ movi fp, 123
+ movi ea, 123
+ movi ba, 123
+ movi ra, 123
+# Alternative names for special registers
+ movi r0, 123
+ movi r1, 123
+ movi r24, 123
+ movi r25, 123
+ movi r26, 123
+ movi r27, 123
+ movi r28, 123
+ movi r29, 123
+ movi r30, 123
+ movi sstatus, 123
+ movi r31, 123
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index d7fe4a5..1419f3d 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,7 @@
+2013-03-11 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * nios2-opc.c (nios2_builtin_regs): Add sstatus alias for ba register.
+
2013-03-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* arm-dis.c (arm_opcodes): Add entries for CRC instructions.
diff --git a/opcodes/nios2-opc.c b/opcodes/nios2-opc.c
index d5094ac..ff24652 100644
--- a/opcodes/nios2-opc.c
+++ b/opcodes/nios2-opc.c
@@ -71,6 +71,7 @@ const struct nios2_reg nios2_builtin_regs[] = {
{"r28", 28},
{"r29", 29},
{"r30", 30},
+ {"sstatus", 30},
{"r31", 31},
/* Control register names. */