From 21fde85cfdf7ab1aaa4c24e18c16f99d5b8cc1a1 Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Tue, 12 Mar 2013 01:41:41 +0000 Subject: [PATCH] 2013-03-11 Sebastian Huber 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. --- gas/testsuite/ChangeLog | 6 ++++ gas/testsuite/gas/nios2/nios2.exp | 1 + gas/testsuite/gas/nios2/registers.d | 51 +++++++++++++++++++++++++++++ gas/testsuite/gas/nios2/registers.s | 51 +++++++++++++++++++++++++++++ opcodes/ChangeLog | 4 +++ opcodes/nios2-opc.c | 1 + 6 files changed, 114 insertions(+) create mode 100644 gas/testsuite/gas/nios2/registers.d create mode 100644 gas/testsuite/gas/nios2/registers.s diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 7b2cdab46ef..5b5306ffd7a 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2013-03-11 Sebastian Huber + + * gas/nios2/nios2.exp: Run registers. + * gas/nios2/registers.d: New file. + * gas/nios2/registers.s: Likewise. + 2013-03-11 Kyrylo Tkachov * gas/arm/crc32-bad.d: New file. diff --git a/gas/testsuite/gas/nios2/nios2.exp b/gas/testsuite/gas/nios2/nios2.exp index 38935e23f6c..13be1c10c04 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 00000000000..f92bda16e82 --- /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 00000000000..df8217f9420 --- /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 d7fe4a526e1..1419f3d6dfa 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2013-03-11 Sebastian Huber + + * nios2-opc.c (nios2_builtin_regs): Add sstatus alias for ba register. + 2013-03-11 Kyrylo Tkachov * arm-dis.c (arm_opcodes): Add entries for CRC instructions. diff --git a/opcodes/nios2-opc.c b/opcodes/nios2-opc.c index d5094aca5ec..ff24652ae5a 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. */ -- 2.30.2