This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch 5/9] Nios II support, new gas tests
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Thu, 24 Jan 2013 13:05:07 -0700
- Subject: [patch 5/9] Nios II support, new gas tests
Here are a bunch of new assembler tests for the Nios II port.
-Sandra
2013-01-24 Sandra Loosemore <sandra@codesourcery.com>
Andrew Jenner <andrew@codesourcery.com>
Based on patches from Altera Corporation.
gas/testsuite/
* gas/nios2/add.d: New.
* gas/nios2/add.s: New.
* gas/nios2/align_fill.d: New.
* gas/nios2/align_fill.s: New.
* gas/nios2/align_text.d: New.
* gas/nios2/align_text.s: New.
* gas/nios2/and.d: New.
* gas/nios2/and.s: New.
* gas/nios2/branch.d: New.
* gas/nios2/branch.s: New.
* gas/nios2/break.d: New.
* gas/nios2/break.s: New.
* gas/nios2/bret.d: New.
* gas/nios2/bret.s: New.
* gas/nios2/cache.d: New.
* gas/nios2/cache.s: New.
* gas/nios2/call26.d: New.
* gas/nios2/call26.s: New.
* gas/nios2/call.d: New.
* gas/nios2/call.s: New.
* gas/nios2/cmp.d: New.
* gas/nios2/cmp.s: New.
* gas/nios2/comments.d: New.
* gas/nios2/comments.s: New.
* gas/nios2/complex.d: New.
* gas/nios2/complex.s: New.
* gas/nios2/ctl.d: New.
* gas/nios2/ctl.s: New.
* gas/nios2/custom.d: New.
* gas/nios2/custom.s: New.
* gas/nios2/etbt.d: New.
* gas/nios2/etbt.s: New.
* gas/nios2/flushda.d: New.
* gas/nios2/flushda.s: New.
* gas/nios2/illegal.l: New.
* gas/nios2/illegal.s: New.
* gas/nios2/jmp.d: New.
* gas/nios2/jmp.s: New.
* gas/nios2/ldb.d: New.
* gas/nios2/ldb.s: New.
* gas/nios2/ldh.d: New.
* gas/nios2/ldh.s: New.
* gas/nios2/ldw.d: New.
* gas/nios2/ldw.s: New.
* gas/nios2/lineseparator.d: New.
* gas/nios2/lineseparator.s: New.
* gas/nios2/mov.d: New.
* gas/nios2/movia.d: New.
* gas/nios2/movia.s: New.
* gas/nios2/movi.d: New.
* gas/nios2/movi.s: New.
* gas/nios2/mov.s: New.
* gas/nios2/mul.d: New.
* gas/nios2/mul.s: New.
* gas/nios2/nios2.exp: New.
* gas/nios2/nor.d: New.
* gas/nios2/nor.s: New.
* gas/nios2/or.d: New.
* gas/nios2/or.s: New.
* gas/nios2/ret.d: New.
* gas/nios2/ret.s: New.
* gas/nios2/rol.d: New.
* gas/nios2/rol.s: New.
* gas/nios2/rotate.d: New.
* gas/nios2/rotate.s: New.
* gas/nios2/stb.d: New.
* gas/nios2/stb.s: New.
* gas/nios2/sth.d: New.
* gas/nios2/sth.s: New.
* gas/nios2/stw.d: New.
* gas/nios2/stw.s: New.
* gas/nios2/sub.d: New.
* gas/nios2/sub.s: New.
* gas/nios2/sync.d: New.
* gas/nios2/sync.s: New.
* gas/nios2/trap.d: New.
* gas/nios2/trap.s: New.
* gas/nios2/tret.d: New.
* gas/nios2/tret.s: New.
* gas/nios2/warn_noat.l: New.
* gas/nios2/warn_noat.s: New.
* gas/nios2/warn_nobreak.l: New.
* gas/nios2/warn_nobreak.s: New.
* gas/nios2/xor.d: New.
* gas/nios2/xor.s: New.
Index: gas/testsuite/gas/nios2/add.d
===================================================================
RCS file: gas/testsuite/gas/nios2/add.d
diff -N gas/testsuite/gas/nios2/add.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/add.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,16 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 add
+
+# Test the add instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> add r4,r4,r4
+0+0004 <[^>]*> addi r4,r4,32767
+0+0008 <[^>]*> addi r4,r4,-32768
+0+000c <[^>]*> addi r4,r4,0
+0+0010 <[^>]*> addi r4,r4,-1
+0+0014 <[^>]*> addi r4,r4,-1
+0+0018 <[^>]*> addi r4,r4,13398
+0+001c <[^>]*> nop
Index: gas/testsuite/gas/nios2/add.s
===================================================================
RCS file: gas/testsuite/gas/nios2/add.s
diff -N gas/testsuite/gas/nios2/add.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/add.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,13 @@
+# Source file used to test the add and addi instructions.
+
+foo:
+ add r4,r4,r4
+ addi r4,r4,0x7fff
+ addi r4,r4,-0x8000
+ addi r4,r4,0x0
+ addi r4,r4,-0x01
+ subi r4,r4,0x01
+ addi r4,r4,0x3456
+
+# should disassemble to add r0,0,r0
+ nop
Index: gas/testsuite/gas/nios2/align_fill.d
===================================================================
RCS file: gas/testsuite/gas/nios2/align_fill.d
diff -N gas/testsuite/gas/nios2/align_fill.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/align_fill.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,23 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 align_fill
+
+# Test the and macro.
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> addi sp,sp,-8
+0+0004 <[^>]*> stw fp,4\(sp\)
+0+0008 <[^>]*> mov fp,sp
+0+000c <[^>]*> mov r3,zero
+0+0010 <[^>]*> nop
+0+0014 <[^>]*> nop
+0+0018 <[^>]*> nop
+0+001c <[^>]*> nop
+0+0020 <[^>]*> addi r3,r3,1
+0+0024 <[^>]*> cmplti r2,r3,100
+0+0028 <[^>]*> bne r2,zero,0+0020 <[^>*]*>
+0+002c <[^>]*> ldw fp,4\(sp\)
+0+0030 <[^>]*> addi sp,sp,8
+0+0034 <[^>]*> ret
+ ...
Index: gas/testsuite/gas/nios2/align_fill.s
===================================================================
RCS file: gas/testsuite/gas/nios2/align_fill.s
diff -N gas/testsuite/gas/nios2/align_fill.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/align_fill.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,20 @@
+ .file "a.c"
+ .section .text
+ .align 3
+ .global x
+ .type x, @function
+x:
+ addi sp, sp, -8
+ stw fp, 4(sp)
+ mov fp, sp
+ mov r3, zero
+ .align 5
+.L6:
+ addi r3, r3, 1
+ cmplti r2, r3, 100
+ bne r2, zero, .L6
+ ldw fp, 4(sp)
+ addi sp, sp, 8
+ ret
+ .size x, .-x
+ .ident "GCC: (GNU) 3.3.3 (Altera Nios II 1.0 b302)"
Index: gas/testsuite/gas/nios2/align_text.d
===================================================================
RCS file: gas/testsuite/gas/nios2/align_text.d
diff -N gas/testsuite/gas/nios2/align_text.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/align_text.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,22 @@
+#objdump: -dr
+#name: NIOS2 align_test
+
+# Test alignment in text sections.
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+00000000 <label-0x20>:
+ 0: 00000000 call 0 <label-0x20>
+ 4: 0001883a nop
+ 8: 0001883a nop
+ c: 0001883a nop
+ 10: 0001883a nop
+ 14: 0001883a nop
+ 18: 0001883a nop
+ 1c: 0001883a nop
+
+00000020 <label>:
+ 20: 0001883a nop
+00000024 <label2>:
+ ...
Index: gas/testsuite/gas/nios2/align_text.s
===================================================================
RCS file: gas/testsuite/gas/nios2/align_text.s
diff -N gas/testsuite/gas/nios2/align_text.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/align_text.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,15 @@
+ .asciz "" # empty string
+ .align 2
+
+ nop
+ nop
+ label:
+ .align 5
+ nop
+ label2:
+ .section mysection
+ .align 2
+
+
+
+
Index: gas/testsuite/gas/nios2/and.d
===================================================================
RCS file: gas/testsuite/gas/nios2/and.d
diff -N gas/testsuite/gas/nios2/and.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/and.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,17 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 and
+
+# Test the and macro.
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> and r4,r4,r4
+0+0004 <[^>]*> andi r4,r4,32767
+0+0008 <[^>]*> andi r4,r4,32768
+0+000c <[^>]*> andi r4,r4,65535
+0+0010 <[^>]*> andi r4,r4,0
+0+0014 <[^>]*> andhi r4,r4,32767
+0+0018 <[^>]*> andhi r4,r4,32768
+0+001c <[^>]*> andhi r4,r4,65535
+0+0020 <[^>]*> andhi r4,r4,0
Index: gas/testsuite/gas/nios2/and.s
===================================================================
RCS file: gas/testsuite/gas/nios2/and.s
diff -N gas/testsuite/gas/nios2/and.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/and.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,13 @@
+# Source file used to test the and, andhi and andi instructions
+
+foo:
+ and r4,r4,r4
+ andi r4,r4,0x7fff
+ andi r4,r4,0x8000
+ andi r4,r4,0xffff
+ andi r4,r4,0x0
+ andhi r4,r4,0x7fff
+ andhi r4,r4,0x8000
+ andhi r4,r4,0xffff
+ andhi r4,r4,0x0
+
Index: gas/testsuite/gas/nios2/branch.d
===================================================================
RCS file: gas/testsuite/gas/nios2/branch.d
diff -N gas/testsuite/gas/nios2/branch.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/branch.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,21 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 branch
+
+# Test the branch instructions.
+dump.o: file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> beq r4,r5,00000004 <text_label\+0x4>
+[ ]*0: R_NIOS2_PCREL16 text_label
+0+0004 <[^>]*> bge r4,r5,00000008 <text_label\+0x8>
+[ ]*4: R_NIOS2_PCREL16 text_label
+0+0008 <[^>]*> bgeu r4,r5,0000000c <text_label\+0xc>
+[ ]*8: R_NIOS2_PCREL16 text_label
+0+000c <[^>]*> blt r4,r5,00000010 <text_label\+0x10>
+[ ]*c: R_NIOS2_PCREL16 text_label
+0+0010 <[^>]*> bltu r4,r5,00000014 <text_label\+0x14>
+[ ]*10: R_NIOS2_PCREL16 text_label
+0+0014 <[^>]*> bne r4,r5,00000018 <text_label\+0x18>
+[ ]*14: R_NIOS2_PCREL16 text_label
+0+0018 <[^>]*> br 0000001c <text_label\+0x1c>
+[ ]*18: R_NIOS2_PCREL16 external_label
Index: gas/testsuite/gas/nios2/branch.s
===================================================================
RCS file: gas/testsuite/gas/nios2/branch.s
diff -N gas/testsuite/gas/nios2/branch.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/branch.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,15 @@
+# Source file used to test the beq macro.
+ .globl text_label
+ .text
+.set norelax
+text_label:
+ beq r4,r5,text_label
+ bge r4,r5,text_label
+ bgeu r4,r5,text_label
+ blt r4,r5,text_label
+ bltu r4,r5,text_label
+ bne r4,r5,text_label
+
+# Branch to an external label.
+ br external_label
+
Index: gas/testsuite/gas/nios2/break.d
===================================================================
RCS file: gas/testsuite/gas/nios2/break.d
diff -N gas/testsuite/gas/nios2/break.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/break.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,12 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 break
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> break 0
+0+0004 <[^>]*> break 0
+0+0008 <[^>]*> break 31
+0+000c <[^>]*> break 14
+
+
Index: gas/testsuite/gas/nios2/break.s
===================================================================
RCS file: gas/testsuite/gas/nios2/break.s
diff -N gas/testsuite/gas/nios2/break.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/break.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,8 @@
+# Source file used to test the 20-bit break instructions
+foo:
+ break
+ break 0
+ break 31
+ break 14
+
+
Index: gas/testsuite/gas/nios2/bret.d
===================================================================
RCS file: gas/testsuite/gas/nios2/bret.d
diff -N gas/testsuite/gas/nios2/bret.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/bret.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,8 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 bret
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> bret
+
Index: gas/testsuite/gas/nios2/bret.s
===================================================================
RCS file: gas/testsuite/gas/nios2/bret.s
diff -N gas/testsuite/gas/nios2/bret.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/bret.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,5 @@
+# Source file used to test the bret instructions
+foo:
+ bret
+
+
Index: gas/testsuite/gas/nios2/cache.d
===================================================================
RCS file: gas/testsuite/gas/nios2/cache.d
diff -N gas/testsuite/gas/nios2/cache.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/cache.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,17 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 cache
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> flushd -32768\(r6\)
+0+0004 <[^>]*> flushd 32767\(r6\)
+0+0008 <[^>]*> flushd 0\(r6\)
+0+000c <[^>]*> flushd -1\(r6\)
+0+0010 <[^>]*> flushd 0\(r6\)
+[ ]*10: R_NIOS2_S16 .text
+0+0014 <[^>]*> flushd 0\(r6\)
+[ ]*14: R_NIOS2_S16 external
+0+0018 <[^>]*> flushi r2
+0+001c <[^>]*> flushp
+
Index: gas/testsuite/gas/nios2/cache.s
===================================================================
RCS file: gas/testsuite/gas/nios2/cache.s
diff -N gas/testsuite/gas/nios2/cache.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/cache.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,21 @@
+# Source file used to test the cache instruction
+foo:
+ flushd -0x8000(r6)
+ flushd 0x7fff(r6)
+ flushd 0x0(r6)
+ flushd -0x0001(r6)
+
+# use symbol for offset
+ flushd foo(r6)
+
+# use external symbol
+ .global external
+ flushd external(r6)
+
+# flushi
+ flushi r2
+
+#flushp
+ flushp
+
+
Index: gas/testsuite/gas/nios2/call.d
===================================================================
RCS file: gas/testsuite/gas/nios2/call.d
diff -N gas/testsuite/gas/nios2/call.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/call.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,11 @@
+# objdump: -dr --prefix-addresses
+#name: NIOS2 call
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> call 00000000 <foo>
+[ ]*0: R_NIOS2_CALL26 .text\+0xc
+0+0004 <[^>]*> callr r10
+0+0008 <[^>]*> call 00000000 <foo>
+[ ]*8: R_NIOS2_CALL26 external
Index: gas/testsuite/gas/nios2/call.s
===================================================================
RCS file: gas/testsuite/gas/nios2/call.s
diff -N gas/testsuite/gas/nios2/call.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/call.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,13 @@
+# Source file used to test the call and callr instructions
+.text
+.set norelax
+foo:
+ call func1
+ callr r10
+# use external symbol
+ .global external
+ call external
+func1:
+
+
+
Index: gas/testsuite/gas/nios2/call26.d
===================================================================
RCS file: gas/testsuite/gas/nios2/call26.d
diff -N gas/testsuite/gas/nios2/call26.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/call26.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,76 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 nios2-reloc-r-nios2-call26
+
+# Test the branch instructions.
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+[ ]*\.\.\.
+[ ]*0: R_NIOS2_CALL26 .text\+0x100
+[ ]*4: R_NIOS2_CALL26 globalfunc
+0+0008 <[^>]*> nop
+0+000c <[^>]*> nop
+0+0010 <[^>]*> nop
+0+0014 <[^>]*> nop
+0+0018 <[^>]*> nop
+0+001c <[^>]*> nop
+0+0020 <[^>]*> nop
+0+0024 <[^>]*> nop
+0+0028 <[^>]*> nop
+0+002c <[^>]*> nop
+0+0030 <[^>]*> nop
+0+0034 <[^>]*> nop
+0+0038 <[^>]*> nop
+0+003c <[^>]*> nop
+0+0040 <[^>]*> nop
+0+0044 <[^>]*> nop
+0+0048 <[^>]*> nop
+0+004c <[^>]*> nop
+0+0050 <[^>]*> nop
+0+0054 <[^>]*> nop
+0+0058 <[^>]*> nop
+0+005c <[^>]*> nop
+0+0060 <[^>]*> nop
+0+0064 <[^>]*> nop
+0+0068 <[^>]*> nop
+0+006c <[^>]*> nop
+0+0070 <[^>]*> nop
+0+0074 <[^>]*> nop
+0+0078 <[^>]*> nop
+0+007c <[^>]*> nop
+0+0080 <[^>]*> nop
+0+0084 <[^>]*> nop
+0+0088 <[^>]*> nop
+0+008c <[^>]*> nop
+0+0090 <[^>]*> nop
+0+0094 <[^>]*> nop
+0+0098 <[^>]*> nop
+0+009c <[^>]*> nop
+0+00a0 <[^>]*> nop
+0+00a4 <[^>]*> nop
+0+00a8 <[^>]*> nop
+0+00ac <[^>]*> nop
+0+00b0 <[^>]*> nop
+0+00b4 <[^>]*> nop
+0+00b8 <[^>]*> nop
+0+00bc <[^>]*> nop
+0+00c0 <[^>]*> nop
+0+00c4 <[^>]*> nop
+0+00c8 <[^>]*> nop
+0+00cc <[^>]*> nop
+0+00d0 <[^>]*> nop
+0+00d4 <[^>]*> nop
+0+00d8 <[^>]*> nop
+0+00dc <[^>]*> nop
+0+00e0 <[^>]*> nop
+0+00e4 <[^>]*> nop
+0+00e8 <[^>]*> nop
+0+00ec <[^>]*> nop
+0+00f0 <[^>]*> nop
+0+00f4 <[^>]*> nop
+0+00f8 <[^>]*> nop
+0+00fc <[^>]*> nop
+0+0100 <[^>]*> nop
+ ...
+
+
Index: gas/testsuite/gas/nios2/call26.s
===================================================================
RCS file: gas/testsuite/gas/nios2/call26.s
diff -N gas/testsuite/gas/nios2/call26.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/call26.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,12 @@
+# Test for Nios II 32-bit relocations
+
+.global globalfunc
+.text
+.set norelax
+start:
+ call localfunc
+ call globalfunc
+
+.align 8
+localfunc:
+ nop
Index: gas/testsuite/gas/nios2/cmp.d
===================================================================
RCS file: gas/testsuite/gas/nios2/cmp.d
diff -N gas/testsuite/gas/nios2/cmp.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/cmp.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,24 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 cmp
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> cmpeq r11,r2,r3
+0+0004 <[^>]*> cmpge r11,r2,r3
+0+0008 <[^>]*> cmpgeu r11,r2,r3
+0+000c <[^>]*> cmplt r11,r2,r3
+0+0010 <[^>]*> cmpltu r11,r2,r3
+0+0014 <[^>]*> cmpne r11,r2,r3
+0+0018 <[^>]*> cmpgei r11,r2,0
+[ ]*18: R_NIOS2_S16 value
+0+001c <[^>]*> cmpgeui r11,r2,0
+[ ]*1c: R_NIOS2_U16 value\+0x200
+0+0020 <[^>]*> cmplti r11,r2,0
+[ ]*20: R_NIOS2_S16 value
+0+0024 <[^>]*> cmpltui r11,r2,0
+[ ]*24: R_NIOS2_U16 value\+0x200
+0+0028 <[^>]*> cmpgei r11,r2,32767
+0+002c <[^>]*> cmpgeui r11,r2,32768
+0+0030 <[^>]*> cmplti r11,r2,-32768
+0+0034 <[^>]*> cmpltui r11,r2,65535
Index: gas/testsuite/gas/nios2/cmp.s
===================================================================
RCS file: gas/testsuite/gas/nios2/cmp.s
diff -N gas/testsuite/gas/nios2/cmp.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/cmp.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,22 @@
+# Source file used to test the compare instructions
+foo:
+ cmpeq r11,r2,r3
+ cmpge r11,r2,r3
+ cmpgeu r11,r2,r3
+ cmplt r11,r2,r3
+ cmpltu r11,r2,r3
+ cmpne r11,r2,r3
+# test that cmp generates relocations correctly
+ cmpgei r11,r2,value
+ cmpgeui r11,r2,value+0x200
+ cmplti r11,r2,value
+ cmpltui r11,r2,value+0x200
+
+ cmpgei r11,r2,0x7fff
+ cmpgeui r11,r2,0x8000
+ cmplti r11,r2,-0x8000
+ cmpltui r11,r2,0xFFFF
+.global value
+
+
+
Index: gas/testsuite/gas/nios2/comments.d
===================================================================
RCS file: gas/testsuite/gas/nios2/comments.d
diff -N gas/testsuite/gas/nios2/comments.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/comments.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,26 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 comments
+
+# Test the add instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> br 0000001c <start>
+0+0004 <[^>]*> br 00000008 <abort>
+0+0008 <[^>]*> movui r3,0
+0+000c <[^>]*> movui r2,1
+0+0010 <[^>]*> movui r3,0
+0+0014 <[^>]*> movui r2,0
+0+0018 <[^>]*> br 00000044 <exit>
+0+001c <[^>]*> addi r2,r2,-4
+0+0020 <[^>]*> movui r11,1
+0+0024 <[^>]*> movui r5,0
+0+0028 <[^>]*> movui r6,0
+0+002c <[^>]*> br 00000030 <ldst>
+0+0030 <[^>]*> movui r2,61452
+0+0034 <[^>]*> movui r20,64206
+0+0038 <[^>]*> stw r20,0\(r2\)
+0+003c <[^>]*> ldw r21,0\(r2\)
+0+0040 <[^>]*> br 00000010 <end>
+0+0044 <[^>]*> br 00000044 <exit>
Index: gas/testsuite/gas/nios2/comments.s
===================================================================
RCS file: gas/testsuite/gas/nios2/comments.s
diff -N gas/testsuite/gas/nios2/comments.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/comments.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,28 @@
+.set norelax
+_main: br start
+trap:
+ br abort
+.globl _main
+abort: movui r3, 0x0
+ movui r2, 0x1
+
+end: movui r3, 0x0
+ movui r2, 0x0
+ br exit
+
+start:
+ addi r2, r2, -4 # test for ve numbers
+ movui r11, 0x1
+ ori r5, r0, %lo(0x0) # r5 = 0x0
+ ori r6, r0, %lo(0x0) # r6 = 0x0
+ br ldst
+
+ldst:
+ movui r2, 0xF00C
+ movui r20, 0xFACE
+ stw r20,(r2)
+ ldw r21, (r2)
+ br end
+
+
+exit: br exit
Index: gas/testsuite/gas/nios2/complex.d
===================================================================
RCS file: gas/testsuite/gas/nios2/complex.d
diff -N gas/testsuite/gas/nios2/complex.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/complex.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,12 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 complex
+
+# Test complex expression parsing
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> ldw r2,-1\(r3\)
+0+0004 <[^>]*> ldw r2,1\(r3\)
+0+0008 <[^>]*> ldw r2,0\(r3\)
+ 8: R_NIOS2_S16 stack_top-0x1
Index: gas/testsuite/gas/nios2/complex.s
===================================================================
RCS file: gas/testsuite/gas/nios2/complex.s
diff -N gas/testsuite/gas/nios2/complex.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/complex.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,5 @@
+foo:
+ ldw r2, (2-3)(r3)
+ ldw r2, 2 + (2-3)(r3)
+ ldw r2, 2 + (stack_top-3)(r3)
+
Index: gas/testsuite/gas/nios2/ctl.d
===================================================================
RCS file: gas/testsuite/gas/nios2/ctl.d
diff -N gas/testsuite/gas/nios2/ctl.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/ctl.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,20 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 ctl
+
+# Test the ctl instructions
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> rdctl r8,ctl31
+0+0004 <[^>]*> rdctl r8,ctl30
+0+0008 <[^>]*> rdctl r8,ctl29
+0+000c <[^>]*> rdctl r8,status
+0+0010 <[^>]*> rdctl r8,bstatus
+0+0014 <[^>]*> rdctl r8,estatus
+0+0018 <[^>]*> wrctl ctl31,r8
+0+001c <[^>]*> wrctl ctl30,r8
+0+0020 <[^>]*> wrctl ctl29,r8
+0+0024 <[^>]*> wrctl status,r8
+0+0028 <[^>]*> wrctl bstatus,r8
+0+002c <[^>]*> wrctl estatus,r8
Index: gas/testsuite/gas/nios2/ctl.s
===================================================================
RCS file: gas/testsuite/gas/nios2/ctl.s
diff -N gas/testsuite/gas/nios2/ctl.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/ctl.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,18 @@
+# Source file used to test the nor instruction
+
+foo:
+ rdctl r8,ctl31
+ rdctl r8,ctl30
+ rdctl r8,ctl29
+ rdctl r8,status
+ rdctl r8,bstatus
+ rdctl r8,estatus
+ wrctl ctl31,r8
+ wrctl ctl30,r8
+ wrctl ctl29,r8
+ wrctl status,r8
+ wrctl bstatus,r8
+ wrctl estatus,r8
+
+
+
Index: gas/testsuite/gas/nios2/custom.d
===================================================================
RCS file: gas/testsuite/gas/nios2/custom.d
diff -N gas/testsuite/gas/nios2/custom.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/custom.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,13 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 custom
+
+# Test the custom instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> custom 0,r11,r2,r3
+0+0004 <[^>]*> custom 255,r11,r2,r3
+0+0008 <[^>]*> custom 150,c1,r2,r3
+0+000c <[^>]*> custom 24,c1,c2,r3
+0+0010 <[^>]*> custom 56,c1,c2,c3
Index: gas/testsuite/gas/nios2/custom.s
===================================================================
RCS file: gas/testsuite/gas/nios2/custom.s
diff -N gas/testsuite/gas/nios2/custom.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/custom.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,8 @@
+# test progam for assembling user instructions
+
+foo:
+ custom 0, r11, r2, r3
+ custom 255, r11, r2, r3
+ custom 150, c1, r2, r3
+ custom 0x18, c1, c2, r3
+ custom 070, c1, c2, c3
Index: gas/testsuite/gas/nios2/etbt.d
===================================================================
RCS file: gas/testsuite/gas/nios2/etbt.d
diff -N gas/testsuite/gas/nios2/etbt.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/etbt.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,10 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 etbt
+
+# Test the et, bt registers
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> add et,bt,r6
+0+0004 <[^>]*> add et,bt,r6
Index: gas/testsuite/gas/nios2/etbt.s
===================================================================
RCS file: gas/testsuite/gas/nios2/etbt.s
diff -N gas/testsuite/gas/nios2/etbt.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/etbt.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,4 @@
+.set nobreak
+foo:
+ add r24, r25, r6
+ add et, bt, r6
Index: gas/testsuite/gas/nios2/flushda.d
===================================================================
RCS file: gas/testsuite/gas/nios2/flushda.d
diff -N gas/testsuite/gas/nios2/flushda.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/flushda.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,10 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 flushda
+
+# Test the jmp instruction.
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> flushda 12\(r2\)
+
Index: gas/testsuite/gas/nios2/flushda.s
===================================================================
RCS file: gas/testsuite/gas/nios2/flushda.s
diff -N gas/testsuite/gas/nios2/flushda.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/flushda.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,6 @@
+# Source file used to test the flushda instruction.
+.text
+.set nobreak
+foo:
+ flushda 12(r2)
+
Index: gas/testsuite/gas/nios2/illegal.l
===================================================================
RCS file: gas/testsuite/gas/nios2/illegal.l
diff -N gas/testsuite/gas/nios2/illegal.l
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/illegal.l 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,14 @@
+.*illegal.s: Assembler messages:
+.*illegal.s:5: Error: unknown register r56
+.*illegal.s:8: Error: expecting \( near 0x1000
+.*illegal.s:8: Error: missing argument
+.*illegal.s:9: Error: expecting \) near r5
+.*illegal.s:10: Error: expecting \( near 0x1000r5\)
+.*illegal.s:10: Error: missing argument
+.*illegal.s:11: Error: expecting \( near 0x1000,r5
+.*illegal.s:11: Error: missing argument
+.*illegal.s:12: Error: unknown register 0x1000
+.*illegal.s:14: Error: unrecognised instruction fop
+.*illegal.s:16: Error: too many arguments
+.*illegal.s:17: Error: too many arguments
+.*illegal.s:17: Error: unknown register r2,r4
Index: gas/testsuite/gas/nios2/illegal.s
===================================================================
RCS file: gas/testsuite/gas/nios2/illegal.s
diff -N gas/testsuite/gas/nios2/illegal.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/illegal.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,17 @@
+# Source file used to test illegal operands.
+
+foo:
+# Illegal registers
+ add r3,r4,r56
+ add r4,r0,r2
+# Illegal syntax
+ ldw r4,0x1000
+ ldw r4,0x1000(r5
+ ldw r4,0x1000r5)
+ ldw r4,0x1000,r5
+ ldw r4,(0x1000)r5
+# Illegal opcodes
+ fop r3,r4,r5
+# Extra operands
+ nop Crapola
+ add r2, r2, r2, r4
Index: gas/testsuite/gas/nios2/jmp.d
===================================================================
RCS file: gas/testsuite/gas/nios2/jmp.d
diff -N gas/testsuite/gas/nios2/jmp.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/jmp.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,10 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 jmp
+
+# Test the jmp instruction.
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> jmp bt
+
Index: gas/testsuite/gas/nios2/jmp.s
===================================================================
RCS file: gas/testsuite/gas/nios2/jmp.s
diff -N gas/testsuite/gas/nios2/jmp.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/jmp.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,6 @@
+# Source file used to test the jmp instruction.
+.text
+.set nobreak
+foo:
+ jmp r25
+
Index: gas/testsuite/gas/nios2/ldb.d
===================================================================
RCS file: gas/testsuite/gas/nios2/ldb.d
diff -N gas/testsuite/gas/nios2/ldb.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/ldb.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,196 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 ldb
+
+# Test the ld instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> ldb r4,0\(zero\)
+0+0004 <[^>]*> ldb r4,4\(zero\)
+0+0008 <[^>]*> ldb r4,32764\(zero\)
+0+000c <[^>]*> ldb r4,-32768\(zero\)
+0+0010 <[^>]*> ldb r4,0\(r5\)
+0+0014 <[^>]*> ldb r4,4\(r5\)
+0+0018 <[^>]*> ldb r4,32764\(r5\)
+0+001c <[^>]*> ldb r4,-32768\(r5\)
+0+0020 <[^>]*> ldb r4,0\(zero\)
+[ ]*20: R_NIOS2_S16 .data
+0+0024 <[^>]*> ldb r4,0\(zero\)
+[ ]*24: R_NIOS2_S16 big_external_data_label
+0+0028 <[^>]*> ldb r4,0\(zero\)
+[ ]*28: R_NIOS2_S16 small_external_data_label
+0+002c <[^>]*> ldb r4,0\(zero\)
+[ ]*2c: R_NIOS2_S16 big_external_common
+0+0030 <[^>]*> ldb r4,0\(zero\)
+[ ]*30: R_NIOS2_S16 small_external_common
+0+0034 <[^>]*> ldb r4,0\(zero\)
+[ ]*34: R_NIOS2_S16 .bss
+0+0038 <[^>]*> ldb r4,0\(zero\)
+[ ]*38: R_NIOS2_S16 .bss\+0x4000
+0+003c <[^>]*> ldb r4,0\(zero\)
+[ ]*3c: R_NIOS2_S16 .data\+0x4
+0+0040 <[^>]*> ldb r4,0\(zero\)
+[ ]*40: R_NIOS2_S16 big_external_data_label\+0x4
+0+0044 <[^>]*> ldb r4,0\(zero\)
+[ ]*44: R_NIOS2_S16 small_external_data_label\+0x4
+0+0048 <[^>]*> ldb r4,0\(zero\)
+[ ]*48: R_NIOS2_S16 big_external_common\+0x4
+0+004c <[^>]*> ldb r4,0\(zero\)
+[ ]*4c: R_NIOS2_S16 small_external_common\+0x4
+0+0050 <[^>]*> ldb r4,0\(zero\)
+[ ]*50: R_NIOS2_S16 .bss\+0x4
+0+0054 <[^>]*> ldb r4,0\(zero\)
+[ ]*54: R_NIOS2_S16 .bss\+0x4004
+0+0058 <[^>]*> ldb r4,0\(zero\)
+[ ]*58: R_NIOS2_S16 .data-0x8000
+0+005c <[^>]*> ldb r4,0\(zero\)
+[ ]*5c: R_NIOS2_S16 big_external_data_label-0x8000
+0+0060 <[^>]*> ldb r4,0\(zero\)
+[ ]*60: R_NIOS2_S16 small_external_data_label-0x8000
+0+0064 <[^>]*> ldb r4,0\(zero\)
+[ ]*64: R_NIOS2_S16 big_external_common-0x8000
+0+0068 <[^>]*> ldb r4,0\(zero\)
+[ ]*68: R_NIOS2_S16 small_external_common-0x8000
+0+006c <[^>]*> ldb r4,0\(zero\)
+[ ]*6c: R_NIOS2_S16 .bss-0x8000
+0+0070 <[^>]*> ldb r4,0\(zero\)
+[ ]*70: R_NIOS2_S16 .bss-0x4000
+0+0074 <[^>]*> ldb r4,0\(zero\)
+[ ]*74: R_NIOS2_S16 .data\+0x10000
+0+0078 <[^>]*> ldb r4,0\(r5\)
+[ ]*78: R_NIOS2_S16 .data
+0+007c <[^>]*> ldb r4,0\(r5\)
+[ ]*7c: R_NIOS2_S16 big_external_data_label
+0+0080 <[^>]*> ldb r4,0\(r5\)
+[ ]*80: R_NIOS2_S16 small_external_data_label
+0+0084 <[^>]*> ldb r4,0\(r5\)
+[ ]*84: R_NIOS2_S16 big_external_common
+0+0088 <[^>]*> ldb r4,0\(r5\)
+[ ]*88: R_NIOS2_S16 small_external_common
+0+008c <[^>]*> ldb r4,0\(r5\)
+[ ]*8c: R_NIOS2_S16 .bss
+0+0090 <[^>]*> ldb r4,0\(r5\)
+[ ]*90: R_NIOS2_S16 .bss\+0x4000
+0+0094 <[^>]*> ldb r4,0\(r5\)
+[ ]*94: R_NIOS2_S16 .data\+0x4
+0+0098 <[^>]*> ldb r4,0\(r5\)
+[ ]*98: R_NIOS2_S16 big_external_data_label\+0x4
+0+009c <[^>]*> ldb r4,0\(r5\)
+[ ]*9c: R_NIOS2_S16 small_external_data_label\+0x4
+0+00a0 <[^>]*> ldb r4,0\(r5\)
+[ ]*a0: R_NIOS2_S16 big_external_common\+0x4
+0+00a4 <[^>]*> ldb r4,0\(r5\)
+[ ]*a4: R_NIOS2_S16 small_external_common\+0x4
+0+00a8 <[^>]*> ldb r4,0\(r5\)
+[ ]*a8: R_NIOS2_S16 .bss\+0x4
+0+00ac <[^>]*> ldb r4,0\(r5\)
+[ ]*ac: R_NIOS2_S16 .bss\+0x4004
+0+00b0 <[^>]*> ldb r4,0\(r5\)
+[ ]*b0: R_NIOS2_S16 .data-0x8000
+0+00b4 <[^>]*> ldb r4,0\(r5\)
+[ ]*b4: R_NIOS2_S16 big_external_data_label-0x8000
+0+00b8 <[^>]*> ldb r4,0\(r5\)
+[ ]*b8: R_NIOS2_S16 small_external_data_label-0x8000
+0+00bc <[^>]*> ldb r4,0\(r5\)
+[ ]*bc: R_NIOS2_S16 big_external_common-0x8000
+0+00c0 <[^>]*> ldb r4,0\(r5\)
+[ ]*c0: R_NIOS2_S16 small_external_common-0x8000
+0+00c4 <[^>]*> ldb r4,0\(r5\)
+[ ]*c4: R_NIOS2_S16 .bss-0x8000
+0+00c8 <[^>]*> ldb r4,0\(r5\)
+[ ]*c8: R_NIOS2_S16 .bss-0x4000
+0+00cc <[^>]*> ldbio r4,0\(zero\)
+0+00d0 <[^>]*> ldbio r4,4\(zero\)
+0+00d4 <[^>]*> ldbio r4,32764\(zero\)
+0+00d8 <[^>]*> ldbio r4,-32768\(zero\)
+0+00dc <[^>]*> ldbio r4,0\(r5\)
+0+00e0 <[^>]*> ldbio r4,4\(r5\)
+0+00e4 <[^>]*> ldbio r4,32764\(r5\)
+0+00e8 <[^>]*> ldbio r4,-32768\(r5\)
+0+00ec <[^>]*> ldbio r4,0\(zero\)
+[ ]*ec: R_NIOS2_S16 .data
+0+00f0 <[^>]*> ldbio r4,0\(zero\)
+[ ]*f0: R_NIOS2_S16 big_external_data_label
+0+00f4 <[^>]*> ldbio r4,0\(zero\)
+[ ]*f4: R_NIOS2_S16 small_external_data_label
+0+00f8 <[^>]*> ldbio r4,0\(zero\)
+[ ]*f8: R_NIOS2_S16 big_external_common
+0+00fc <[^>]*> ldbio r4,0\(zero\)
+[ ]*fc: R_NIOS2_S16 small_external_common
+0+0100 <[^>]*> ldbio r4,0\(zero\)
+[ ]*100: R_NIOS2_S16 .bss
+0+0104 <[^>]*> ldbio r4,0\(zero\)
+[ ]*104: R_NIOS2_S16 .bss\+0x4000
+0+0108 <[^>]*> ldbio r4,0\(zero\)
+[ ]*108: R_NIOS2_S16 .data\+0x4
+0+010c <[^>]*> ldbio r4,0\(zero\)
+[ ]*10c: R_NIOS2_S16 big_external_data_label\+0x4
+0+0110 <[^>]*> ldbio r4,0\(zero\)
+[ ]*110: R_NIOS2_S16 small_external_data_label\+0x4
+0+0114 <[^>]*> ldbio r4,0\(zero\)
+[ ]*114: R_NIOS2_S16 big_external_common\+0x4
+0+0118 <[^>]*> ldbio r4,0\(zero\)
+[ ]*118: R_NIOS2_S16 small_external_common\+0x4
+0+011c <[^>]*> ldbio r4,0\(zero\)
+[ ]*11c: R_NIOS2_S16 .bss\+0x4
+0+0120 <[^>]*> ldbio r4,0\(zero\)
+[ ]*120: R_NIOS2_S16 .bss\+0x4004
+0+0124 <[^>]*> ldbio r4,0\(zero\)
+[ ]*124: R_NIOS2_S16 .data-0x8000
+0+0128 <[^>]*> ldbio r4,0\(zero\)
+[ ]*128: R_NIOS2_S16 big_external_data_label-0x8000
+0+012c <[^>]*> ldbio r4,0\(zero\)
+[ ]*12c: R_NIOS2_S16 small_external_data_label-0x8000
+0+0130 <[^>]*> ldbio r4,0\(zero\)
+[ ]*130: R_NIOS2_S16 big_external_common-0x8000
+0+0134 <[^>]*> ldbio r4,0\(zero\)
+[ ]*134: R_NIOS2_S16 small_external_common-0x8000
+0+0138 <[^>]*> ldbio r4,0\(zero\)
+[ ]*138: R_NIOS2_S16 .bss-0x8000
+0+013c <[^>]*> ldbio r4,0\(zero\)
+[ ]*13c: R_NIOS2_S16 .bss-0x4000
+0+0140 <[^>]*> ldbio r4,0\(zero\)
+[ ]*140: R_NIOS2_S16 .data\+0x10000
+0+0144 <[^>]*> ldbio r4,0\(r5\)
+[ ]*144: R_NIOS2_S16 .data
+0+0148 <[^>]*> ldbio r4,0\(r5\)
+[ ]*148: R_NIOS2_S16 big_external_data_label
+0+014c <[^>]*> ldbio r4,0\(r5\)
+[ ]*14c: R_NIOS2_S16 small_external_data_label
+0+0150 <[^>]*> ldbio r4,0\(r5\)
+[ ]*150: R_NIOS2_S16 big_external_common
+0+0154 <[^>]*> ldbio r4,0\(r5\)
+[ ]*154: R_NIOS2_S16 small_external_common
+0+0158 <[^>]*> ldbio r4,0\(r5\)
+[ ]*158: R_NIOS2_S16 .bss
+0+015c <[^>]*> ldbio r4,0\(r5\)
+[ ]*15c: R_NIOS2_S16 .bss\+0x4000
+0+0160 <[^>]*> ldbio r4,0\(r5\)
+[ ]*160: R_NIOS2_S16 .data\+0x4
+0+0164 <[^>]*> ldbio r4,0\(r5\)
+[ ]*164: R_NIOS2_S16 big_external_data_label\+0x4
+0+0168 <[^>]*> ldbio r4,0\(r5\)
+[ ]*168: R_NIOS2_S16 small_external_data_label\+0x4
+0+016c <[^>]*> ldbio r4,0\(r5\)
+[ ]*16c: R_NIOS2_S16 big_external_common\+0x4
+0+0170 <[^>]*> ldbio r4,0\(r5\)
+[ ]*170: R_NIOS2_S16 small_external_common\+0x4
+0+0174 <[^>]*> ldbio r4,0\(r5\)
+[ ]*174: R_NIOS2_S16 .bss\+0x4
+0+0178 <[^>]*> ldbio r4,0\(r5\)
+[ ]*178: R_NIOS2_S16 .bss\+0x4004
+0+017c <[^>]*> ldbio r4,0\(r5\)
+[ ]*17c: R_NIOS2_S16 .data-0x8000
+0+0180 <[^>]*> ldbio r4,0\(r5\)
+[ ]*180: R_NIOS2_S16 big_external_data_label-0x8000
+0+0184 <[^>]*> ldbio r4,0\(r5\)
+[ ]*184: R_NIOS2_S16 small_external_data_label-0x8000
+0+0188 <[^>]*> ldbio r4,0\(r5\)
+[ ]*188: R_NIOS2_S16 big_external_common-0x8000
+0+018c <[^>]*> ldbio r4,0\(r5\)
+[ ]*18c: R_NIOS2_S16 small_external_common-0x8000
+0+0190 <[^>]*> ldbio r4,0\(r5\)
+[ ]*190: R_NIOS2_S16 .bss-0x8000
+0+0194 <[^>]*> ldbio r4,0\(r5\)
+[ ]*194: R_NIOS2_S16 .bss-0x4000
Index: gas/testsuite/gas/nios2/ldb.s
===================================================================
RCS file: gas/testsuite/gas/nios2/ldb.s
diff -N gas/testsuite/gas/nios2/ldb.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/ldb.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,117 @@
+ .data
+data_label:
+ .extern big_external_data_label,0x4000
+ .extern small_external_data_label,4
+ .comm big_external_common,0x4000
+ .comm small_external_common,4
+ .lcomm big_local_common,0x4000
+ .lcomm small_local_common,4
+
+# the small symbols should have space allocated in the sbss section
+# but this is not yet supported in the assembler, so space is allocated
+# in the .bss section and the relocations are not gp-relative. this will
+# be updated when gp-relative relocations are added
+ .text
+ ldb r4,0(r0)
+ ldb r4,4(r0)
+ ldb r4,0x7ffc(r0)
+ ldb r4,-0x8000(r0)
+ ldb r4,0(r5)
+ ldb r4,4(r5)
+ ldb r4,0x7ffc(r5)
+ ldb r4,-0x8000(r5)
+ ldb r4,data_label(r0)
+ ldb r4,big_external_data_label(r0)
+ ldb r4,small_external_data_label(r0)
+ ldb r4,big_external_common(r0)
+ ldb r4,small_external_common(r0)
+ ldb r4,big_local_common(r0)
+ ldb r4,small_local_common(r0)
+ ldb r4,data_label+4(r0)
+ ldb r4,big_external_data_label+4(r0)
+ ldb r4,small_external_data_label+4(r0)
+ ldb r4,big_external_common+4(r0)
+ ldb r4,small_external_common+4(r0)
+ ldb r4,big_local_common+4(r0)
+ ldb r4,small_local_common+4(r0)
+ ldb r4,data_label-0x8000(r0)
+ ldb r4,big_external_data_label-0x8000(r0)
+ ldb r4,small_external_data_label-0x8000(r0)
+ ldb r4,big_external_common-0x8000(r0)
+ ldb r4,small_external_common-0x8000(r0)
+ ldb r4,big_local_common-0x8000(r0)
+ ldb r4,small_local_common-0x8000(r0)
+ ldb r4,data_label+0x10000(r0)
+ ldb r4,data_label(r5)
+ ldb r4,big_external_data_label(r5)
+ ldb r4,small_external_data_label(r5)
+ ldb r4,big_external_common(r5)
+ ldb r4,small_external_common(r5)
+ ldb r4,big_local_common(r5)
+ ldb r4,small_local_common(r5)
+ ldb r4,data_label+4(r5)
+ ldb r4,big_external_data_label+4(r5)
+ ldb r4,small_external_data_label+4(r5)
+ ldb r4,big_external_common+4(r5)
+ ldb r4,small_external_common+4(r5)
+ ldb r4,big_local_common+4(r5)
+ ldb r4,small_local_common+4(r5)
+ ldb r4,data_label-0x8000(r5)
+ ldb r4,big_external_data_label-0x8000(r5)
+ ldb r4,small_external_data_label-0x8000(r5)
+ ldb r4,big_external_common-0x8000(r5)
+ ldb r4,small_external_common-0x8000(r5)
+ ldb r4,big_local_common-0x8000(r5)
+ ldb r4,small_local_common-0x8000(r5)
+
+ ldbio r4,0(r0)
+ ldbio r4,4(r0)
+ ldbio r4,0x7ffc(r0)
+ ldbio r4,-0x8000(r0)
+ ldbio r4,0(r5)
+ ldbio r4,4(r5)
+ ldbio r4,0x7ffc(r5)
+ ldbio r4,-0x8000(r5)
+ ldbio r4,data_label(r0)
+ ldbio r4,big_external_data_label(r0)
+ ldbio r4,small_external_data_label(r0)
+ ldbio r4,big_external_common(r0)
+ ldbio r4,small_external_common(r0)
+ ldbio r4,big_local_common(r0)
+ ldbio r4,small_local_common(r0)
+ ldbio r4,data_label+4(r0)
+ ldbio r4,big_external_data_label+4(r0)
+ ldbio r4,small_external_data_label+4(r0)
+ ldbio r4,big_external_common+4(r0)
+ ldbio r4,small_external_common+4(r0)
+ ldbio r4,big_local_common+4(r0)
+ ldbio r4,small_local_common+4(r0)
+ ldbio r4,data_label-0x8000(r0)
+ ldbio r4,big_external_data_label-0x8000(r0)
+ ldbio r4,small_external_data_label-0x8000(r0)
+ ldbio r4,big_external_common-0x8000(r0)
+ ldbio r4,small_external_common-0x8000(r0)
+ ldbio r4,big_local_common-0x8000(r0)
+ ldbio r4,small_local_common-0x8000(r0)
+ ldbio r4,data_label+0x10000(r0)
+ ldbio r4,data_label(r5)
+ ldbio r4,big_external_data_label(r5)
+ ldbio r4,small_external_data_label(r5)
+ ldbio r4,big_external_common(r5)
+ ldbio r4,small_external_common(r5)
+ ldbio r4,big_local_common(r5)
+ ldbio r4,small_local_common(r5)
+ ldbio r4,data_label+4(r5)
+ ldbio r4,big_external_data_label+4(r5)
+ ldbio r4,small_external_data_label+4(r5)
+ ldbio r4,big_external_common+4(r5)
+ ldbio r4,small_external_common+4(r5)
+ ldbio r4,big_local_common+4(r5)
+ ldbio r4,small_local_common+4(r5)
+ ldbio r4,data_label-0x8000(r5)
+ ldbio r4,big_external_data_label-0x8000(r5)
+ ldbio r4,small_external_data_label-0x8000(r5)
+ ldbio r4,big_external_common-0x8000(r5)
+ ldbio r4,small_external_common-0x8000(r5)
+ ldbio r4,big_local_common-0x8000(r5)
+ ldbio r4,small_local_common-0x8000(r5)
Index: gas/testsuite/gas/nios2/ldh.d
===================================================================
RCS file: gas/testsuite/gas/nios2/ldh.d
diff -N gas/testsuite/gas/nios2/ldh.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/ldh.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,196 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 ldh
+
+# Test the ld instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> ldh r4,0\(zero\)
+0+0004 <[^>]*> ldh r4,4\(zero\)
+0+0008 <[^>]*> ldh r4,32764\(zero\)
+0+000c <[^>]*> ldh r4,-32768\(zero\)
+0+0010 <[^>]*> ldh r4,0\(r5\)
+0+0014 <[^>]*> ldh r4,4\(r5\)
+0+0018 <[^>]*> ldh r4,32764\(r5\)
+0+001c <[^>]*> ldh r4,-32768\(r5\)
+0+0020 <[^>]*> ldh r4,0\(zero\)
+[ ]*20: R_NIOS2_S16 .data
+0+0024 <[^>]*> ldh r4,0\(zero\)
+[ ]*24: R_NIOS2_S16 big_external_data_label
+0+0028 <[^>]*> ldh r4,0\(zero\)
+[ ]*28: R_NIOS2_S16 small_external_data_label
+0+002c <[^>]*> ldh r4,0\(zero\)
+[ ]*2c: R_NIOS2_S16 big_external_common
+0+0030 <[^>]*> ldh r4,0\(zero\)
+[ ]*30: R_NIOS2_S16 small_external_common
+0+0034 <[^>]*> ldh r4,0\(zero\)
+[ ]*34: R_NIOS2_S16 .bss
+0+0038 <[^>]*> ldh r4,0\(zero\)
+[ ]*38: R_NIOS2_S16 .bss\+0x4000
+0+003c <[^>]*> ldh r4,0\(zero\)
+[ ]*3c: R_NIOS2_S16 .data\+0x4
+0+0040 <[^>]*> ldh r4,0\(zero\)
+[ ]*40: R_NIOS2_S16 big_external_data_label\+0x4
+0+0044 <[^>]*> ldh r4,0\(zero\)
+[ ]*44: R_NIOS2_S16 small_external_data_label\+0x4
+0+0048 <[^>]*> ldh r4,0\(zero\)
+[ ]*48: R_NIOS2_S16 big_external_common\+0x4
+0+004c <[^>]*> ldh r4,0\(zero\)
+[ ]*4c: R_NIOS2_S16 small_external_common\+0x4
+0+0050 <[^>]*> ldh r4,0\(zero\)
+[ ]*50: R_NIOS2_S16 .bss\+0x4
+0+0054 <[^>]*> ldh r4,0\(zero\)
+[ ]*54: R_NIOS2_S16 .bss\+0x4004
+0+0058 <[^>]*> ldh r4,0\(zero\)
+[ ]*58: R_NIOS2_S16 .data-0x8000
+0+005c <[^>]*> ldh r4,0\(zero\)
+[ ]*5c: R_NIOS2_S16 big_external_data_label-0x8000
+0+0060 <[^>]*> ldh r4,0\(zero\)
+[ ]*60: R_NIOS2_S16 small_external_data_label-0x8000
+0+0064 <[^>]*> ldh r4,0\(zero\)
+[ ]*64: R_NIOS2_S16 big_external_common-0x8000
+0+0068 <[^>]*> ldh r4,0\(zero\)
+[ ]*68: R_NIOS2_S16 small_external_common-0x8000
+0+006c <[^>]*> ldh r4,0\(zero\)
+[ ]*6c: R_NIOS2_S16 .bss-0x8000
+0+0070 <[^>]*> ldh r4,0\(zero\)
+[ ]*70: R_NIOS2_S16 .bss-0x4000
+0+0074 <[^>]*> ldh r4,0\(zero\)
+[ ]*74: R_NIOS2_S16 .data\+0x10000
+0+0078 <[^>]*> ldh r4,0\(r5\)
+[ ]*78: R_NIOS2_S16 .data
+0+007c <[^>]*> ldh r4,0\(r5\)
+[ ]*7c: R_NIOS2_S16 big_external_data_label
+0+0080 <[^>]*> ldh r4,0\(r5\)
+[ ]*80: R_NIOS2_S16 small_external_data_label
+0+0084 <[^>]*> ldh r4,0\(r5\)
+[ ]*84: R_NIOS2_S16 big_external_common
+0+0088 <[^>]*> ldh r4,0\(r5\)
+[ ]*88: R_NIOS2_S16 small_external_common
+0+008c <[^>]*> ldh r4,0\(r5\)
+[ ]*8c: R_NIOS2_S16 .bss
+0+0090 <[^>]*> ldh r4,0\(r5\)
+[ ]*90: R_NIOS2_S16 .bss\+0x4000
+0+0094 <[^>]*> ldh r4,0\(r5\)
+[ ]*94: R_NIOS2_S16 .data\+0x4
+0+0098 <[^>]*> ldh r4,0\(r5\)
+[ ]*98: R_NIOS2_S16 big_external_data_label\+0x4
+0+009c <[^>]*> ldh r4,0\(r5\)
+[ ]*9c: R_NIOS2_S16 small_external_data_label\+0x4
+0+00a0 <[^>]*> ldh r4,0\(r5\)
+[ ]*a0: R_NIOS2_S16 big_external_common\+0x4
+0+00a4 <[^>]*> ldh r4,0\(r5\)
+[ ]*a4: R_NIOS2_S16 small_external_common\+0x4
+0+00a8 <[^>]*> ldh r4,0\(r5\)
+[ ]*a8: R_NIOS2_S16 .bss\+0x4
+0+00ac <[^>]*> ldh r4,0\(r5\)
+[ ]*ac: R_NIOS2_S16 .bss\+0x4004
+0+00b0 <[^>]*> ldh r4,0\(r5\)
+[ ]*b0: R_NIOS2_S16 .data-0x8000
+0+00b4 <[^>]*> ldh r4,0\(r5\)
+[ ]*b4: R_NIOS2_S16 big_external_data_label-0x8000
+0+00b8 <[^>]*> ldh r4,0\(r5\)
+[ ]*b8: R_NIOS2_S16 small_external_data_label-0x8000
+0+00bc <[^>]*> ldh r4,0\(r5\)
+[ ]*bc: R_NIOS2_S16 big_external_common-0x8000
+0+00c0 <[^>]*> ldh r4,0\(r5\)
+[ ]*c0: R_NIOS2_S16 small_external_common-0x8000
+0+00c4 <[^>]*> ldh r4,0\(r5\)
+[ ]*c4: R_NIOS2_S16 .bss-0x8000
+0+00c8 <[^>]*> ldh r4,0\(r5\)
+[ ]*c8: R_NIOS2_S16 .bss-0x4000
+0+00cc <[^>]*> ldhio r4,0\(zero\)
+0+00d0 <[^>]*> ldhio r4,4\(zero\)
+0+00d4 <[^>]*> ldhio r4,32764\(zero\)
+0+00d8 <[^>]*> ldhio r4,-32768\(zero\)
+0+00dc <[^>]*> ldhio r4,0\(r5\)
+0+00e0 <[^>]*> ldhio r4,4\(r5\)
+0+00e4 <[^>]*> ldhio r4,32764\(r5\)
+0+00e8 <[^>]*> ldhio r4,-32768\(r5\)
+0+00ec <[^>]*> ldhio r4,0\(zero\)
+[ ]*ec: R_NIOS2_S16 .data
+0+00f0 <[^>]*> ldhio r4,0\(zero\)
+[ ]*f0: R_NIOS2_S16 big_external_data_label
+0+00f4 <[^>]*> ldhio r4,0\(zero\)
+[ ]*f4: R_NIOS2_S16 small_external_data_label
+0+00f8 <[^>]*> ldhio r4,0\(zero\)
+[ ]*f8: R_NIOS2_S16 big_external_common
+0+00fc <[^>]*> ldhio r4,0\(zero\)
+[ ]*fc: R_NIOS2_S16 small_external_common
+0+0100 <[^>]*> ldhio r4,0\(zero\)
+[ ]*100: R_NIOS2_S16 .bss
+0+0104 <[^>]*> ldhio r4,0\(zero\)
+[ ]*104: R_NIOS2_S16 .bss\+0x4000
+0+0108 <[^>]*> ldhio r4,0\(zero\)
+[ ]*108: R_NIOS2_S16 .data\+0x4
+0+010c <[^>]*> ldhio r4,0\(zero\)
+[ ]*10c: R_NIOS2_S16 big_external_data_label\+0x4
+0+0110 <[^>]*> ldhio r4,0\(zero\)
+[ ]*110: R_NIOS2_S16 small_external_data_label\+0x4
+0+0114 <[^>]*> ldhio r4,0\(zero\)
+[ ]*114: R_NIOS2_S16 big_external_common\+0x4
+0+0118 <[^>]*> ldhio r4,0\(zero\)
+[ ]*118: R_NIOS2_S16 small_external_common\+0x4
+0+011c <[^>]*> ldhio r4,0\(zero\)
+[ ]*11c: R_NIOS2_S16 .bss\+0x4
+0+0120 <[^>]*> ldhio r4,0\(zero\)
+[ ]*120: R_NIOS2_S16 .bss\+0x4004
+0+0124 <[^>]*> ldhio r4,0\(zero\)
+[ ]*124: R_NIOS2_S16 .data-0x8000
+0+0128 <[^>]*> ldhio r4,0\(zero\)
+[ ]*128: R_NIOS2_S16 big_external_data_label-0x8000
+0+012c <[^>]*> ldhio r4,0\(zero\)
+[ ]*12c: R_NIOS2_S16 small_external_data_label-0x8000
+0+0130 <[^>]*> ldhio r4,0\(zero\)
+[ ]*130: R_NIOS2_S16 big_external_common-0x8000
+0+0134 <[^>]*> ldhio r4,0\(zero\)
+[ ]*134: R_NIOS2_S16 small_external_common-0x8000
+0+0138 <[^>]*> ldhio r4,0\(zero\)
+[ ]*138: R_NIOS2_S16 .bss-0x8000
+0+013c <[^>]*> ldhio r4,0\(zero\)
+[ ]*13c: R_NIOS2_S16 .bss-0x4000
+0+0140 <[^>]*> ldhio r4,0\(zero\)
+[ ]*140: R_NIOS2_S16 .data\+0x10000
+0+0144 <[^>]*> ldhio r4,0\(r5\)
+[ ]*144: R_NIOS2_S16 .data
+0+0148 <[^>]*> ldhio r4,0\(r5\)
+[ ]*148: R_NIOS2_S16 big_external_data_label
+0+014c <[^>]*> ldhio r4,0\(r5\)
+[ ]*14c: R_NIOS2_S16 small_external_data_label
+0+0150 <[^>]*> ldhio r4,0\(r5\)
+[ ]*150: R_NIOS2_S16 big_external_common
+0+0154 <[^>]*> ldhio r4,0\(r5\)
+[ ]*154: R_NIOS2_S16 small_external_common
+0+0158 <[^>]*> ldhio r4,0\(r5\)
+[ ]*158: R_NIOS2_S16 .bss
+0+015c <[^>]*> ldhio r4,0\(r5\)
+[ ]*15c: R_NIOS2_S16 .bss\+0x4000
+0+0160 <[^>]*> ldhio r4,0\(r5\)
+[ ]*160: R_NIOS2_S16 .data\+0x4
+0+0164 <[^>]*> ldhio r4,0\(r5\)
+[ ]*164: R_NIOS2_S16 big_external_data_label\+0x4
+0+0168 <[^>]*> ldhio r4,0\(r5\)
+[ ]*168: R_NIOS2_S16 small_external_data_label\+0x4
+0+016c <[^>]*> ldhio r4,0\(r5\)
+[ ]*16c: R_NIOS2_S16 big_external_common\+0x4
+0+0170 <[^>]*> ldhio r4,0\(r5\)
+[ ]*170: R_NIOS2_S16 small_external_common\+0x4
+0+0174 <[^>]*> ldhio r4,0\(r5\)
+[ ]*174: R_NIOS2_S16 .bss\+0x4
+0+0178 <[^>]*> ldhio r4,0\(r5\)
+[ ]*178: R_NIOS2_S16 .bss\+0x4004
+0+017c <[^>]*> ldhio r4,0\(r5\)
+[ ]*17c: R_NIOS2_S16 .data-0x8000
+0+0180 <[^>]*> ldhio r4,0\(r5\)
+[ ]*180: R_NIOS2_S16 big_external_data_label-0x8000
+0+0184 <[^>]*> ldhio r4,0\(r5\)
+[ ]*184: R_NIOS2_S16 small_external_data_label-0x8000
+0+0188 <[^>]*> ldhio r4,0\(r5\)
+[ ]*188: R_NIOS2_S16 big_external_common-0x8000
+0+018c <[^>]*> ldhio r4,0\(r5\)
+[ ]*18c: R_NIOS2_S16 small_external_common-0x8000
+0+0190 <[^>]*> ldhio r4,0\(r5\)
+[ ]*190: R_NIOS2_S16 .bss-0x8000
+0+0194 <[^>]*> ldhio r4,0\(r5\)
+[ ]*194: R_NIOS2_S16 .bss-0x4000
Index: gas/testsuite/gas/nios2/ldh.s
===================================================================
RCS file: gas/testsuite/gas/nios2/ldh.s
diff -N gas/testsuite/gas/nios2/ldh.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/ldh.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,117 @@
+ .data
+data_label:
+ .extern big_external_data_label,0x4000
+ .extern small_external_data_label,4
+ .comm big_external_common,0x4000
+ .comm small_external_common,4
+ .lcomm big_local_common,0x4000
+ .lcomm small_local_common,4
+
+# the small symbols should have space allocated in the sbss section
+# but this is not yet supported in the assembler, so space is allocated
+# in the .bss section and the relocations are not gp-relative. this will
+# be updated when gp-relative relocations are added
+ .text
+ ldh r4,0(r0)
+ ldh r4,4(r0)
+ ldh r4,0x7ffc(r0)
+ ldh r4,-0x8000(r0)
+ ldh r4,0(r5)
+ ldh r4,4(r5)
+ ldh r4,0x7ffc(r5)
+ ldh r4,-0x8000(r5)
+ ldh r4,data_label(r0)
+ ldh r4,big_external_data_label(r0)
+ ldh r4,small_external_data_label(r0)
+ ldh r4,big_external_common(r0)
+ ldh r4,small_external_common(r0)
+ ldh r4,big_local_common(r0)
+ ldh r4,small_local_common(r0)
+ ldh r4,data_label+4(r0)
+ ldh r4,big_external_data_label+4(r0)
+ ldh r4,small_external_data_label+4(r0)
+ ldh r4,big_external_common+4(r0)
+ ldh r4,small_external_common+4(r0)
+ ldh r4,big_local_common+4(r0)
+ ldh r4,small_local_common+4(r0)
+ ldh r4,data_label-0x8000(r0)
+ ldh r4,big_external_data_label-0x8000(r0)
+ ldh r4,small_external_data_label-0x8000(r0)
+ ldh r4,big_external_common-0x8000(r0)
+ ldh r4,small_external_common-0x8000(r0)
+ ldh r4,big_local_common-0x8000(r0)
+ ldh r4,small_local_common-0x8000(r0)
+ ldh r4,data_label+0x10000(r0)
+ ldh r4,data_label(r5)
+ ldh r4,big_external_data_label(r5)
+ ldh r4,small_external_data_label(r5)
+ ldh r4,big_external_common(r5)
+ ldh r4,small_external_common(r5)
+ ldh r4,big_local_common(r5)
+ ldh r4,small_local_common(r5)
+ ldh r4,data_label+4(r5)
+ ldh r4,big_external_data_label+4(r5)
+ ldh r4,small_external_data_label+4(r5)
+ ldh r4,big_external_common+4(r5)
+ ldh r4,small_external_common+4(r5)
+ ldh r4,big_local_common+4(r5)
+ ldh r4,small_local_common+4(r5)
+ ldh r4,data_label-0x8000(r5)
+ ldh r4,big_external_data_label-0x8000(r5)
+ ldh r4,small_external_data_label-0x8000(r5)
+ ldh r4,big_external_common-0x8000(r5)
+ ldh r4,small_external_common-0x8000(r5)
+ ldh r4,big_local_common-0x8000(r5)
+ ldh r4,small_local_common-0x8000(r5)
+
+ ldhio r4,0(r0)
+ ldhio r4,4(r0)
+ ldhio r4,0x7ffc(r0)
+ ldhio r4,-0x8000(r0)
+ ldhio r4,0(r5)
+ ldhio r4,4(r5)
+ ldhio r4,0x7ffc(r5)
+ ldhio r4,-0x8000(r5)
+ ldhio r4,data_label(r0)
+ ldhio r4,big_external_data_label(r0)
+ ldhio r4,small_external_data_label(r0)
+ ldhio r4,big_external_common(r0)
+ ldhio r4,small_external_common(r0)
+ ldhio r4,big_local_common(r0)
+ ldhio r4,small_local_common(r0)
+ ldhio r4,data_label+4(r0)
+ ldhio r4,big_external_data_label+4(r0)
+ ldhio r4,small_external_data_label+4(r0)
+ ldhio r4,big_external_common+4(r0)
+ ldhio r4,small_external_common+4(r0)
+ ldhio r4,big_local_common+4(r0)
+ ldhio r4,small_local_common+4(r0)
+ ldhio r4,data_label-0x8000(r0)
+ ldhio r4,big_external_data_label-0x8000(r0)
+ ldhio r4,small_external_data_label-0x8000(r0)
+ ldhio r4,big_external_common-0x8000(r0)
+ ldhio r4,small_external_common-0x8000(r0)
+ ldhio r4,big_local_common-0x8000(r0)
+ ldhio r4,small_local_common-0x8000(r0)
+ ldhio r4,data_label+0x10000(r0)
+ ldhio r4,data_label(r5)
+ ldhio r4,big_external_data_label(r5)
+ ldhio r4,small_external_data_label(r5)
+ ldhio r4,big_external_common(r5)
+ ldhio r4,small_external_common(r5)
+ ldhio r4,big_local_common(r5)
+ ldhio r4,small_local_common(r5)
+ ldhio r4,data_label+4(r5)
+ ldhio r4,big_external_data_label+4(r5)
+ ldhio r4,small_external_data_label+4(r5)
+ ldhio r4,big_external_common+4(r5)
+ ldhio r4,small_external_common+4(r5)
+ ldhio r4,big_local_common+4(r5)
+ ldhio r4,small_local_common+4(r5)
+ ldhio r4,data_label-0x8000(r5)
+ ldhio r4,big_external_data_label-0x8000(r5)
+ ldhio r4,small_external_data_label-0x8000(r5)
+ ldhio r4,big_external_common-0x8000(r5)
+ ldhio r4,small_external_common-0x8000(r5)
+ ldhio r4,big_local_common-0x8000(r5)
+ ldhio r4,small_local_common-0x8000(r5)
Index: gas/testsuite/gas/nios2/ldw.d
===================================================================
RCS file: gas/testsuite/gas/nios2/ldw.d
diff -N gas/testsuite/gas/nios2/ldw.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/ldw.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,196 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 ldw
+
+# Test the ld instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> ldw r4,0\(zero\)
+0+0004 <[^>]*> ldw r4,4\(zero\)
+0+0008 <[^>]*> ldw r4,32764\(zero\)
+0+000c <[^>]*> ldw r4,-32768\(zero\)
+0+0010 <[^>]*> ldw r4,0\(r5\)
+0+0014 <[^>]*> ldw r4,4\(r5\)
+0+0018 <[^>]*> ldw r4,32764\(r5\)
+0+001c <[^>]*> ldw r4,-32768\(r5\)
+0+0020 <[^>]*> ldw r4,0\(zero\)
+[ ]*20: R_NIOS2_S16 .data
+0+0024 <[^>]*> ldw r4,0\(zero\)
+[ ]*24: R_NIOS2_S16 big_external_data_label
+0+0028 <[^>]*> ldw r4,0\(zero\)
+[ ]*28: R_NIOS2_S16 small_external_data_label
+0+002c <[^>]*> ldw r4,0\(zero\)
+[ ]*2c: R_NIOS2_S16 big_external_common
+0+0030 <[^>]*> ldw r4,0\(zero\)
+[ ]*30: R_NIOS2_S16 small_external_common
+0+0034 <[^>]*> ldw r4,0\(zero\)
+[ ]*34: R_NIOS2_S16 .bss
+0+0038 <[^>]*> ldw r4,0\(zero\)
+[ ]*38: R_NIOS2_S16 .bss\+0x4000
+0+003c <[^>]*> ldw r4,0\(zero\)
+[ ]*3c: R_NIOS2_S16 .data\+0x4
+0+0040 <[^>]*> ldw r4,0\(zero\)
+[ ]*40: R_NIOS2_S16 big_external_data_label\+0x4
+0+0044 <[^>]*> ldw r4,0\(zero\)
+[ ]*44: R_NIOS2_S16 small_external_data_label\+0x4
+0+0048 <[^>]*> ldw r4,0\(zero\)
+[ ]*48: R_NIOS2_S16 big_external_common\+0x4
+0+004c <[^>]*> ldw r4,0\(zero\)
+[ ]*4c: R_NIOS2_S16 small_external_common\+0x4
+0+0050 <[^>]*> ldw r4,0\(zero\)
+[ ]*50: R_NIOS2_S16 .bss\+0x4
+0+0054 <[^>]*> ldw r4,0\(zero\)
+[ ]*54: R_NIOS2_S16 .bss\+0x4004
+0+0058 <[^>]*> ldw r4,0\(zero\)
+[ ]*58: R_NIOS2_S16 .data-0x8000
+0+005c <[^>]*> ldw r4,0\(zero\)
+[ ]*5c: R_NIOS2_S16 big_external_data_label-0x8000
+0+0060 <[^>]*> ldw r4,0\(zero\)
+[ ]*60: R_NIOS2_S16 small_external_data_label-0x8000
+0+0064 <[^>]*> ldw r4,0\(zero\)
+[ ]*64: R_NIOS2_S16 big_external_common-0x8000
+0+0068 <[^>]*> ldw r4,0\(zero\)
+[ ]*68: R_NIOS2_S16 small_external_common-0x8000
+0+006c <[^>]*> ldw r4,0\(zero\)
+[ ]*6c: R_NIOS2_S16 .bss-0x8000
+0+0070 <[^>]*> ldw r4,0\(zero\)
+[ ]*70: R_NIOS2_S16 .bss-0x4000
+0+0074 <[^>]*> ldw r4,0\(zero\)
+[ ]*74: R_NIOS2_S16 .data\+0x10000
+0+0078 <[^>]*> ldw r4,0\(r5\)
+[ ]*78: R_NIOS2_S16 .data
+0+007c <[^>]*> ldw r4,0\(r5\)
+[ ]*7c: R_NIOS2_S16 big_external_data_label
+0+0080 <[^>]*> ldw r4,0\(r5\)
+[ ]*80: R_NIOS2_S16 small_external_data_label
+0+0084 <[^>]*> ldw r4,0\(r5\)
+[ ]*84: R_NIOS2_S16 big_external_common
+0+0088 <[^>]*> ldw r4,0\(r5\)
+[ ]*88: R_NIOS2_S16 small_external_common
+0+008c <[^>]*> ldw r4,0\(r5\)
+[ ]*8c: R_NIOS2_S16 .bss
+0+0090 <[^>]*> ldw r4,0\(r5\)
+[ ]*90: R_NIOS2_S16 .bss\+0x4000
+0+0094 <[^>]*> ldw r4,0\(r5\)
+[ ]*94: R_NIOS2_S16 .data\+0x4
+0+0098 <[^>]*> ldw r4,0\(r5\)
+[ ]*98: R_NIOS2_S16 big_external_data_label\+0x4
+0+009c <[^>]*> ldw r4,0\(r5\)
+[ ]*9c: R_NIOS2_S16 small_external_data_label\+0x4
+0+00a0 <[^>]*> ldw r4,0\(r5\)
+[ ]*a0: R_NIOS2_S16 big_external_common\+0x4
+0+00a4 <[^>]*> ldw r4,0\(r5\)
+[ ]*a4: R_NIOS2_S16 small_external_common\+0x4
+0+00a8 <[^>]*> ldw r4,0\(r5\)
+[ ]*a8: R_NIOS2_S16 .bss\+0x4
+0+00ac <[^>]*> ldw r4,0\(r5\)
+[ ]*ac: R_NIOS2_S16 .bss\+0x4004
+0+00b0 <[^>]*> ldw r4,0\(r5\)
+[ ]*b0: R_NIOS2_S16 .data-0x8000
+0+00b4 <[^>]*> ldw r4,0\(r5\)
+[ ]*b4: R_NIOS2_S16 big_external_data_label-0x8000
+0+00b8 <[^>]*> ldw r4,0\(r5\)
+[ ]*b8: R_NIOS2_S16 small_external_data_label-0x8000
+0+00bc <[^>]*> ldw r4,0\(r5\)
+[ ]*bc: R_NIOS2_S16 big_external_common-0x8000
+0+00c0 <[^>]*> ldw r4,0\(r5\)
+[ ]*c0: R_NIOS2_S16 small_external_common-0x8000
+0+00c4 <[^>]*> ldw r4,0\(r5\)
+[ ]*c4: R_NIOS2_S16 .bss-0x8000
+0+00c8 <[^>]*> ldw r4,0\(r5\)
+[ ]*c8: R_NIOS2_S16 .bss-0x4000
+0+00cc <[^>]*> ldwio r4,0\(zero\)
+0+00d0 <[^>]*> ldwio r4,4\(zero\)
+0+00d4 <[^>]*> ldwio r4,32764\(zero\)
+0+00d8 <[^>]*> ldwio r4,-32768\(zero\)
+0+00dc <[^>]*> ldwio r4,0\(r5\)
+0+00e0 <[^>]*> ldwio r4,4\(r5\)
+0+00e4 <[^>]*> ldwio r4,32764\(r5\)
+0+00e8 <[^>]*> ldwio r4,-32768\(r5\)
+0+00ec <[^>]*> ldwio r4,0\(zero\)
+[ ]*ec: R_NIOS2_S16 .data
+0+00f0 <[^>]*> ldwio r4,0\(zero\)
+[ ]*f0: R_NIOS2_S16 big_external_data_label
+0+00f4 <[^>]*> ldwio r4,0\(zero\)
+[ ]*f4: R_NIOS2_S16 small_external_data_label
+0+00f8 <[^>]*> ldwio r4,0\(zero\)
+[ ]*f8: R_NIOS2_S16 big_external_common
+0+00fc <[^>]*> ldwio r4,0\(zero\)
+[ ]*fc: R_NIOS2_S16 small_external_common
+0+0100 <[^>]*> ldwio r4,0\(zero\)
+[ ]*100: R_NIOS2_S16 .bss
+0+0104 <[^>]*> ldwio r4,0\(zero\)
+[ ]*104: R_NIOS2_S16 .bss\+0x4000
+0+0108 <[^>]*> ldwio r4,0\(zero\)
+[ ]*108: R_NIOS2_S16 .data\+0x4
+0+010c <[^>]*> ldwio r4,0\(zero\)
+[ ]*10c: R_NIOS2_S16 big_external_data_label\+0x4
+0+0110 <[^>]*> ldwio r4,0\(zero\)
+[ ]*110: R_NIOS2_S16 small_external_data_label\+0x4
+0+0114 <[^>]*> ldwio r4,0\(zero\)
+[ ]*114: R_NIOS2_S16 big_external_common\+0x4
+0+0118 <[^>]*> ldwio r4,0\(zero\)
+[ ]*118: R_NIOS2_S16 small_external_common\+0x4
+0+011c <[^>]*> ldwio r4,0\(zero\)
+[ ]*11c: R_NIOS2_S16 .bss\+0x4
+0+0120 <[^>]*> ldwio r4,0\(zero\)
+[ ]*120: R_NIOS2_S16 .bss\+0x4004
+0+0124 <[^>]*> ldwio r4,0\(zero\)
+[ ]*124: R_NIOS2_S16 .data-0x8000
+0+0128 <[^>]*> ldwio r4,0\(zero\)
+[ ]*128: R_NIOS2_S16 big_external_data_label-0x8000
+0+012c <[^>]*> ldwio r4,0\(zero\)
+[ ]*12c: R_NIOS2_S16 small_external_data_label-0x8000
+0+0130 <[^>]*> ldwio r4,0\(zero\)
+[ ]*130: R_NIOS2_S16 big_external_common-0x8000
+0+0134 <[^>]*> ldwio r4,0\(zero\)
+[ ]*134: R_NIOS2_S16 small_external_common-0x8000
+0+0138 <[^>]*> ldwio r4,0\(zero\)
+[ ]*138: R_NIOS2_S16 .bss-0x8000
+0+013c <[^>]*> ldwio r4,0\(zero\)
+[ ]*13c: R_NIOS2_S16 .bss-0x4000
+0+0140 <[^>]*> ldwio r4,0\(zero\)
+[ ]*140: R_NIOS2_S16 .data\+0x10000
+0+0144 <[^>]*> ldwio r4,0\(r5\)
+[ ]*144: R_NIOS2_S16 .data
+0+0148 <[^>]*> ldwio r4,0\(r5\)
+[ ]*148: R_NIOS2_S16 big_external_data_label
+0+014c <[^>]*> ldwio r4,0\(r5\)
+[ ]*14c: R_NIOS2_S16 small_external_data_label
+0+0150 <[^>]*> ldwio r4,0\(r5\)
+[ ]*150: R_NIOS2_S16 big_external_common
+0+0154 <[^>]*> ldwio r4,0\(r5\)
+[ ]*154: R_NIOS2_S16 small_external_common
+0+0158 <[^>]*> ldwio r4,0\(r5\)
+[ ]*158: R_NIOS2_S16 .bss
+0+015c <[^>]*> ldwio r4,0\(r5\)
+[ ]*15c: R_NIOS2_S16 .bss\+0x4000
+0+0160 <[^>]*> ldwio r4,0\(r5\)
+[ ]*160: R_NIOS2_S16 .data\+0x4
+0+0164 <[^>]*> ldwio r4,0\(r5\)
+[ ]*164: R_NIOS2_S16 big_external_data_label\+0x4
+0+0168 <[^>]*> ldwio r4,0\(r5\)
+[ ]*168: R_NIOS2_S16 small_external_data_label\+0x4
+0+016c <[^>]*> ldwio r4,0\(r5\)
+[ ]*16c: R_NIOS2_S16 big_external_common\+0x4
+0+0170 <[^>]*> ldwio r4,0\(r5\)
+[ ]*170: R_NIOS2_S16 small_external_common\+0x4
+0+0174 <[^>]*> ldwio r4,0\(r5\)
+[ ]*174: R_NIOS2_S16 .bss\+0x4
+0+0178 <[^>]*> ldwio r4,0\(r5\)
+[ ]*178: R_NIOS2_S16 .bss\+0x4004
+0+017c <[^>]*> ldwio r4,0\(r5\)
+[ ]*17c: R_NIOS2_S16 .data-0x8000
+0+0180 <[^>]*> ldwio r4,0\(r5\)
+[ ]*180: R_NIOS2_S16 big_external_data_label-0x8000
+0+0184 <[^>]*> ldwio r4,0\(r5\)
+[ ]*184: R_NIOS2_S16 small_external_data_label-0x8000
+0+0188 <[^>]*> ldwio r4,0\(r5\)
+[ ]*188: R_NIOS2_S16 big_external_common-0x8000
+0+018c <[^>]*> ldwio r4,0\(r5\)
+[ ]*18c: R_NIOS2_S16 small_external_common-0x8000
+0+0190 <[^>]*> ldwio r4,0\(r5\)
+[ ]*190: R_NIOS2_S16 .bss-0x8000
+0+0194 <[^>]*> ldwio r4,0\(r5\)
+[ ]*194: R_NIOS2_S16 .bss-0x4000
Index: gas/testsuite/gas/nios2/ldw.s
===================================================================
RCS file: gas/testsuite/gas/nios2/ldw.s
diff -N gas/testsuite/gas/nios2/ldw.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/ldw.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,117 @@
+ .data
+data_label:
+ .extern big_external_data_label,0x4000
+ .extern small_external_data_label,4
+ .comm big_external_common,0x4000
+ .comm small_external_common,4
+ .lcomm big_local_common,0x4000
+ .lcomm small_local_common,4
+
+# the small symbols should have space allocated in the sbss section
+# but this is not yet supported in the assembler, so space is allocated
+# in the .bss section and the relocations are not gp-relative. this will
+# be updated when gp-relative relocations are added
+ .text
+ ldw r4,0(r0)
+ ldw r4,4(r0)
+ ldw r4,0x7ffc(r0)
+ ldw r4,-0x8000(r0)
+ ldw r4,0(r5)
+ ldw r4,4(r5)
+ ldw r4,0x7ffc(r5)
+ ldw r4,-0x8000(r5)
+ ldw r4,data_label(r0)
+ ldw r4,big_external_data_label(r0)
+ ldw r4,small_external_data_label(r0)
+ ldw r4,big_external_common(r0)
+ ldw r4,small_external_common(r0)
+ ldw r4,big_local_common(r0)
+ ldw r4,small_local_common(r0)
+ ldw r4,data_label+4(r0)
+ ldw r4,big_external_data_label+4(r0)
+ ldw r4,small_external_data_label+4(r0)
+ ldw r4,big_external_common+4(r0)
+ ldw r4,small_external_common+4(r0)
+ ldw r4,big_local_common+4(r0)
+ ldw r4,small_local_common+4(r0)
+ ldw r4,data_label-0x8000(r0)
+ ldw r4,big_external_data_label-0x8000(r0)
+ ldw r4,small_external_data_label-0x8000(r0)
+ ldw r4,big_external_common-0x8000(r0)
+ ldw r4,small_external_common-0x8000(r0)
+ ldw r4,big_local_common-0x8000(r0)
+ ldw r4,small_local_common-0x8000(r0)
+ ldw r4,data_label+0x10000(r0)
+ ldw r4,data_label(r5)
+ ldw r4,big_external_data_label(r5)
+ ldw r4,small_external_data_label(r5)
+ ldw r4,big_external_common(r5)
+ ldw r4,small_external_common(r5)
+ ldw r4,big_local_common(r5)
+ ldw r4,small_local_common(r5)
+ ldw r4,data_label+4(r5)
+ ldw r4,big_external_data_label+4(r5)
+ ldw r4,small_external_data_label+4(r5)
+ ldw r4,big_external_common+4(r5)
+ ldw r4,small_external_common+4(r5)
+ ldw r4,big_local_common+4(r5)
+ ldw r4,small_local_common+4(r5)
+ ldw r4,data_label-0x8000(r5)
+ ldw r4,big_external_data_label-0x8000(r5)
+ ldw r4,small_external_data_label-0x8000(r5)
+ ldw r4,big_external_common-0x8000(r5)
+ ldw r4,small_external_common-0x8000(r5)
+ ldw r4,big_local_common-0x8000(r5)
+ ldw r4,small_local_common-0x8000(r5)
+
+ ldwio r4,0(r0)
+ ldwio r4,4(r0)
+ ldwio r4,0x7ffc(r0)
+ ldwio r4,-0x8000(r0)
+ ldwio r4,0(r5)
+ ldwio r4,4(r5)
+ ldwio r4,0x7ffc(r5)
+ ldwio r4,-0x8000(r5)
+ ldwio r4,data_label(r0)
+ ldwio r4,big_external_data_label(r0)
+ ldwio r4,small_external_data_label(r0)
+ ldwio r4,big_external_common(r0)
+ ldwio r4,small_external_common(r0)
+ ldwio r4,big_local_common(r0)
+ ldwio r4,small_local_common(r0)
+ ldwio r4,data_label+4(r0)
+ ldwio r4,big_external_data_label+4(r0)
+ ldwio r4,small_external_data_label+4(r0)
+ ldwio r4,big_external_common+4(r0)
+ ldwio r4,small_external_common+4(r0)
+ ldwio r4,big_local_common+4(r0)
+ ldwio r4,small_local_common+4(r0)
+ ldwio r4,data_label-0x8000(r0)
+ ldwio r4,big_external_data_label-0x8000(r0)
+ ldwio r4,small_external_data_label-0x8000(r0)
+ ldwio r4,big_external_common-0x8000(r0)
+ ldwio r4,small_external_common-0x8000(r0)
+ ldwio r4,big_local_common-0x8000(r0)
+ ldwio r4,small_local_common-0x8000(r0)
+ ldwio r4,data_label+0x10000(r0)
+ ldwio r4,data_label(r5)
+ ldwio r4,big_external_data_label(r5)
+ ldwio r4,small_external_data_label(r5)
+ ldwio r4,big_external_common(r5)
+ ldwio r4,small_external_common(r5)
+ ldwio r4,big_local_common(r5)
+ ldwio r4,small_local_common(r5)
+ ldwio r4,data_label+4(r5)
+ ldwio r4,big_external_data_label+4(r5)
+ ldwio r4,small_external_data_label+4(r5)
+ ldwio r4,big_external_common+4(r5)
+ ldwio r4,small_external_common+4(r5)
+ ldwio r4,big_local_common+4(r5)
+ ldwio r4,small_local_common+4(r5)
+ ldwio r4,data_label-0x8000(r5)
+ ldwio r4,big_external_data_label-0x8000(r5)
+ ldwio r4,small_external_data_label-0x8000(r5)
+ ldwio r4,big_external_common-0x8000(r5)
+ ldwio r4,small_external_common-0x8000(r5)
+ ldwio r4,big_local_common-0x8000(r5)
+ ldwio r4,small_local_common-0x8000(r5)
Index: gas/testsuite/gas/nios2/lineseparator.d
===================================================================
RCS file: gas/testsuite/gas/nios2/lineseparator.d
diff -N gas/testsuite/gas/nios2/lineseparator.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/lineseparator.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,10 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 lineseparator
+
+# Test the add instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0x0+0000 mov r5,r4
+0x0+0004 mov r4,r5
Index: gas/testsuite/gas/nios2/lineseparator.s
===================================================================
RCS file: gas/testsuite/gas/nios2/lineseparator.s
diff -N gas/testsuite/gas/nios2/lineseparator.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/lineseparator.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,4 @@
+mov r5, r4 ; mov r4, r5
+
+
+
Index: gas/testsuite/gas/nios2/mov.d
===================================================================
RCS file: gas/testsuite/gas/nios2/mov.d
diff -N gas/testsuite/gas/nios2/mov.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/mov.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,11 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 mov
+
+# Test the mov instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> movz \$4,\$5,\$6
+0+0004 <[^>]*> movnz \$4,\$5,\$6
+
Index: gas/testsuite/gas/nios2/mov.s
===================================================================
RCS file: gas/testsuite/gas/nios2/mov.s
diff -N gas/testsuite/gas/nios2/mov.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/mov.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,5 @@
+# Source file used to test the movz and movnz instructions
+
+foo:
+ movz $4,$5,$6
+ movnz $4,$5,$6
Index: gas/testsuite/gas/nios2/movi.d
===================================================================
RCS file: gas/testsuite/gas/nios2/movi.d
diff -N gas/testsuite/gas/nios2/movi.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/movi.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,13 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 movi
+
+# Test implicit conversion of movi/movhi etc
+.*: file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> movi r2,32
+0+0004 <[^>]*> movhi r2,8192
+0+0008 <[^>]*> movhi r2,65535
+0+000c <[^>]*> orhi r2,r5,65535
+0+0010 <[^>]*> xorhi r2,r10,65535
+0+0014 <[^>]*> andhi r2,r15,65535
Index: gas/testsuite/gas/nios2/movi.s
===================================================================
RCS file: gas/testsuite/gas/nios2/movi.s
diff -N gas/testsuite/gas/nios2/movi.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/movi.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,21 @@
+# Source file used to test silent conversion of
+# movi to orhi etc
+
+foo:
+# this doesn't get converted
+movi r2, 0x20
+
+# this does
+movi r2, 0x20000000
+
+# addi should convert only if the source register is r0
+addi r2, r0, 0xffff0000
+# but we can't test for non-conversion because the value would
+# be out of range
+
+# logical ops should convert for any register
+ori r2, r5, 0xffff0000
+xori r2, r10, 0xffff0000
+andi r2, r15, 0xffff0000
+
+
Index: gas/testsuite/gas/nios2/movia.d
===================================================================
RCS file: gas/testsuite/gas/nios2/movia.d
diff -N gas/testsuite/gas/nios2/movia.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/movia.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,18 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 movia
+
+# Test the movia instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> movhi r2,32897
+0+0004 <[^>]*> addi r2,r2,-32640
+0+0008 <[^>]*> movhi r3,0
+ 8: R_NIOS2_HIADJ16 sym-0x80000000
+0+000c <[^>]*> addi r3,r3,0
+ c: R_NIOS2_LO16 sym-0x80000000
+0+0010 <[^>]*> movhi r4,0
+ 10: R_NIOS2_HIADJ16 sym-0x7fffffff
+0+0014 <[^>]*> addi r4,r4,0
+ 14: R_NIOS2_LO16 sym-0x7fffffff
Index: gas/testsuite/gas/nios2/movia.s
===================================================================
RCS file: gas/testsuite/gas/nios2/movia.s
diff -N gas/testsuite/gas/nios2/movia.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/movia.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,6 @@
+# Test program for movia reg, immed32 macro
+
+foo:
+ movia r2, 0x80808080
+ movia r3, sym + 0x80000000
+ movia r4, sym - 0x7fffffff
Index: gas/testsuite/gas/nios2/mul.d
===================================================================
RCS file: gas/testsuite/gas/nios2/mul.d
diff -N gas/testsuite/gas/nios2/mul.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/mul.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,19 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 mul
+
+# Test the mul macro.
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> mul r4,r5,r6
+0+0004 <[^>]*> muli r4,r5,0
+0+0008 <[^>]*> muli r4,r5,1
+0+000c <[^>]*> muli r4,r5,-32768
+0+0010 <[^>]*> muli r4,r5,32767
+0+0014 <[^>]*> muli r4,r5,0
+[ ]*14: R_NIOS2_S16 undefined_symbol
+0+0018 <[^>]*> muli r4,r5,16448
+0+001c <[^>]*> mulxss r4,r5,r6
+0+0020 <[^>]*> mulxsu r4,r5,r6
+0+0024 <[^>]*> mulxuu r4,r5,r6
Index: gas/testsuite/gas/nios2/mul.s
===================================================================
RCS file: gas/testsuite/gas/nios2/mul.s
diff -N gas/testsuite/gas/nios2/mul.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/mul.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,15 @@
+# Source file used to test the mul macro.
+
+foo:
+ mul r4,r5,r6
+ muli r4,r5,0
+ muli r4,r5,1
+ muli r4,r5,-0x8000
+ muli r4,r5,0x7fff
+ muli r4,r5,undefined_symbol
+ muli r4,r5,defined_symbol
+ mulxss r4,r5,r6
+ mulxsu r4,r5,r6
+ mulxuu r4,r5,r6
+.data
+.set defined_symbol, 0x4040
Index: gas/testsuite/gas/nios2/nios2.exp
===================================================================
RCS file: gas/testsuite/gas/nios2/nios2.exp
diff -N gas/testsuite/gas/nios2/nios2.exp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/nios2.exp 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,75 @@
+#
+# Some generic Nios II tests
+#
+
+proc run_list_test { name } {
+ global srcdir subdir
+ set testname "NIOS2 $name"
+ set file $srcdir/$subdir/$name
+ gas_run ${name}.s "" ">&dump.out"
+ if { [regexp_diff "dump.out" "${file}.l"] } then {
+ fail $testname
+ verbose "output is [file_contents "dump.out"]" 2
+ return
+ }
+ pass $testname
+}
+
+if { [istarget nios2-*-*] } then {
+
+ run_dump_test "add"
+ run_dump_test "and"
+ run_dump_test "align_fill"
+ run_dump_test "align_text"
+
+ run_dump_test "branch"
+
+ run_dump_test "break"
+ run_dump_test "bret"
+ run_dump_test "cache"
+
+ run_dump_test "call"
+ run_dump_test "call26"
+
+ run_dump_test "cmp"
+
+ run_dump_test "jmp"
+ run_dump_test "ldw"
+ run_dump_test "ldh"
+ run_dump_test "ldb"
+
+ run_dump_test "flushda"
+
+ run_dump_test "mul"
+
+ run_dump_test "nor"
+ run_dump_test "or"
+
+ run_dump_test "ctl"
+ run_dump_test "ret"
+ run_dump_test "rotate"
+
+ run_dump_test "stw"
+ run_dump_test "sth"
+ run_dump_test "stb"
+
+ run_dump_test "sub"
+ run_dump_test "sync"
+ run_dump_test "trap"
+ run_dump_test "tret"
+
+ run_dump_test "custom"
+ run_dump_test "xor"
+ run_dump_test "movia"
+
+ run_dump_test "complex"
+ run_dump_test "comments"
+ run_dump_test "etbt"
+ run_dump_test "lineseparator"
+ run_dump_test "movi"
+
+ run_list_test "illegal"
+ run_list_test "warn_nobreak"
+ run_list_test "warn_noat"
+
+}
Index: gas/testsuite/gas/nios2/nor.d
===================================================================
RCS file: gas/testsuite/gas/nios2/nor.d
diff -N gas/testsuite/gas/nios2/nor.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/nor.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,9 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 nor
+
+# Test the nor instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> nor r6,r8,r10
Index: gas/testsuite/gas/nios2/nor.s
===================================================================
RCS file: gas/testsuite/gas/nios2/nor.s
diff -N gas/testsuite/gas/nios2/nor.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/nor.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,5 @@
+# Source file used to test the nor instruction
+
+foo:
+ nor r6,r8,r10
+
Index: gas/testsuite/gas/nios2/or.d
===================================================================
RCS file: gas/testsuite/gas/nios2/or.d
diff -N gas/testsuite/gas/nios2/or.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/or.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,11 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 or
+
+# Test the nor instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> or r6,r8,r10
+0+0004 <[^>]*> orhi r6,r7,65535
+0+0008 <[^>]*> ori r6,r7,65535
Index: gas/testsuite/gas/nios2/or.s
===================================================================
RCS file: gas/testsuite/gas/nios2/or.s
diff -N gas/testsuite/gas/nios2/or.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/or.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,7 @@
+# Source file used to test the nor instruction
+
+foo:
+ or r6,r8,r10
+ orhi r6,r7,0xffff
+ ori r6,r7,0xffff
+
Index: gas/testsuite/gas/nios2/ret.d
===================================================================
RCS file: gas/testsuite/gas/nios2/ret.d
diff -N gas/testsuite/gas/nios2/ret.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/ret.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,8 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 ret
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> ret
+
Index: gas/testsuite/gas/nios2/ret.s
===================================================================
RCS file: gas/testsuite/gas/nios2/ret.s
diff -N gas/testsuite/gas/nios2/ret.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/ret.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,5 @@
+# Source file used to test the ret instructions
+foo:
+ ret
+
+
Index: gas/testsuite/gas/nios2/rol.d
===================================================================
RCS file: gas/testsuite/gas/nios2/rol.d
diff -N gas/testsuite/gas/nios2/rol.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/rol.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,40 @@
+#objdump: -dr --prefix-addresses -mmips:3000
+#as: -march=r3000 -mtune=r3000
+#name: MIPS R3000 rol
+
+# Test the rol and ror macros.
+
+.*: +file format .*mips.*
+
+Disassembly of section .text:
+0+0000 <[^>]*> negu at,a1
+0+0004 <[^>]*> srlv at,a0,at
+0+0008 <[^>]*> sllv a0,a0,a1
+0+000c <[^>]*> or a0,a0,at
+0+0010 <[^>]*> negu at,a2
+0+0014 <[^>]*> srlv at,a1,at
+0+0018 <[^>]*> sllv a0,a1,a2
+0+001c <[^>]*> or a0,a0,at
+0+0020 <[^>]*> sll at,a0,0x1
+0+0024 <[^>]*> srl a0,a0,0x1f
+0+0028 <[^>]*> or a0,a0,at
+0+002c <[^>]*> sll at,a1,0x1
+0+0030 <[^>]*> srl a0,a1,0x1f
+0+0034 <[^>]*> or a0,a0,at
+0+0038 <[^>]*> srl a0,a1,0x0
+0+003c <[^>]*> negu at,a1
+0+0040 <[^>]*> sllv at,a0,at
+0+0044 <[^>]*> srlv a0,a0,a1
+0+0048 <[^>]*> or a0,a0,at
+0+004c <[^>]*> negu at,a2
+0+0050 <[^>]*> sllv at,a1,at
+0+0054 <[^>]*> srlv a0,a1,a2
+0+0058 <[^>]*> or a0,a0,at
+0+005c <[^>]*> srl at,a0,0x1
+0+0060 <[^>]*> sll a0,a0,0x1f
+0+0064 <[^>]*> or a0,a0,at
+0+0068 <[^>]*> srl at,a1,0x1
+0+006c <[^>]*> sll a0,a1,0x1f
+0+0070 <[^>]*> or a0,a0,at
+0+0074 <[^>]*> srl a0,a1,0x0
+ ...
Index: gas/testsuite/gas/nios2/rol.s
===================================================================
RCS file: gas/testsuite/gas/nios2/rol.s
diff -N gas/testsuite/gas/nios2/rol.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/rol.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,15 @@
+# Source file used to test the rol and ror macros.
+
+foo:
+ rol $4,$5
+ rol $4,$5,$6
+ rol $4,1
+ rol $4,$5,1
+ rol $4,$5,0
+
+ ror $4,$5
+ ror $4,$5,$6
+ ror $4,1
+ ror $4,$5,1
+ ror $4,$5,0
+ .space 8
Index: gas/testsuite/gas/nios2/rotate.d
===================================================================
RCS file: gas/testsuite/gas/nios2/rotate.d
diff -N gas/testsuite/gas/nios2/rotate.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/rotate.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,17 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 rotate
+
+# Test the and macro.
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> rol r4,r4,r4
+0+0004 <[^>]*> roli r4,r4,31
+0+0008 <[^>]*> ror r4,r4,r4
+0+000c <[^>]*> sll r4,r4,r4
+0+0010 <[^>]*> slli r4,r4,24
+0+0014 <[^>]*> sra r4,r4,r4
+0+0018 <[^>]*> srai r4,r4,10
+0+001c <[^>]*> srl r4,r4,r4
+0+0020 <[^>]*> srli r4,r4,5
Index: gas/testsuite/gas/nios2/rotate.s
===================================================================
RCS file: gas/testsuite/gas/nios2/rotate.s
diff -N gas/testsuite/gas/nios2/rotate.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/rotate.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,13 @@
+# test Nios II rotate instructions
+
+.text
+foo:
+ rol r4,r4,r4
+ roli r4,r4,31
+ ror r4,r4,r4
+ sll r4,r4,r4
+ slli r4,r4,24
+ sra r4,r4,r4
+ srai r4,r4,10
+ srl r4,r4,r4
+ srli r4,r4,5
Index: gas/testsuite/gas/nios2/stb.d
===================================================================
RCS file: gas/testsuite/gas/nios2/stb.d
diff -N gas/testsuite/gas/nios2/stb.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/stb.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,196 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 stb
+
+# Test the ld instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> stb r4,0\(zero\)
+0+0004 <[^>]*> stb r4,4\(zero\)
+0+0008 <[^>]*> stb r4,32764\(zero\)
+0+000c <[^>]*> stb r4,-32768\(zero\)
+0+0010 <[^>]*> stb r4,0\(r5\)
+0+0014 <[^>]*> stb r4,4\(r5\)
+0+0018 <[^>]*> stb r4,32764\(r5\)
+0+001c <[^>]*> stb r4,-32768\(r5\)
+0+0020 <[^>]*> stb r4,0\(zero\)
+[ ]*20: R_NIOS2_S16 .data
+0+0024 <[^>]*> stb r4,0\(zero\)
+[ ]*24: R_NIOS2_S16 big_external_data_label
+0+0028 <[^>]*> stb r4,0\(zero\)
+[ ]*28: R_NIOS2_S16 small_external_data_label
+0+002c <[^>]*> stb r4,0\(zero\)
+[ ]*2c: R_NIOS2_S16 big_external_common
+0+0030 <[^>]*> stb r4,0\(zero\)
+[ ]*30: R_NIOS2_S16 small_external_common
+0+0034 <[^>]*> stb r4,0\(zero\)
+[ ]*34: R_NIOS2_S16 .bss
+0+0038 <[^>]*> stb r4,0\(zero\)
+[ ]*38: R_NIOS2_S16 .bss\+0x4000
+0+003c <[^>]*> stb r4,0\(zero\)
+[ ]*3c: R_NIOS2_S16 .data\+0x4
+0+0040 <[^>]*> stb r4,0\(zero\)
+[ ]*40: R_NIOS2_S16 big_external_data_label\+0x4
+0+0044 <[^>]*> stb r4,0\(zero\)
+[ ]*44: R_NIOS2_S16 small_external_data_label\+0x4
+0+0048 <[^>]*> stb r4,0\(zero\)
+[ ]*48: R_NIOS2_S16 big_external_common\+0x4
+0+004c <[^>]*> stb r4,0\(zero\)
+[ ]*4c: R_NIOS2_S16 small_external_common\+0x4
+0+0050 <[^>]*> stb r4,0\(zero\)
+[ ]*50: R_NIOS2_S16 .bss\+0x4
+0+0054 <[^>]*> stb r4,0\(zero\)
+[ ]*54: R_NIOS2_S16 .bss\+0x4004
+0+0058 <[^>]*> stb r4,0\(zero\)
+[ ]*58: R_NIOS2_S16 .data-0x8000
+0+005c <[^>]*> stb r4,0\(zero\)
+[ ]*5c: R_NIOS2_S16 big_external_data_label-0x8000
+0+0060 <[^>]*> stb r4,0\(zero\)
+[ ]*60: R_NIOS2_S16 small_external_data_label-0x8000
+0+0064 <[^>]*> stb r4,0\(zero\)
+[ ]*64: R_NIOS2_S16 big_external_common-0x8000
+0+0068 <[^>]*> stb r4,0\(zero\)
+[ ]*68: R_NIOS2_S16 small_external_common-0x8000
+0+006c <[^>]*> stb r4,0\(zero\)
+[ ]*6c: R_NIOS2_S16 .bss-0x8000
+0+0070 <[^>]*> stb r4,0\(zero\)
+[ ]*70: R_NIOS2_S16 .bss-0x4000
+0+0074 <[^>]*> stb r4,0\(zero\)
+[ ]*74: R_NIOS2_S16 .data\+0x10000
+0+0078 <[^>]*> stb r4,0\(r5\)
+[ ]*78: R_NIOS2_S16 .data
+0+007c <[^>]*> stb r4,0\(r5\)
+[ ]*7c: R_NIOS2_S16 big_external_data_label
+0+0080 <[^>]*> stb r4,0\(r5\)
+[ ]*80: R_NIOS2_S16 small_external_data_label
+0+0084 <[^>]*> stb r4,0\(r5\)
+[ ]*84: R_NIOS2_S16 big_external_common
+0+0088 <[^>]*> stb r4,0\(r5\)
+[ ]*88: R_NIOS2_S16 small_external_common
+0+008c <[^>]*> stb r4,0\(r5\)
+[ ]*8c: R_NIOS2_S16 .bss
+0+0090 <[^>]*> stb r4,0\(r5\)
+[ ]*90: R_NIOS2_S16 .bss\+0x4000
+0+0094 <[^>]*> stb r4,0\(r5\)
+[ ]*94: R_NIOS2_S16 .data\+0x4
+0+0098 <[^>]*> stb r4,0\(r5\)
+[ ]*98: R_NIOS2_S16 big_external_data_label\+0x4
+0+009c <[^>]*> stb r4,0\(r5\)
+[ ]*9c: R_NIOS2_S16 small_external_data_label\+0x4
+0+00a0 <[^>]*> stb r4,0\(r5\)
+[ ]*a0: R_NIOS2_S16 big_external_common\+0x4
+0+00a4 <[^>]*> stb r4,0\(r5\)
+[ ]*a4: R_NIOS2_S16 small_external_common\+0x4
+0+00a8 <[^>]*> stb r4,0\(r5\)
+[ ]*a8: R_NIOS2_S16 .bss\+0x4
+0+00ac <[^>]*> stb r4,0\(r5\)
+[ ]*ac: R_NIOS2_S16 .bss\+0x4004
+0+00b0 <[^>]*> stb r4,0\(r5\)
+[ ]*b0: R_NIOS2_S16 .data-0x8000
+0+00b4 <[^>]*> stb r4,0\(r5\)
+[ ]*b4: R_NIOS2_S16 big_external_data_label-0x8000
+0+00b8 <[^>]*> stb r4,0\(r5\)
+[ ]*b8: R_NIOS2_S16 small_external_data_label-0x8000
+0+00bc <[^>]*> stb r4,0\(r5\)
+[ ]*bc: R_NIOS2_S16 big_external_common-0x8000
+0+00c0 <[^>]*> stb r4,0\(r5\)
+[ ]*c0: R_NIOS2_S16 small_external_common-0x8000
+0+00c4 <[^>]*> stb r4,0\(r5\)
+[ ]*c4: R_NIOS2_S16 .bss-0x8000
+0+00c8 <[^>]*> stb r4,0\(r5\)
+[ ]*c8: R_NIOS2_S16 .bss-0x4000
+0+00cc <[^>]*> stbio r4,0\(zero\)
+0+00d0 <[^>]*> stbio r4,4\(zero\)
+0+00d4 <[^>]*> stbio r4,32764\(zero\)
+0+00d8 <[^>]*> stbio r4,-32768\(zero\)
+0+00dc <[^>]*> stbio r4,0\(r5\)
+0+00e0 <[^>]*> stbio r4,4\(r5\)
+0+00e4 <[^>]*> stbio r4,32764\(r5\)
+0+00e8 <[^>]*> stbio r4,-32768\(r5\)
+0+00ec <[^>]*> stbio r4,0\(zero\)
+[ ]*ec: R_NIOS2_S16 .data
+0+00f0 <[^>]*> stbio r4,0\(zero\)
+[ ]*f0: R_NIOS2_S16 big_external_data_label
+0+00f4 <[^>]*> stbio r4,0\(zero\)
+[ ]*f4: R_NIOS2_S16 small_external_data_label
+0+00f8 <[^>]*> stbio r4,0\(zero\)
+[ ]*f8: R_NIOS2_S16 big_external_common
+0+00fc <[^>]*> stbio r4,0\(zero\)
+[ ]*fc: R_NIOS2_S16 small_external_common
+0+0100 <[^>]*> stbio r4,0\(zero\)
+[ ]*100: R_NIOS2_S16 .bss
+0+0104 <[^>]*> stbio r4,0\(zero\)
+[ ]*104: R_NIOS2_S16 .bss\+0x4000
+0+0108 <[^>]*> stbio r4,0\(zero\)
+[ ]*108: R_NIOS2_S16 .data\+0x4
+0+010c <[^>]*> stbio r4,0\(zero\)
+[ ]*10c: R_NIOS2_S16 big_external_data_label\+0x4
+0+0110 <[^>]*> stbio r4,0\(zero\)
+[ ]*110: R_NIOS2_S16 small_external_data_label\+0x4
+0+0114 <[^>]*> stbio r4,0\(zero\)
+[ ]*114: R_NIOS2_S16 big_external_common\+0x4
+0+0118 <[^>]*> stbio r4,0\(zero\)
+[ ]*118: R_NIOS2_S16 small_external_common\+0x4
+0+011c <[^>]*> stbio r4,0\(zero\)
+[ ]*11c: R_NIOS2_S16 .bss\+0x4
+0+0120 <[^>]*> stbio r4,0\(zero\)
+[ ]*120: R_NIOS2_S16 .bss\+0x4004
+0+0124 <[^>]*> stbio r4,0\(zero\)
+[ ]*124: R_NIOS2_S16 .data-0x8000
+0+0128 <[^>]*> stbio r4,0\(zero\)
+[ ]*128: R_NIOS2_S16 big_external_data_label-0x8000
+0+012c <[^>]*> stbio r4,0\(zero\)
+[ ]*12c: R_NIOS2_S16 small_external_data_label-0x8000
+0+0130 <[^>]*> stbio r4,0\(zero\)
+[ ]*130: R_NIOS2_S16 big_external_common-0x8000
+0+0134 <[^>]*> stbio r4,0\(zero\)
+[ ]*134: R_NIOS2_S16 small_external_common-0x8000
+0+0138 <[^>]*> stbio r4,0\(zero\)
+[ ]*138: R_NIOS2_S16 .bss-0x8000
+0+013c <[^>]*> stbio r4,0\(zero\)
+[ ]*13c: R_NIOS2_S16 .bss-0x4000
+0+0140 <[^>]*> stbio r4,0\(zero\)
+[ ]*140: R_NIOS2_S16 .data\+0x10000
+0+0144 <[^>]*> stbio r4,0\(r5\)
+[ ]*144: R_NIOS2_S16 .data
+0+0148 <[^>]*> stbio r4,0\(r5\)
+[ ]*148: R_NIOS2_S16 big_external_data_label
+0+014c <[^>]*> stbio r4,0\(r5\)
+[ ]*14c: R_NIOS2_S16 small_external_data_label
+0+0150 <[^>]*> stbio r4,0\(r5\)
+[ ]*150: R_NIOS2_S16 big_external_common
+0+0154 <[^>]*> stbio r4,0\(r5\)
+[ ]*154: R_NIOS2_S16 small_external_common
+0+0158 <[^>]*> stbio r4,0\(r5\)
+[ ]*158: R_NIOS2_S16 .bss
+0+015c <[^>]*> stbio r4,0\(r5\)
+[ ]*15c: R_NIOS2_S16 .bss\+0x4000
+0+0160 <[^>]*> stbio r4,0\(r5\)
+[ ]*160: R_NIOS2_S16 .data\+0x4
+0+0164 <[^>]*> stbio r4,0\(r5\)
+[ ]*164: R_NIOS2_S16 big_external_data_label\+0x4
+0+0168 <[^>]*> stbio r4,0\(r5\)
+[ ]*168: R_NIOS2_S16 small_external_data_label\+0x4
+0+016c <[^>]*> stbio r4,0\(r5\)
+[ ]*16c: R_NIOS2_S16 big_external_common\+0x4
+0+0170 <[^>]*> stbio r4,0\(r5\)
+[ ]*170: R_NIOS2_S16 small_external_common\+0x4
+0+0174 <[^>]*> stbio r4,0\(r5\)
+[ ]*174: R_NIOS2_S16 .bss\+0x4
+0+0178 <[^>]*> stbio r4,0\(r5\)
+[ ]*178: R_NIOS2_S16 .bss\+0x4004
+0+017c <[^>]*> stbio r4,0\(r5\)
+[ ]*17c: R_NIOS2_S16 .data-0x8000
+0+0180 <[^>]*> stbio r4,0\(r5\)
+[ ]*180: R_NIOS2_S16 big_external_data_label-0x8000
+0+0184 <[^>]*> stbio r4,0\(r5\)
+[ ]*184: R_NIOS2_S16 small_external_data_label-0x8000
+0+0188 <[^>]*> stbio r4,0\(r5\)
+[ ]*188: R_NIOS2_S16 big_external_common-0x8000
+0+018c <[^>]*> stbio r4,0\(r5\)
+[ ]*18c: R_NIOS2_S16 small_external_common-0x8000
+0+0190 <[^>]*> stbio r4,0\(r5\)
+[ ]*190: R_NIOS2_S16 .bss-0x8000
+0+0194 <[^>]*> stbio r4,0\(r5\)
+[ ]*194: R_NIOS2_S16 .bss-0x4000
Index: gas/testsuite/gas/nios2/stb.s
===================================================================
RCS file: gas/testsuite/gas/nios2/stb.s
diff -N gas/testsuite/gas/nios2/stb.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/stb.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,117 @@
+ .data
+data_label:
+ .extern big_external_data_label,0x4000
+ .extern small_external_data_label,4
+ .comm big_external_common,0x4000
+ .comm small_external_common,4
+ .lcomm big_local_common,0x4000
+ .lcomm small_local_common,4
+
+# the small symbols should have space allocated in the sbss section
+# but this is not yet supported in the assembler, so space is allocated
+# in the .bss section and the relocations are not gp-relative. this will
+# be updated when gp-relative relocations are added
+ .text
+ stb r4,0(r0)
+ stb r4,4(r0)
+ stb r4,0x7ffc(r0)
+ stb r4,-0x8000(r0)
+ stb r4,0(r5)
+ stb r4,4(r5)
+ stb r4,0x7ffc(r5)
+ stb r4,-0x8000(r5)
+ stb r4,data_label(r0)
+ stb r4,big_external_data_label(r0)
+ stb r4,small_external_data_label(r0)
+ stb r4,big_external_common(r0)
+ stb r4,small_external_common(r0)
+ stb r4,big_local_common(r0)
+ stb r4,small_local_common(r0)
+ stb r4,data_label+4(r0)
+ stb r4,big_external_data_label+4(r0)
+ stb r4,small_external_data_label+4(r0)
+ stb r4,big_external_common+4(r0)
+ stb r4,small_external_common+4(r0)
+ stb r4,big_local_common+4(r0)
+ stb r4,small_local_common+4(r0)
+ stb r4,data_label-0x8000(r0)
+ stb r4,big_external_data_label-0x8000(r0)
+ stb r4,small_external_data_label-0x8000(r0)
+ stb r4,big_external_common-0x8000(r0)
+ stb r4,small_external_common-0x8000(r0)
+ stb r4,big_local_common-0x8000(r0)
+ stb r4,small_local_common-0x8000(r0)
+ stb r4,data_label+0x10000(r0)
+ stb r4,data_label(r5)
+ stb r4,big_external_data_label(r5)
+ stb r4,small_external_data_label(r5)
+ stb r4,big_external_common(r5)
+ stb r4,small_external_common(r5)
+ stb r4,big_local_common(r5)
+ stb r4,small_local_common(r5)
+ stb r4,data_label+4(r5)
+ stb r4,big_external_data_label+4(r5)
+ stb r4,small_external_data_label+4(r5)
+ stb r4,big_external_common+4(r5)
+ stb r4,small_external_common+4(r5)
+ stb r4,big_local_common+4(r5)
+ stb r4,small_local_common+4(r5)
+ stb r4,data_label-0x8000(r5)
+ stb r4,big_external_data_label-0x8000(r5)
+ stb r4,small_external_data_label-0x8000(r5)
+ stb r4,big_external_common-0x8000(r5)
+ stb r4,small_external_common-0x8000(r5)
+ stb r4,big_local_common-0x8000(r5)
+ stb r4,small_local_common-0x8000(r5)
+
+ stbio r4,0(r0)
+ stbio r4,4(r0)
+ stbio r4,0x7ffc(r0)
+ stbio r4,-0x8000(r0)
+ stbio r4,0(r5)
+ stbio r4,4(r5)
+ stbio r4,0x7ffc(r5)
+ stbio r4,-0x8000(r5)
+ stbio r4,data_label(r0)
+ stbio r4,big_external_data_label(r0)
+ stbio r4,small_external_data_label(r0)
+ stbio r4,big_external_common(r0)
+ stbio r4,small_external_common(r0)
+ stbio r4,big_local_common(r0)
+ stbio r4,small_local_common(r0)
+ stbio r4,data_label+4(r0)
+ stbio r4,big_external_data_label+4(r0)
+ stbio r4,small_external_data_label+4(r0)
+ stbio r4,big_external_common+4(r0)
+ stbio r4,small_external_common+4(r0)
+ stbio r4,big_local_common+4(r0)
+ stbio r4,small_local_common+4(r0)
+ stbio r4,data_label-0x8000(r0)
+ stbio r4,big_external_data_label-0x8000(r0)
+ stbio r4,small_external_data_label-0x8000(r0)
+ stbio r4,big_external_common-0x8000(r0)
+ stbio r4,small_external_common-0x8000(r0)
+ stbio r4,big_local_common-0x8000(r0)
+ stbio r4,small_local_common-0x8000(r0)
+ stbio r4,data_label+0x10000(r0)
+ stbio r4,data_label(r5)
+ stbio r4,big_external_data_label(r5)
+ stbio r4,small_external_data_label(r5)
+ stbio r4,big_external_common(r5)
+ stbio r4,small_external_common(r5)
+ stbio r4,big_local_common(r5)
+ stbio r4,small_local_common(r5)
+ stbio r4,data_label+4(r5)
+ stbio r4,big_external_data_label+4(r5)
+ stbio r4,small_external_data_label+4(r5)
+ stbio r4,big_external_common+4(r5)
+ stbio r4,small_external_common+4(r5)
+ stbio r4,big_local_common+4(r5)
+ stbio r4,small_local_common+4(r5)
+ stbio r4,data_label-0x8000(r5)
+ stbio r4,big_external_data_label-0x8000(r5)
+ stbio r4,small_external_data_label-0x8000(r5)
+ stbio r4,big_external_common-0x8000(r5)
+ stbio r4,small_external_common-0x8000(r5)
+ stbio r4,big_local_common-0x8000(r5)
+ stbio r4,small_local_common-0x8000(r5)
Index: gas/testsuite/gas/nios2/sth.d
===================================================================
RCS file: gas/testsuite/gas/nios2/sth.d
diff -N gas/testsuite/gas/nios2/sth.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/sth.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,196 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 sth
+
+# Test the ld instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> sth r4,0\(zero\)
+0+0004 <[^>]*> sth r4,4\(zero\)
+0+0008 <[^>]*> sth r4,32764\(zero\)
+0+000c <[^>]*> sth r4,-32768\(zero\)
+0+0010 <[^>]*> sth r4,0\(r5\)
+0+0014 <[^>]*> sth r4,4\(r5\)
+0+0018 <[^>]*> sth r4,32764\(r5\)
+0+001c <[^>]*> sth r4,-32768\(r5\)
+0+0020 <[^>]*> sth r4,0\(zero\)
+[ ]*20: R_NIOS2_S16 .data
+0+0024 <[^>]*> sth r4,0\(zero\)
+[ ]*24: R_NIOS2_S16 big_external_data_label
+0+0028 <[^>]*> sth r4,0\(zero\)
+[ ]*28: R_NIOS2_S16 small_external_data_label
+0+002c <[^>]*> sth r4,0\(zero\)
+[ ]*2c: R_NIOS2_S16 big_external_common
+0+0030 <[^>]*> sth r4,0\(zero\)
+[ ]*30: R_NIOS2_S16 small_external_common
+0+0034 <[^>]*> sth r4,0\(zero\)
+[ ]*34: R_NIOS2_S16 .bss
+0+0038 <[^>]*> sth r4,0\(zero\)
+[ ]*38: R_NIOS2_S16 .bss\+0x4000
+0+003c <[^>]*> sth r4,0\(zero\)
+[ ]*3c: R_NIOS2_S16 .data\+0x4
+0+0040 <[^>]*> sth r4,0\(zero\)
+[ ]*40: R_NIOS2_S16 big_external_data_label\+0x4
+0+0044 <[^>]*> sth r4,0\(zero\)
+[ ]*44: R_NIOS2_S16 small_external_data_label\+0x4
+0+0048 <[^>]*> sth r4,0\(zero\)
+[ ]*48: R_NIOS2_S16 big_external_common\+0x4
+0+004c <[^>]*> sth r4,0\(zero\)
+[ ]*4c: R_NIOS2_S16 small_external_common\+0x4
+0+0050 <[^>]*> sth r4,0\(zero\)
+[ ]*50: R_NIOS2_S16 .bss\+0x4
+0+0054 <[^>]*> sth r4,0\(zero\)
+[ ]*54: R_NIOS2_S16 .bss\+0x4004
+0+0058 <[^>]*> sth r4,0\(zero\)
+[ ]*58: R_NIOS2_S16 .data-0x8000
+0+005c <[^>]*> sth r4,0\(zero\)
+[ ]*5c: R_NIOS2_S16 big_external_data_label-0x8000
+0+0060 <[^>]*> sth r4,0\(zero\)
+[ ]*60: R_NIOS2_S16 small_external_data_label-0x8000
+0+0064 <[^>]*> sth r4,0\(zero\)
+[ ]*64: R_NIOS2_S16 big_external_common-0x8000
+0+0068 <[^>]*> sth r4,0\(zero\)
+[ ]*68: R_NIOS2_S16 small_external_common-0x8000
+0+006c <[^>]*> sth r4,0\(zero\)
+[ ]*6c: R_NIOS2_S16 .bss-0x8000
+0+0070 <[^>]*> sth r4,0\(zero\)
+[ ]*70: R_NIOS2_S16 .bss-0x4000
+0+0074 <[^>]*> sth r4,0\(zero\)
+[ ]*74: R_NIOS2_S16 .data\+0x10000
+0+0078 <[^>]*> sth r4,0\(r5\)
+[ ]*78: R_NIOS2_S16 .data
+0+007c <[^>]*> sth r4,0\(r5\)
+[ ]*7c: R_NIOS2_S16 big_external_data_label
+0+0080 <[^>]*> sth r4,0\(r5\)
+[ ]*80: R_NIOS2_S16 small_external_data_label
+0+0084 <[^>]*> sth r4,0\(r5\)
+[ ]*84: R_NIOS2_S16 big_external_common
+0+0088 <[^>]*> sth r4,0\(r5\)
+[ ]*88: R_NIOS2_S16 small_external_common
+0+008c <[^>]*> sth r4,0\(r5\)
+[ ]*8c: R_NIOS2_S16 .bss
+0+0090 <[^>]*> sth r4,0\(r5\)
+[ ]*90: R_NIOS2_S16 .bss\+0x4000
+0+0094 <[^>]*> sth r4,0\(r5\)
+[ ]*94: R_NIOS2_S16 .data\+0x4
+0+0098 <[^>]*> sth r4,0\(r5\)
+[ ]*98: R_NIOS2_S16 big_external_data_label\+0x4
+0+009c <[^>]*> sth r4,0\(r5\)
+[ ]*9c: R_NIOS2_S16 small_external_data_label\+0x4
+0+00a0 <[^>]*> sth r4,0\(r5\)
+[ ]*a0: R_NIOS2_S16 big_external_common\+0x4
+0+00a4 <[^>]*> sth r4,0\(r5\)
+[ ]*a4: R_NIOS2_S16 small_external_common\+0x4
+0+00a8 <[^>]*> sth r4,0\(r5\)
+[ ]*a8: R_NIOS2_S16 .bss\+0x4
+0+00ac <[^>]*> sth r4,0\(r5\)
+[ ]*ac: R_NIOS2_S16 .bss\+0x4004
+0+00b0 <[^>]*> sth r4,0\(r5\)
+[ ]*b0: R_NIOS2_S16 .data-0x8000
+0+00b4 <[^>]*> sth r4,0\(r5\)
+[ ]*b4: R_NIOS2_S16 big_external_data_label-0x8000
+0+00b8 <[^>]*> sth r4,0\(r5\)
+[ ]*b8: R_NIOS2_S16 small_external_data_label-0x8000
+0+00bc <[^>]*> sth r4,0\(r5\)
+[ ]*bc: R_NIOS2_S16 big_external_common-0x8000
+0+00c0 <[^>]*> sth r4,0\(r5\)
+[ ]*c0: R_NIOS2_S16 small_external_common-0x8000
+0+00c4 <[^>]*> sth r4,0\(r5\)
+[ ]*c4: R_NIOS2_S16 .bss-0x8000
+0+00c8 <[^>]*> sth r4,0\(r5\)
+[ ]*c8: R_NIOS2_S16 .bss-0x4000
+0+00cc <[^>]*> sthio r4,0\(zero\)
+0+00d0 <[^>]*> sthio r4,4\(zero\)
+0+00d4 <[^>]*> sthio r4,32764\(zero\)
+0+00d8 <[^>]*> sthio r4,-32768\(zero\)
+0+00dc <[^>]*> sthio r4,0\(r5\)
+0+00e0 <[^>]*> sthio r4,4\(r5\)
+0+00e4 <[^>]*> sthio r4,32764\(r5\)
+0+00e8 <[^>]*> sthio r4,-32768\(r5\)
+0+00ec <[^>]*> sthio r4,0\(zero\)
+[ ]*ec: R_NIOS2_S16 .data
+0+00f0 <[^>]*> sthio r4,0\(zero\)
+[ ]*f0: R_NIOS2_S16 big_external_data_label
+0+00f4 <[^>]*> sthio r4,0\(zero\)
+[ ]*f4: R_NIOS2_S16 small_external_data_label
+0+00f8 <[^>]*> sthio r4,0\(zero\)
+[ ]*f8: R_NIOS2_S16 big_external_common
+0+00fc <[^>]*> sthio r4,0\(zero\)
+[ ]*fc: R_NIOS2_S16 small_external_common
+0+0100 <[^>]*> sthio r4,0\(zero\)
+[ ]*100: R_NIOS2_S16 .bss
+0+0104 <[^>]*> sthio r4,0\(zero\)
+[ ]*104: R_NIOS2_S16 .bss\+0x4000
+0+0108 <[^>]*> sthio r4,0\(zero\)
+[ ]*108: R_NIOS2_S16 .data\+0x4
+0+010c <[^>]*> sthio r4,0\(zero\)
+[ ]*10c: R_NIOS2_S16 big_external_data_label\+0x4
+0+0110 <[^>]*> sthio r4,0\(zero\)
+[ ]*110: R_NIOS2_S16 small_external_data_label\+0x4
+0+0114 <[^>]*> sthio r4,0\(zero\)
+[ ]*114: R_NIOS2_S16 big_external_common\+0x4
+0+0118 <[^>]*> sthio r4,0\(zero\)
+[ ]*118: R_NIOS2_S16 small_external_common\+0x4
+0+011c <[^>]*> sthio r4,0\(zero\)
+[ ]*11c: R_NIOS2_S16 .bss\+0x4
+0+0120 <[^>]*> sthio r4,0\(zero\)
+[ ]*120: R_NIOS2_S16 .bss\+0x4004
+0+0124 <[^>]*> sthio r4,0\(zero\)
+[ ]*124: R_NIOS2_S16 .data-0x8000
+0+0128 <[^>]*> sthio r4,0\(zero\)
+[ ]*128: R_NIOS2_S16 big_external_data_label-0x8000
+0+012c <[^>]*> sthio r4,0\(zero\)
+[ ]*12c: R_NIOS2_S16 small_external_data_label-0x8000
+0+0130 <[^>]*> sthio r4,0\(zero\)
+[ ]*130: R_NIOS2_S16 big_external_common-0x8000
+0+0134 <[^>]*> sthio r4,0\(zero\)
+[ ]*134: R_NIOS2_S16 small_external_common-0x8000
+0+0138 <[^>]*> sthio r4,0\(zero\)
+[ ]*138: R_NIOS2_S16 .bss-0x8000
+0+013c <[^>]*> sthio r4,0\(zero\)
+[ ]*13c: R_NIOS2_S16 .bss-0x4000
+0+0140 <[^>]*> sthio r4,0\(zero\)
+[ ]*140: R_NIOS2_S16 .data\+0x10000
+0+0144 <[^>]*> sthio r4,0\(r5\)
+[ ]*144: R_NIOS2_S16 .data
+0+0148 <[^>]*> sthio r4,0\(r5\)
+[ ]*148: R_NIOS2_S16 big_external_data_label
+0+014c <[^>]*> sthio r4,0\(r5\)
+[ ]*14c: R_NIOS2_S16 small_external_data_label
+0+0150 <[^>]*> sthio r4,0\(r5\)
+[ ]*150: R_NIOS2_S16 big_external_common
+0+0154 <[^>]*> sthio r4,0\(r5\)
+[ ]*154: R_NIOS2_S16 small_external_common
+0+0158 <[^>]*> sthio r4,0\(r5\)
+[ ]*158: R_NIOS2_S16 .bss
+0+015c <[^>]*> sthio r4,0\(r5\)
+[ ]*15c: R_NIOS2_S16 .bss\+0x4000
+0+0160 <[^>]*> sthio r4,0\(r5\)
+[ ]*160: R_NIOS2_S16 .data\+0x4
+0+0164 <[^>]*> sthio r4,0\(r5\)
+[ ]*164: R_NIOS2_S16 big_external_data_label\+0x4
+0+0168 <[^>]*> sthio r4,0\(r5\)
+[ ]*168: R_NIOS2_S16 small_external_data_label\+0x4
+0+016c <[^>]*> sthio r4,0\(r5\)
+[ ]*16c: R_NIOS2_S16 big_external_common\+0x4
+0+0170 <[^>]*> sthio r4,0\(r5\)
+[ ]*170: R_NIOS2_S16 small_external_common\+0x4
+0+0174 <[^>]*> sthio r4,0\(r5\)
+[ ]*174: R_NIOS2_S16 .bss\+0x4
+0+0178 <[^>]*> sthio r4,0\(r5\)
+[ ]*178: R_NIOS2_S16 .bss\+0x4004
+0+017c <[^>]*> sthio r4,0\(r5\)
+[ ]*17c: R_NIOS2_S16 .data-0x8000
+0+0180 <[^>]*> sthio r4,0\(r5\)
+[ ]*180: R_NIOS2_S16 big_external_data_label-0x8000
+0+0184 <[^>]*> sthio r4,0\(r5\)
+[ ]*184: R_NIOS2_S16 small_external_data_label-0x8000
+0+0188 <[^>]*> sthio r4,0\(r5\)
+[ ]*188: R_NIOS2_S16 big_external_common-0x8000
+0+018c <[^>]*> sthio r4,0\(r5\)
+[ ]*18c: R_NIOS2_S16 small_external_common-0x8000
+0+0190 <[^>]*> sthio r4,0\(r5\)
+[ ]*190: R_NIOS2_S16 .bss-0x8000
+0+0194 <[^>]*> sthio r4,0\(r5\)
+[ ]*194: R_NIOS2_S16 .bss-0x4000
Index: gas/testsuite/gas/nios2/sth.s
===================================================================
RCS file: gas/testsuite/gas/nios2/sth.s
diff -N gas/testsuite/gas/nios2/sth.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/sth.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,117 @@
+ .data
+data_label:
+ .extern big_external_data_label,0x4000
+ .extern small_external_data_label,4
+ .comm big_external_common,0x4000
+ .comm small_external_common,4
+ .lcomm big_local_common,0x4000
+ .lcomm small_local_common,4
+
+# the small symbols should have space allocated in the sbss section
+# but this is not yet supported in the assembler, so space is allocated
+# in the .bss section and the relocations are not gp-relative. this will
+# be updated when gp-relative relocations are added
+ .text
+ sth r4,0(r0)
+ sth r4,4(r0)
+ sth r4,0x7ffc(r0)
+ sth r4,-0x8000(r0)
+ sth r4,0(r5)
+ sth r4,4(r5)
+ sth r4,0x7ffc(r5)
+ sth r4,-0x8000(r5)
+ sth r4,data_label(r0)
+ sth r4,big_external_data_label(r0)
+ sth r4,small_external_data_label(r0)
+ sth r4,big_external_common(r0)
+ sth r4,small_external_common(r0)
+ sth r4,big_local_common(r0)
+ sth r4,small_local_common(r0)
+ sth r4,data_label+4(r0)
+ sth r4,big_external_data_label+4(r0)
+ sth r4,small_external_data_label+4(r0)
+ sth r4,big_external_common+4(r0)
+ sth r4,small_external_common+4(r0)
+ sth r4,big_local_common+4(r0)
+ sth r4,small_local_common+4(r0)
+ sth r4,data_label-0x8000(r0)
+ sth r4,big_external_data_label-0x8000(r0)
+ sth r4,small_external_data_label-0x8000(r0)
+ sth r4,big_external_common-0x8000(r0)
+ sth r4,small_external_common-0x8000(r0)
+ sth r4,big_local_common-0x8000(r0)
+ sth r4,small_local_common-0x8000(r0)
+ sth r4,data_label+0x10000(r0)
+ sth r4,data_label(r5)
+ sth r4,big_external_data_label(r5)
+ sth r4,small_external_data_label(r5)
+ sth r4,big_external_common(r5)
+ sth r4,small_external_common(r5)
+ sth r4,big_local_common(r5)
+ sth r4,small_local_common(r5)
+ sth r4,data_label+4(r5)
+ sth r4,big_external_data_label+4(r5)
+ sth r4,small_external_data_label+4(r5)
+ sth r4,big_external_common+4(r5)
+ sth r4,small_external_common+4(r5)
+ sth r4,big_local_common+4(r5)
+ sth r4,small_local_common+4(r5)
+ sth r4,data_label-0x8000(r5)
+ sth r4,big_external_data_label-0x8000(r5)
+ sth r4,small_external_data_label-0x8000(r5)
+ sth r4,big_external_common-0x8000(r5)
+ sth r4,small_external_common-0x8000(r5)
+ sth r4,big_local_common-0x8000(r5)
+ sth r4,small_local_common-0x8000(r5)
+
+ sthio r4,0(r0)
+ sthio r4,4(r0)
+ sthio r4,0x7ffc(r0)
+ sthio r4,-0x8000(r0)
+ sthio r4,0(r5)
+ sthio r4,4(r5)
+ sthio r4,0x7ffc(r5)
+ sthio r4,-0x8000(r5)
+ sthio r4,data_label(r0)
+ sthio r4,big_external_data_label(r0)
+ sthio r4,small_external_data_label(r0)
+ sthio r4,big_external_common(r0)
+ sthio r4,small_external_common(r0)
+ sthio r4,big_local_common(r0)
+ sthio r4,small_local_common(r0)
+ sthio r4,data_label+4(r0)
+ sthio r4,big_external_data_label+4(r0)
+ sthio r4,small_external_data_label+4(r0)
+ sthio r4,big_external_common+4(r0)
+ sthio r4,small_external_common+4(r0)
+ sthio r4,big_local_common+4(r0)
+ sthio r4,small_local_common+4(r0)
+ sthio r4,data_label-0x8000(r0)
+ sthio r4,big_external_data_label-0x8000(r0)
+ sthio r4,small_external_data_label-0x8000(r0)
+ sthio r4,big_external_common-0x8000(r0)
+ sthio r4,small_external_common-0x8000(r0)
+ sthio r4,big_local_common-0x8000(r0)
+ sthio r4,small_local_common-0x8000(r0)
+ sthio r4,data_label+0x10000(r0)
+ sthio r4,data_label(r5)
+ sthio r4,big_external_data_label(r5)
+ sthio r4,small_external_data_label(r5)
+ sthio r4,big_external_common(r5)
+ sthio r4,small_external_common(r5)
+ sthio r4,big_local_common(r5)
+ sthio r4,small_local_common(r5)
+ sthio r4,data_label+4(r5)
+ sthio r4,big_external_data_label+4(r5)
+ sthio r4,small_external_data_label+4(r5)
+ sthio r4,big_external_common+4(r5)
+ sthio r4,small_external_common+4(r5)
+ sthio r4,big_local_common+4(r5)
+ sthio r4,small_local_common+4(r5)
+ sthio r4,data_label-0x8000(r5)
+ sthio r4,big_external_data_label-0x8000(r5)
+ sthio r4,small_external_data_label-0x8000(r5)
+ sthio r4,big_external_common-0x8000(r5)
+ sthio r4,small_external_common-0x8000(r5)
+ sthio r4,big_local_common-0x8000(r5)
+ sthio r4,small_local_common-0x8000(r5)
Index: gas/testsuite/gas/nios2/stw.d
===================================================================
RCS file: gas/testsuite/gas/nios2/stw.d
diff -N gas/testsuite/gas/nios2/stw.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/stw.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,196 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 stw
+
+# Test the ld instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> stw r4,0\(zero\)
+0+0004 <[^>]*> stw r4,4\(zero\)
+0+0008 <[^>]*> stw r4,32764\(zero\)
+0+000c <[^>]*> stw r4,-32768\(zero\)
+0+0010 <[^>]*> stw r4,0\(r5\)
+0+0014 <[^>]*> stw r4,4\(r5\)
+0+0018 <[^>]*> stw r4,32764\(r5\)
+0+001c <[^>]*> stw r4,-32768\(r5\)
+0+0020 <[^>]*> stw r4,0\(zero\)
+[ ]*20: R_NIOS2_S16 .data
+0+0024 <[^>]*> stw r4,0\(zero\)
+[ ]*24: R_NIOS2_S16 big_external_data_label
+0+0028 <[^>]*> stw r4,0\(zero\)
+[ ]*28: R_NIOS2_S16 small_external_data_label
+0+002c <[^>]*> stw r4,0\(zero\)
+[ ]*2c: R_NIOS2_S16 big_external_common
+0+0030 <[^>]*> stw r4,0\(zero\)
+[ ]*30: R_NIOS2_S16 small_external_common
+0+0034 <[^>]*> stw r4,0\(zero\)
+[ ]*34: R_NIOS2_S16 .bss
+0+0038 <[^>]*> stw r4,0\(zero\)
+[ ]*38: R_NIOS2_S16 .bss\+0x4000
+0+003c <[^>]*> stw r4,0\(zero\)
+[ ]*3c: R_NIOS2_S16 .data\+0x4
+0+0040 <[^>]*> stw r4,0\(zero\)
+[ ]*40: R_NIOS2_S16 big_external_data_label\+0x4
+0+0044 <[^>]*> stw r4,0\(zero\)
+[ ]*44: R_NIOS2_S16 small_external_data_label\+0x4
+0+0048 <[^>]*> stw r4,0\(zero\)
+[ ]*48: R_NIOS2_S16 big_external_common\+0x4
+0+004c <[^>]*> stw r4,0\(zero\)
+[ ]*4c: R_NIOS2_S16 small_external_common\+0x4
+0+0050 <[^>]*> stw r4,0\(zero\)
+[ ]*50: R_NIOS2_S16 .bss\+0x4
+0+0054 <[^>]*> stw r4,0\(zero\)
+[ ]*54: R_NIOS2_S16 .bss\+0x4004
+0+0058 <[^>]*> stw r4,0\(zero\)
+[ ]*58: R_NIOS2_S16 .data-0x8000
+0+005c <[^>]*> stw r4,0\(zero\)
+[ ]*5c: R_NIOS2_S16 big_external_data_label-0x8000
+0+0060 <[^>]*> stw r4,0\(zero\)
+[ ]*60: R_NIOS2_S16 small_external_data_label-0x8000
+0+0064 <[^>]*> stw r4,0\(zero\)
+[ ]*64: R_NIOS2_S16 big_external_common-0x8000
+0+0068 <[^>]*> stw r4,0\(zero\)
+[ ]*68: R_NIOS2_S16 small_external_common-0x8000
+0+006c <[^>]*> stw r4,0\(zero\)
+[ ]*6c: R_NIOS2_S16 .bss-0x8000
+0+0070 <[^>]*> stw r4,0\(zero\)
+[ ]*70: R_NIOS2_S16 .bss-0x4000
+0+0074 <[^>]*> stw r4,0\(zero\)
+[ ]*74: R_NIOS2_S16 .data\+0x10000
+0+0078 <[^>]*> stw r4,0\(r5\)
+[ ]*78: R_NIOS2_S16 .data
+0+007c <[^>]*> stw r4,0\(r5\)
+[ ]*7c: R_NIOS2_S16 big_external_data_label
+0+0080 <[^>]*> stw r4,0\(r5\)
+[ ]*80: R_NIOS2_S16 small_external_data_label
+0+0084 <[^>]*> stw r4,0\(r5\)
+[ ]*84: R_NIOS2_S16 big_external_common
+0+0088 <[^>]*> stw r4,0\(r5\)
+[ ]*88: R_NIOS2_S16 small_external_common
+0+008c <[^>]*> stw r4,0\(r5\)
+[ ]*8c: R_NIOS2_S16 .bss
+0+0090 <[^>]*> stw r4,0\(r5\)
+[ ]*90: R_NIOS2_S16 .bss\+0x4000
+0+0094 <[^>]*> stw r4,0\(r5\)
+[ ]*94: R_NIOS2_S16 .data\+0x4
+0+0098 <[^>]*> stw r4,0\(r5\)
+[ ]*98: R_NIOS2_S16 big_external_data_label\+0x4
+0+009c <[^>]*> stw r4,0\(r5\)
+[ ]*9c: R_NIOS2_S16 small_external_data_label\+0x4
+0+00a0 <[^>]*> stw r4,0\(r5\)
+[ ]*a0: R_NIOS2_S16 big_external_common\+0x4
+0+00a4 <[^>]*> stw r4,0\(r5\)
+[ ]*a4: R_NIOS2_S16 small_external_common\+0x4
+0+00a8 <[^>]*> stw r4,0\(r5\)
+[ ]*a8: R_NIOS2_S16 .bss\+0x4
+0+00ac <[^>]*> stw r4,0\(r5\)
+[ ]*ac: R_NIOS2_S16 .bss\+0x4004
+0+00b0 <[^>]*> stw r4,0\(r5\)
+[ ]*b0: R_NIOS2_S16 .data-0x8000
+0+00b4 <[^>]*> stw r4,0\(r5\)
+[ ]*b4: R_NIOS2_S16 big_external_data_label-0x8000
+0+00b8 <[^>]*> stw r4,0\(r5\)
+[ ]*b8: R_NIOS2_S16 small_external_data_label-0x8000
+0+00bc <[^>]*> stw r4,0\(r5\)
+[ ]*bc: R_NIOS2_S16 big_external_common-0x8000
+0+00c0 <[^>]*> stw r4,0\(r5\)
+[ ]*c0: R_NIOS2_S16 small_external_common-0x8000
+0+00c4 <[^>]*> stw r4,0\(r5\)
+[ ]*c4: R_NIOS2_S16 .bss-0x8000
+0+00c8 <[^>]*> stw r4,0\(r5\)
+[ ]*c8: R_NIOS2_S16 .bss-0x4000
+0+00cc <[^>]*> stwio r4,0\(zero\)
+0+00d0 <[^>]*> stwio r4,4\(zero\)
+0+00d4 <[^>]*> stwio r4,32764\(zero\)
+0+00d8 <[^>]*> stwio r4,-32768\(zero\)
+0+00dc <[^>]*> stwio r4,0\(r5\)
+0+00e0 <[^>]*> stwio r4,4\(r5\)
+0+00e4 <[^>]*> stwio r4,32764\(r5\)
+0+00e8 <[^>]*> stwio r4,-32768\(r5\)
+0+00ec <[^>]*> stwio r4,0\(zero\)
+[ ]*ec: R_NIOS2_S16 .data
+0+00f0 <[^>]*> stwio r4,0\(zero\)
+[ ]*f0: R_NIOS2_S16 big_external_data_label
+0+00f4 <[^>]*> stwio r4,0\(zero\)
+[ ]*f4: R_NIOS2_S16 small_external_data_label
+0+00f8 <[^>]*> stwio r4,0\(zero\)
+[ ]*f8: R_NIOS2_S16 big_external_common
+0+00fc <[^>]*> stwio r4,0\(zero\)
+[ ]*fc: R_NIOS2_S16 small_external_common
+0+0100 <[^>]*> stwio r4,0\(zero\)
+[ ]*100: R_NIOS2_S16 .bss
+0+0104 <[^>]*> stwio r4,0\(zero\)
+[ ]*104: R_NIOS2_S16 .bss\+0x4000
+0+0108 <[^>]*> stwio r4,0\(zero\)
+[ ]*108: R_NIOS2_S16 .data\+0x4
+0+010c <[^>]*> stwio r4,0\(zero\)
+[ ]*10c: R_NIOS2_S16 big_external_data_label\+0x4
+0+0110 <[^>]*> stwio r4,0\(zero\)
+[ ]*110: R_NIOS2_S16 small_external_data_label\+0x4
+0+0114 <[^>]*> stwio r4,0\(zero\)
+[ ]*114: R_NIOS2_S16 big_external_common\+0x4
+0+0118 <[^>]*> stwio r4,0\(zero\)
+[ ]*118: R_NIOS2_S16 small_external_common\+0x4
+0+011c <[^>]*> stwio r4,0\(zero\)
+[ ]*11c: R_NIOS2_S16 .bss\+0x4
+0+0120 <[^>]*> stwio r4,0\(zero\)
+[ ]*120: R_NIOS2_S16 .bss\+0x4004
+0+0124 <[^>]*> stwio r4,0\(zero\)
+[ ]*124: R_NIOS2_S16 .data-0x8000
+0+0128 <[^>]*> stwio r4,0\(zero\)
+[ ]*128: R_NIOS2_S16 big_external_data_label-0x8000
+0+012c <[^>]*> stwio r4,0\(zero\)
+[ ]*12c: R_NIOS2_S16 small_external_data_label-0x8000
+0+0130 <[^>]*> stwio r4,0\(zero\)
+[ ]*130: R_NIOS2_S16 big_external_common-0x8000
+0+0134 <[^>]*> stwio r4,0\(zero\)
+[ ]*134: R_NIOS2_S16 small_external_common-0x8000
+0+0138 <[^>]*> stwio r4,0\(zero\)
+[ ]*138: R_NIOS2_S16 .bss-0x8000
+0+013c <[^>]*> stwio r4,0\(zero\)
+[ ]*13c: R_NIOS2_S16 .bss-0x4000
+0+0140 <[^>]*> stwio r4,0\(zero\)
+[ ]*140: R_NIOS2_S16 .data\+0x10000
+0+0144 <[^>]*> stwio r4,0\(r5\)
+[ ]*144: R_NIOS2_S16 .data
+0+0148 <[^>]*> stwio r4,0\(r5\)
+[ ]*148: R_NIOS2_S16 big_external_data_label
+0+014c <[^>]*> stwio r4,0\(r5\)
+[ ]*14c: R_NIOS2_S16 small_external_data_label
+0+0150 <[^>]*> stwio r4,0\(r5\)
+[ ]*150: R_NIOS2_S16 big_external_common
+0+0154 <[^>]*> stwio r4,0\(r5\)
+[ ]*154: R_NIOS2_S16 small_external_common
+0+0158 <[^>]*> stwio r4,0\(r5\)
+[ ]*158: R_NIOS2_S16 .bss
+0+015c <[^>]*> stwio r4,0\(r5\)
+[ ]*15c: R_NIOS2_S16 .bss\+0x4000
+0+0160 <[^>]*> stwio r4,0\(r5\)
+[ ]*160: R_NIOS2_S16 .data\+0x4
+0+0164 <[^>]*> stwio r4,0\(r5\)
+[ ]*164: R_NIOS2_S16 big_external_data_label\+0x4
+0+0168 <[^>]*> stwio r4,0\(r5\)
+[ ]*168: R_NIOS2_S16 small_external_data_label\+0x4
+0+016c <[^>]*> stwio r4,0\(r5\)
+[ ]*16c: R_NIOS2_S16 big_external_common\+0x4
+0+0170 <[^>]*> stwio r4,0\(r5\)
+[ ]*170: R_NIOS2_S16 small_external_common\+0x4
+0+0174 <[^>]*> stwio r4,0\(r5\)
+[ ]*174: R_NIOS2_S16 .bss\+0x4
+0+0178 <[^>]*> stwio r4,0\(r5\)
+[ ]*178: R_NIOS2_S16 .bss\+0x4004
+0+017c <[^>]*> stwio r4,0\(r5\)
+[ ]*17c: R_NIOS2_S16 .data-0x8000
+0+0180 <[^>]*> stwio r4,0\(r5\)
+[ ]*180: R_NIOS2_S16 big_external_data_label-0x8000
+0+0184 <[^>]*> stwio r4,0\(r5\)
+[ ]*184: R_NIOS2_S16 small_external_data_label-0x8000
+0+0188 <[^>]*> stwio r4,0\(r5\)
+[ ]*188: R_NIOS2_S16 big_external_common-0x8000
+0+018c <[^>]*> stwio r4,0\(r5\)
+[ ]*18c: R_NIOS2_S16 small_external_common-0x8000
+0+0190 <[^>]*> stwio r4,0\(r5\)
+[ ]*190: R_NIOS2_S16 .bss-0x8000
+0+0194 <[^>]*> stwio r4,0\(r5\)
+[ ]*194: R_NIOS2_S16 .bss-0x4000
Index: gas/testsuite/gas/nios2/stw.s
===================================================================
RCS file: gas/testsuite/gas/nios2/stw.s
diff -N gas/testsuite/gas/nios2/stw.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/stw.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,117 @@
+ .data
+data_label:
+ .extern big_external_data_label,0x4000
+ .extern small_external_data_label,4
+ .comm big_external_common,0x4000
+ .comm small_external_common,4
+ .lcomm big_local_common,0x4000
+ .lcomm small_local_common,4
+
+# the small symbols should have space allocated in the sbss section
+# but this is not yet supported in the assembler, so space is allocated
+# in the .bss section and the relocations are not gp-relative. this will
+# be updated when gp-relative relocations are added
+ .text
+ stw r4,0(r0)
+ stw r4,4(r0)
+ stw r4,0x7ffc(r0)
+ stw r4,-0x8000(r0)
+ stw r4,0(r5)
+ stw r4,4(r5)
+ stw r4,0x7ffc(r5)
+ stw r4,-0x8000(r5)
+ stw r4,data_label(r0)
+ stw r4,big_external_data_label(r0)
+ stw r4,small_external_data_label(r0)
+ stw r4,big_external_common(r0)
+ stw r4,small_external_common(r0)
+ stw r4,big_local_common(r0)
+ stw r4,small_local_common(r0)
+ stw r4,data_label+4(r0)
+ stw r4,big_external_data_label+4(r0)
+ stw r4,small_external_data_label+4(r0)
+ stw r4,big_external_common+4(r0)
+ stw r4,small_external_common+4(r0)
+ stw r4,big_local_common+4(r0)
+ stw r4,small_local_common+4(r0)
+ stw r4,data_label-0x8000(r0)
+ stw r4,big_external_data_label-0x8000(r0)
+ stw r4,small_external_data_label-0x8000(r0)
+ stw r4,big_external_common-0x8000(r0)
+ stw r4,small_external_common-0x8000(r0)
+ stw r4,big_local_common-0x8000(r0)
+ stw r4,small_local_common-0x8000(r0)
+ stw r4,data_label+0x10000(r0)
+ stw r4,data_label(r5)
+ stw r4,big_external_data_label(r5)
+ stw r4,small_external_data_label(r5)
+ stw r4,big_external_common(r5)
+ stw r4,small_external_common(r5)
+ stw r4,big_local_common(r5)
+ stw r4,small_local_common(r5)
+ stw r4,data_label+4(r5)
+ stw r4,big_external_data_label+4(r5)
+ stw r4,small_external_data_label+4(r5)
+ stw r4,big_external_common+4(r5)
+ stw r4,small_external_common+4(r5)
+ stw r4,big_local_common+4(r5)
+ stw r4,small_local_common+4(r5)
+ stw r4,data_label-0x8000(r5)
+ stw r4,big_external_data_label-0x8000(r5)
+ stw r4,small_external_data_label-0x8000(r5)
+ stw r4,big_external_common-0x8000(r5)
+ stw r4,small_external_common-0x8000(r5)
+ stw r4,big_local_common-0x8000(r5)
+ stw r4,small_local_common-0x8000(r5)
+
+ stwio r4,0(r0)
+ stwio r4,4(r0)
+ stwio r4,0x7ffc(r0)
+ stwio r4,-0x8000(r0)
+ stwio r4,0(r5)
+ stwio r4,4(r5)
+ stwio r4,0x7ffc(r5)
+ stwio r4,-0x8000(r5)
+ stwio r4,data_label(r0)
+ stwio r4,big_external_data_label(r0)
+ stwio r4,small_external_data_label(r0)
+ stwio r4,big_external_common(r0)
+ stwio r4,small_external_common(r0)
+ stwio r4,big_local_common(r0)
+ stwio r4,small_local_common(r0)
+ stwio r4,data_label+4(r0)
+ stwio r4,big_external_data_label+4(r0)
+ stwio r4,small_external_data_label+4(r0)
+ stwio r4,big_external_common+4(r0)
+ stwio r4,small_external_common+4(r0)
+ stwio r4,big_local_common+4(r0)
+ stwio r4,small_local_common+4(r0)
+ stwio r4,data_label-0x8000(r0)
+ stwio r4,big_external_data_label-0x8000(r0)
+ stwio r4,small_external_data_label-0x8000(r0)
+ stwio r4,big_external_common-0x8000(r0)
+ stwio r4,small_external_common-0x8000(r0)
+ stwio r4,big_local_common-0x8000(r0)
+ stwio r4,small_local_common-0x8000(r0)
+ stwio r4,data_label+0x10000(r0)
+ stwio r4,data_label(r5)
+ stwio r4,big_external_data_label(r5)
+ stwio r4,small_external_data_label(r5)
+ stwio r4,big_external_common(r5)
+ stwio r4,small_external_common(r5)
+ stwio r4,big_local_common(r5)
+ stwio r4,small_local_common(r5)
+ stwio r4,data_label+4(r5)
+ stwio r4,big_external_data_label+4(r5)
+ stwio r4,small_external_data_label+4(r5)
+ stwio r4,big_external_common+4(r5)
+ stwio r4,small_external_common+4(r5)
+ stwio r4,big_local_common+4(r5)
+ stwio r4,small_local_common+4(r5)
+ stwio r4,data_label-0x8000(r5)
+ stwio r4,big_external_data_label-0x8000(r5)
+ stwio r4,small_external_data_label-0x8000(r5)
+ stwio r4,big_external_common-0x8000(r5)
+ stwio r4,small_external_common-0x8000(r5)
+ stwio r4,big_local_common-0x8000(r5)
+ stwio r4,small_local_common-0x8000(r5)
Index: gas/testsuite/gas/nios2/sub.d
===================================================================
RCS file: gas/testsuite/gas/nios2/sub.d
diff -N gas/testsuite/gas/nios2/sub.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/sub.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,10 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 sub
+
+# Test the add instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> sub r4,r4,r4
+
Index: gas/testsuite/gas/nios2/sub.s
===================================================================
RCS file: gas/testsuite/gas/nios2/sub.s
diff -N gas/testsuite/gas/nios2/sub.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/sub.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,4 @@
+# Source file used to test the add and addi instructions.
+
+foo:
+ sub r4,r4,r4
Index: gas/testsuite/gas/nios2/sync.d
===================================================================
RCS file: gas/testsuite/gas/nios2/sync.d
diff -N gas/testsuite/gas/nios2/sync.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/sync.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,8 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 sync
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section \.text:
+0+0000 <foo> sync
+
Index: gas/testsuite/gas/nios2/sync.s
===================================================================
RCS file: gas/testsuite/gas/nios2/sync.s
diff -N gas/testsuite/gas/nios2/sync.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/sync.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,5 @@
+# Source file used to test the sync instructions
+foo:
+ sync
+
+
Index: gas/testsuite/gas/nios2/trap.d
===================================================================
RCS file: gas/testsuite/gas/nios2/trap.d
diff -N gas/testsuite/gas/nios2/trap.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/trap.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,7 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 trap
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> trap
Index: gas/testsuite/gas/nios2/trap.s
===================================================================
RCS file: gas/testsuite/gas/nios2/trap.s
diff -N gas/testsuite/gas/nios2/trap.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/trap.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,3 @@
+# Source file used to test the ret instructions
+foo:
+ trap
Index: gas/testsuite/gas/nios2/tret.d
===================================================================
RCS file: gas/testsuite/gas/nios2/tret.d
diff -N gas/testsuite/gas/nios2/tret.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/tret.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,8 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 tret
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> eret
+
Index: gas/testsuite/gas/nios2/tret.s
===================================================================
RCS file: gas/testsuite/gas/nios2/tret.s
diff -N gas/testsuite/gas/nios2/tret.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/tret.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,5 @@
+# Source file used to test the ret instructions
+foo:
+ eret
+
+
Index: gas/testsuite/gas/nios2/warn_noat.l
===================================================================
RCS file: gas/testsuite/gas/nios2/warn_noat.l
diff -N gas/testsuite/gas/nios2/warn_noat.l
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/warn_noat.l 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,5 @@
+.*warn_noat.s: Assembler messages:
+.*warn_noat.s:2: Warning: Register at \(r1\) can sometimes be corrupted by assembler optimizations.
+Use .set noat to turn off those optimizations \(and this warning\).
+.*warn_noat.s:8: Warning: Register at \(r1\) can sometimes be corrupted by assembler optimizations.
+Use .set noat to turn off those optimizations \(and this warning\).
Index: gas/testsuite/gas/nios2/warn_noat.s
===================================================================
RCS file: gas/testsuite/gas/nios2/warn_noat.s
diff -N gas/testsuite/gas/nios2/warn_noat.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/warn_noat.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,8 @@
+.set noat, 2 # This should not cause warning for at to be turned off
+add at, r2, r2
+.set noat # this should turn the warnings off
+add at, r2, r2
+.set at, 3 # this should not turn the warnings on
+add at, r2, r2
+.set at # this should turn the warnings on
+add at, r2, r2
Index: gas/testsuite/gas/nios2/warn_nobreak.l
===================================================================
RCS file: gas/testsuite/gas/nios2/warn_nobreak.l
diff -N gas/testsuite/gas/nios2/warn_nobreak.l
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/warn_nobreak.l 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,9 @@
+.*warn_nobreak.s: Assembler messages:
+.*warn_nobreak.s:2: Warning: The debugger will corrupt ba \(r30\). If you don't need to debug this
+code then use .set nobreak to turn off this warning.
+.*warn_nobreak.s:3: Warning: The debugger will corrupt bt \(r25\). If you don't need to debug this
+code then use .set nobreak to turn off this warning.
+.*warn_nobreak.s:11: Warning: The debugger will corrupt ba \(r30\). If you don't need to debug this
+code then use .set nobreak to turn off this warning.
+.*warn_nobreak.s:12: Warning: The debugger will corrupt bt \(r25\). If you don't need to debug this
+code then use .set nobreak to turn off this warning.
Index: gas/testsuite/gas/nios2/warn_nobreak.s
===================================================================
RCS file: gas/testsuite/gas/nios2/warn_nobreak.s
diff -N gas/testsuite/gas/nios2/warn_nobreak.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/warn_nobreak.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,12 @@
+.set nobreak , 2 # This should not cause warning for ba, bt to be turned off
+add ba, r2, r2
+add bt, r2, r2
+.set nobreak # this should turn the warnings off
+add ba, r3, r4
+add bt, r3, r4
+.set break, 3 # this should not turn the warnings on
+add ba, r3, r4
+add bt, r3, r4
+.set break # this should turn the warnings on
+add ba, r3, r4
+add bt, r3, r4
Index: gas/testsuite/gas/nios2/xor.d
===================================================================
RCS file: gas/testsuite/gas/nios2/xor.d
diff -N gas/testsuite/gas/nios2/xor.d
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/xor.d 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,11 @@
+#objdump: -dr --prefix-addresses
+#name: NIOS2 xor
+
+# Test the nor instruction
+
+.*: +file format elf32-littlenios2
+
+Disassembly of section .text:
+0+0000 <[^>]*> xor r6,r8,r10
+0+0004 <[^>]*> xorhi r6,r7,65535
+0+0008 <[^>]*> xori r6,r7,65535
Index: gas/testsuite/gas/nios2/xor.s
===================================================================
RCS file: gas/testsuite/gas/nios2/xor.s
diff -N gas/testsuite/gas/nios2/xor.s
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gas/testsuite/gas/nios2/xor.s 22 Jan 2013 18:36:37 -0000
@@ -0,0 +1,7 @@
+# Source file used to test the nor instruction
+
+foo:
+ xor r6,r8,r10
+ xorhi r6,r7,0xffff
+ xori r6,r7,0xffff
+