aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2012-09-23 10:41:24 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2012-09-23 10:41:24 +0000
commite1b47bd5c755ede061cc2ce0c608255ac9c8ce88 (patch)
tree7b1d88b2d84c49ac68aa8679adfaf949cc754a45 /gas/testsuite
parentc150d1d2f5ebe12d8de3205efa547becdc56fddb (diff)
downloadgdb-e1b47bd5c755ede061cc2ce0c608255ac9c8ce88.zip
gdb-e1b47bd5c755ede061cc2ce0c608255ac9c8ce88.tar.gz
gdb-e1b47bd5c755ede061cc2ce0c608255ac9c8ce88.tar.bz2
gas/
2012-09-23 Richard Sandiford <rdsandiford@googlemail.com> Maciej W. Rozycki <macro@codesourcery.com> * config/tc-mips.h (mips_record_label): Delete. (mips_add_dot_label): Declare. (tc_new_dot_label): Use it. * config/tc-mips.c (mips_assembling_insn): New variable. (md_assemble): Call mips_mark_labels. Set mips_assembling_insn while the main part of the function is executing. (mips_compressed_mark_label): New function, split out from... (mips_compressed_mark_labels): ...here. (append_insn): Don't call mips_mark_labels here. (mips_record_label): Make local. (mips_add_dot_label): New function. gas/testsuite/ * gas/mips/dot-1.s, gas/mips/dot-1.d, gas/mips/micromips@dot-1.d, gas/mips/mips16@dot-1.d: New test. * gas/mips/mips.exp: Run it.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog6
-rw-r--r--gas/testsuite/gas/mips/dot-1.d20
-rw-r--r--gas/testsuite/gas/mips/dot-1.s18
-rw-r--r--gas/testsuite/gas/mips/micromips@dot-1.d21
-rw-r--r--gas/testsuite/gas/mips/mips.exp3
-rw-r--r--gas/testsuite/gas/mips/mips16@dot-1.d21
6 files changed, 88 insertions, 1 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 47baaff..fe5da58 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2012-09-23 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gas/mips/dot-1.s, gas/mips/dot-1.d, gas/mips/micromips@dot-1.d,
+ gas/mips/mips16@dot-1.d: New test.
+ * gas/mips/mips.exp: Run it.
+
2012-09-20 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/i386.exp: Run x86-64-arch-2-1 and x86-64-arch-2-2.
diff --git a/gas/testsuite/gas/mips/dot-1.d b/gas/testsuite/gas/mips/dot-1.d
new file mode 100644
index 0000000..ace625c
--- /dev/null
+++ b/gas/testsuite/gas/mips/dot-1.d
@@ -0,0 +1,20 @@
+#objdump: -dr --show-raw-insn
+#as: -32
+#name: MIPS dot-1
+#source: dot-1.s
+
+.*file format.*
+
+Disassembly .*
+
+0+0 <foo>:
+.*: 24840000 addiu a0,a0,0
+ \.\.\.
+.*: 2484000c addiu a0,a0,12
+.*: 24840008 addiu a0,a0,8
+.*: 24840014 addiu a0,a0,20
+.*: 24840000 addiu a0,a0,0
+.*: 24840010 addiu a0,a0,16
+.*: 24840018 addiu a0,a0,24
+.*: 24840024 addiu a0,a0,36
+#pass
diff --git a/gas/testsuite/gas/mips/dot-1.s b/gas/testsuite/gas/mips/dot-1.s
new file mode 100644
index 0000000..78e05bf
--- /dev/null
+++ b/gas/testsuite/gas/mips/dot-1.s
@@ -0,0 +1,18 @@
+ .ent foo
+foo:
+ addiu $4,.-foo
+ nop
+.L1:
+ nop
+ addiu $4,.L2 - .
+ addiu $4,. - .L1
+ addiu $4,. - foo
+.L2:
+ addiu $4,%lo(.L2 - .)
+ addiu $4,%lo(.L3 - .)
+ addiu $4,%lo(. - .L1)
+ addiu $4,%lo(. - foo)
+ nop
+.L3:
+ nop
+ .end foo
diff --git a/gas/testsuite/gas/mips/micromips@dot-1.d b/gas/testsuite/gas/mips/micromips@dot-1.d
new file mode 100644
index 0000000..d66c408
--- /dev/null
+++ b/gas/testsuite/gas/mips/micromips@dot-1.d
@@ -0,0 +1,21 @@
+#objdump: -dr --show-raw-insn
+#as: -32
+#name: MIPS dot-1
+#source: dot-1.s
+
+.*file format.*
+
+Disassembly .*
+
+0+0 <foo>:
+.*: 4c80 addiu a0,a0,0
+.*: 0c00 nop
+.*: 0c00 nop
+.*: 3084 0008 addiu a0,a0,8
+.*: 4c8c addiu a0,a0,6
+.*: 6e46 addiu a0,a0,12
+.*: 3084 0000 addiu a0,a0,0
+.*: 3084 000e addiu a0,a0,14
+.*: 3084 0012 addiu a0,a0,18
+.*: 3084 001a addiu a0,a0,26
+#pass
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 1cc4b6f..762755e 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -478,7 +478,8 @@ if { [istarget mips*-*-vxworks*] } {
if { $no_micromips } {
mips_arch_destroy micromips
}
-
+
+ run_dump_test_arches "dot-1" [mips_arch_list_matching mips1]
run_dump_test_arches "abs" [mips_arch_list_matching mips1]
run_dump_test_arches "add" [mips_arch_list_matching mips1]
run_dump_test_arches "and" [mips_arch_list_matching mips1]
diff --git a/gas/testsuite/gas/mips/mips16@dot-1.d b/gas/testsuite/gas/mips/mips16@dot-1.d
new file mode 100644
index 0000000..55d1282
--- /dev/null
+++ b/gas/testsuite/gas/mips/mips16@dot-1.d
@@ -0,0 +1,21 @@
+#objdump: -dr --show-raw-insn
+#as: -32
+#name: MIPS dot-1
+#source: dot-1.s
+
+.*file format.*
+
+Disassembly .*
+
+0+0 <foo>:
+.*: 4c00 addiu a0,0
+.*: 6500 nop
+.*: 6500 nop
+.*: 4c06 addiu a0,6
+.*: 4c04 addiu a0,4
+.*: 4c0a addiu a0,10
+.*: 4c00 addiu a0,0
+.*: f000 4c0e addiu a0,14
+.*: f000 4c0e addiu a0,14
+.*: f000 4c16 addiu a0,22
+#pass