aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2013-03-12 02:20:08 +0000
committerSandra Loosemore <sandra@codesourcery.com>2013-03-12 02:20:08 +0000
commitf5cb796a1ebfdf5bb5539acce0d6567e2ed594ce (patch)
tree21129fcef7a9e54a0869223fcad748dd9a6bfbb4 /gas
parent21fde85cfdf7ab1aaa4c24e18c16f99d5b8cc1a1 (diff)
downloadgdb-f5cb796a1ebfdf5bb5539acce0d6567e2ed594ce.zip
gdb-f5cb796a1ebfdf5bb5539acce0d6567e2ed594ce.tar.gz
gdb-f5cb796a1ebfdf5bb5539acce0d6567e2ed594ce.tar.bz2
2013-03-11 Sebastian Huber <sebastian.huber@embedded-brains.de>
include/ * opcode/nios2.h (OP_RDPRS): New define. (OP_MATCH_RDPRS): Likewise. opcodes/ * nios2-opc.c (nios2_builtin_opcodes): Add entry for rdprs. gas/testsuite/ * gas/nios2/nios2.exp: Run rdprs. * gas/nios2/rdprs.d: New file. * gas/nios2/rdprs.s: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/nios2/nios2.exp1
-rw-r--r--gas/testsuite/gas/nios2/rdprs.d35
-rw-r--r--gas/testsuite/gas/nios2/rdprs.s32
4 files changed, 74 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 5b5306f..ad321f7 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2013-03-11 Sebastian Huber <sebastian.huber@embedded-brains.de>
+ * gas/nios2/nios2.exp: Run rdprs.
+ * gas/nios2/rdprs.d: New file.
+ * gas/nios2/rdprs.s: Likewise.
+
+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.
diff --git a/gas/testsuite/gas/nios2/nios2.exp b/gas/testsuite/gas/nios2/nios2.exp
index 13be1c1..173db00 100644
--- a/gas/testsuite/gas/nios2/nios2.exp
+++ b/gas/testsuite/gas/nios2/nios2.exp
@@ -53,6 +53,7 @@ if { [istarget nios2-*-*] } then {
run_dump_test "ret"
run_dump_test "rotate"
run_dump_test "registers"
+ run_dump_test "rdprs"
run_dump_test "stw"
run_dump_test "sth"
diff --git a/gas/testsuite/gas/nios2/rdprs.d b/gas/testsuite/gas/nios2/rdprs.d
new file mode 100644
index 0000000..f5a87cd
--- /dev/null
+++ b/gas/testsuite/gas/nios2/rdprs.d
@@ -0,0 +1,35 @@
+#objdump: -dr --prefix-addresses --show-raw-insn
+#name: NIOS2 rdprs
+
+# Test the rdprs instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> 00000038 rdprs zero,zero,0
+0+0004 <[^>]*> 00000078 rdprs zero,zero,1
+0+0008 <[^>]*> 000000b8 rdprs zero,zero,2
+0+000c <[^>]*> 00000138 rdprs zero,zero,4
+0+0010 <[^>]*> 00000238 rdprs zero,zero,8
+0+0014 <[^>]*> 00000438 rdprs zero,zero,16
+0+0018 <[^>]*> 00000838 rdprs zero,zero,32
+0+001c <[^>]*> 00001038 rdprs zero,zero,64
+0+0020 <[^>]*> 00002038 rdprs zero,zero,128
+0+0024 <[^>]*> 00004038 rdprs zero,zero,256
+0+0028 <[^>]*> 00008038 rdprs zero,zero,512
+0+002c <[^>]*> 00010038 rdprs zero,zero,1024
+0+0030 <[^>]*> 00020038 rdprs zero,zero,2048
+0+0034 <[^>]*> 00040038 rdprs zero,zero,4096
+0+0038 <[^>]*> 00080038 rdprs zero,zero,8192
+0+003c <[^>]*> 00100038 rdprs zero,zero,16384
+0+0040 <[^>]*> 00200038 rdprs zero,zero,-32768
+0+0044 <[^>]*> 00400038 rdprs at,zero,0
+0+0048 <[^>]*> 00800038 rdprs r2,zero,0
+0+004c <[^>]*> 01000038 rdprs r4,zero,0
+0+0050 <[^>]*> 02000038 rdprs r8,zero,0
+0+0054 <[^>]*> 04000038 rdprs r16,zero,0
+0+0058 <[^>]*> 08000038 rdprs zero,at,0
+0+005c <[^>]*> 10000038 rdprs zero,r2,0
+0+0060 <[^>]*> 20000038 rdprs zero,r4,0
+0+0064 <[^>]*> 40000038 rdprs zero,r8,0
+0+0068 <[^>]*> 80000038 rdprs zero,r16,0
diff --git a/gas/testsuite/gas/nios2/rdprs.s b/gas/testsuite/gas/nios2/rdprs.s
new file mode 100644
index 0000000..fb4909d
--- /dev/null
+++ b/gas/testsuite/gas/nios2/rdprs.s
@@ -0,0 +1,32 @@
+# Source file used to test the rdprs instruction
+
+.set noat
+
+foo:
+ rdprs zero, zero, 0
+ rdprs zero, zero, 1
+ rdprs zero, zero, 2
+ rdprs zero, zero, 4
+ rdprs zero, zero, 8
+ rdprs zero, zero, 16
+ rdprs zero, zero, 32
+ rdprs zero, zero, 64
+ rdprs zero, zero, 128
+ rdprs zero, zero, 256
+ rdprs zero, zero, 512
+ rdprs zero, zero, 1024
+ rdprs zero, zero, 2048
+ rdprs zero, zero, 4096
+ rdprs zero, zero, 8192
+ rdprs zero, zero, 16384
+ rdprs zero, zero, -32768
+ rdprs at, zero, 0
+ rdprs r2, zero, 0
+ rdprs r4, zero, 0
+ rdprs r8, zero, 0
+ rdprs r16, zero, 0
+ rdprs zero, at, 0
+ rdprs zero, r2, 0
+ rdprs zero, r4, 0
+ rdprs zero, r8, 0
+ rdprs zero, r16, 0