aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2006-05-05 16:38:09 +0000
committerThiemo Seufer <ths@networkno.de>2006-05-05 16:38:09 +0000
commitef75f0145e5e0255be469edad543db0bacf338af (patch)
tree2b25b5f2b786c925b9649daeaba6383e6571f9cd /gas
parenteec017952ae07b0ec22e486270c8d17a5ca8411d (diff)
downloadgdb-ef75f0145e5e0255be469edad543db0bacf338af.zip
gdb-ef75f0145e5e0255be469edad543db0bacf338af.tar.gz
gdb-ef75f0145e5e0255be469edad543db0bacf338af.tar.bz2
* gas/mips/noreorder.s, gas/mips/noreorder.d: New test for
reorder/noreorder corner case. * gas/mips/mips.exp: Run new test. -------------------------------------------------------------------
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/mips/mips.exp2
-rw-r--r--gas/testsuite/gas/mips/noreorder.d23
-rw-r--r--gas/testsuite/gas/mips/noreorder.s25
4 files changed, 56 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index dbed516..1cbea61 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-05 Nigel Stephens <nigel@mips.com>
+
+ * gas/mips/noreorder.s, gas/mips/noreorder.d: New test for
+ reorder/noreorder corner case.
+ * gas/mips/mips.exp: Run new test.
+
2006-05-04 Kazu Hirata <kazu@codesourcery.com>
* gas/arm/armv1.d (error-output): New.
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 382ff95..6c2a9f4 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -781,4 +781,6 @@ if { [istarget mips*-*-vxworks*] } {
}
run_dump_test "vxworks1"
run_dump_test "vxworks1-xgot"
+
+ run_dump_test "noreorder"
}
diff --git a/gas/testsuite/gas/mips/noreorder.d b/gas/testsuite/gas/mips/noreorder.d
new file mode 100644
index 0000000..0866ca0
--- /dev/null
+++ b/gas/testsuite/gas/mips/noreorder.d
@@ -0,0 +1,23 @@
+#objdump: -dr --disassemble-zeroes
+#as: -march=mips2 -mabi=32
+#name: noreorder test
+
+.*: +file format .*mips.*
+
+Disassembly of section .text:
+
+00000000 <per_cpu_trap_init>:
+ 0: 00000000 nop
+ 4: 00000000 nop
+ 8: 0c000000 jal 0 <per_cpu_trap_init>
+ 8: R_MIPS_26 cpu_cache_init
+ c: 00000000 nop
+ 10: 8fbf0010 lw ra,16\(sp\)
+ 14: 08000000 j 0 <per_cpu_trap_init>
+ 14: R_MIPS_26 tlb_init
+ 18: 27bd0018 addiu sp,sp,24
+ 1c: 00000000 nop
+ 20: 00000000 nop
+ 24: 1000fff6 b 0 <per_cpu_trap_init>
+ 28: 00000000 nop
+ 2c: 00000000 nop
diff --git a/gas/testsuite/gas/mips/noreorder.s b/gas/testsuite/gas/mips/noreorder.s
new file mode 100644
index 0000000..71e92ef
--- /dev/null
+++ b/gas/testsuite/gas/mips/noreorder.s
@@ -0,0 +1,25 @@
+ .text
+ .globl per_cpu_trap_init
+ .ent per_cpu_trap_init
+ .type per_cpu_trap_init, @function
+per_cpu_trap_init:
+$L807:
+ nop
+ nop
+ # Removing this .align make the code assemble correctly
+ .align 3
+ jal cpu_cache_init
+ lw $31,16($sp)
+ .set noreorder
+ j tlb_init
+ addiu $sp,$sp,24
+ # Replacing this .word with a nop causes the code to be assembled corrrectly
+ .word 0
+ # Removing this nop causes the code to be compiled correctly
+ nop
+ .set reorder
+
+ b $L807
+ .end per_cpu_trap_init
+
+ .p2align 4