aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-10-25 17:40:19 +0000
committerNick Clifton <nickc@redhat.com>2005-10-25 17:40:19 +0000
commit3c9b82baee30a1d3cfeb419643c6363dc9267208 (patch)
treee967c167366034d2a3bef0221e40d5abe7b999b6 /gas/testsuite
parentfcfa13d2b2b18f83382c2a0cb82c9c7d21be10cb (diff)
downloadgdb-3c9b82baee30a1d3cfeb419643c6363dc9267208.zip
gdb-3c9b82baee30a1d3cfeb419643c6363dc9267208.tar.gz
gdb-3c9b82baee30a1d3cfeb419643c6363dc9267208.tar.bz2
Add support for the Z80 processor family
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog13
-rw-r--r--gas/testsuite/gas/all/gas.exp26
-rw-r--r--gas/testsuite/gas/macros/macros.exp2
-rw-r--r--gas/testsuite/gas/z80/quotes.d9
-rw-r--r--gas/testsuite/gas/z80/quotes.s11
-rw-r--r--gas/testsuite/gas/z80/redef.d8
-rw-r--r--gas/testsuite/gas/z80/redef.s11
-rw-r--r--gas/testsuite/gas/z80/z80.exp10
8 files changed, 82 insertions, 8 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 051544d..69fb931 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,16 @@
+2005-10-25 Arnold Metselaar <arnold.metselaar@planet.nl>
+
+ * gas/all/gas.exp: Exclude Z80-*-* from floating point, string,
+ and cofftag test.
+ * gas/macros/macros.exp: Expect z80-*-* to fail the strings test
+ because it has no string escapes.
+ * gas/z80/quotes.d: New file
+ * gas/z80/quotes.d: New file
+ * gas/z80/quotes.s: New file
+ * gas/z80/redef.d: New file
+ * gas/z80/redef.s: New file
+ * gas/z80/z80.exp: New file
+
2005-10-24 Bernd Schmidt <bernd.schmidt@analog.com>
* gas/bfin/flow2.d: Match changed assembler behaviour.
diff --git a/gas/testsuite/gas/all/gas.exp b/gas/testsuite/gas/all/gas.exp
index 155a67e..5c52e9e 100644
--- a/gas/testsuite/gas/all/gas.exp
+++ b/gas/testsuite/gas/all/gas.exp
@@ -23,8 +23,9 @@ if { [istarget hppa*-*-*] || [istarget *c54x*-*-*] } then {
gas_test "p1480.s" "" "-a>" "simplifiable double subtraction"
}
-# No floating point support in assembly code for CRIS.
-if { ![istarget cris-*-*] && ![istarget crisv32-*-*] } then {
+# No floating point support in assembly code for CRIS and Z80.
+if { ![istarget cris-*-*] && ![istarget crisv32-*-*]
+ && ![istarget z80-*-*] } then {
gas_test "float.s" "" "" "simple FP constants"
}
@@ -78,6 +79,7 @@ case $target_triplet in {
{ iq2000*-*-* } { }
{ mips*-*-* } { }
{ *c54x*-*-* } { }
+ { z80-*-* } { }
default {
setup_xfail "*c30*-*-*" "*c4x*-*-*" "pdp11-*-*"
run_dump_test redef
@@ -189,7 +191,8 @@ case $target_triplet in {
# We omit the ARM toolchains because they define locals to
# start with '.', which eliminates .eos, .text etc from the output.
# Omit c54x, since .tag and .def mean something different on that target
-if { ([istarget *-*-coff*] && ![istarget *arm*-*-coff] && ![istarget thumb*-*-coff] && ![istarget xscale-*-coff] && ![istarget *c4x*-*-coff] && ![istarget *c54x*-*-coff]) \
+# Omit Z80, since octal numbers need a suffix on that target
+if { ([istarget *-*-coff*] && ![istarget *arm*-*-coff] && ![istarget thumb*-*-coff] && ![istarget xscale-*-coff] && ![istarget *c4x*-*-coff] && ![istarget *c54x*-*-coff] && ![istarget z80-*-coff]) \
||([istarget *-*-pe*] && ![istarget arm*-*-pe*] && ![istarget thumb*-*-pe*]) \
|| [istarget i*86-*-aix*] \
|| [istarget i*86-*-sco*] \
@@ -250,11 +253,18 @@ if { ![istarget "i960-*-*"] } {
run_dump_test quad
}
-run_dump_test weakref1
-run_dump_test weakref1g
-run_dump_test weakref1l
-run_dump_test weakref1u
-run_dump_test weakref1w
+
+# .set works differently on some targets.
+case $target_triplet in {
+ { z80-*-* } { }
+ default {
+ run_dump_test weakref1
+ run_dump_test weakref1g
+ run_dump_test weakref1l
+ run_dump_test weakref1u
+ run_dump_test weakref1w
+ }
+}
gas_test_error "weakref2.s" "" "e: would close weakref loop: e => a => b => c => d => e"
gas_test_error "weakref3.s" "" "a: would close weakref loop: a => b => c => d => e => a"
diff --git a/gas/testsuite/gas/macros/macros.exp b/gas/testsuite/gas/macros/macros.exp
index cd19ff8..3bd1982 100644
--- a/gas/testsuite/gas/macros/macros.exp
+++ b/gas/testsuite/gas/macros/macros.exp
@@ -56,6 +56,7 @@ if { ![istarget hppa*-*-*] || [istarget *-*-linux*] } {
setup_xfail "powerpc*-*-aix*" "powerpc*-*-beos*" "powerpc*-*-macos*"
setup_xfail "powerpc*-*-pe" "powerpc*-*-*win*"
setup_xfail "rs6000-*-*"
+ setup_xfail "z80-*-*"
# FIXME: Due to difference in what "consecutive octets" means.
setup_xfail "*c4x*-*-*" "*c54x*-*"
@@ -75,6 +76,7 @@ case $target_triplet in {
{ m68*-*-* } { }
{ m88*-*-* } { }
{ mmix-* } { }
+ { z80-* } { }
default { run_list_test dot "-alm" }
}
run_list_test end ""
diff --git a/gas/testsuite/gas/z80/quotes.d b/gas/testsuite/gas/z80/quotes.d
new file mode 100644
index 0000000..1915f51
--- /dev/null
+++ b/gas/testsuite/gas/z80/quotes.d
@@ -0,0 +1,9 @@
+#objdump: -s -j .data
+#name: quotes
+
+.*:.*
+
+Contents of section .data:
+ 0000 73696e67 6c653a27 646f7562 6c653a22[ ]+................
+ 0010 00657363 6170653a 5c5c08fe 3a[ ]+................
+#pass \ No newline at end of file
diff --git a/gas/testsuite/gas/z80/quotes.s b/gas/testsuite/gas/z80/quotes.s
new file mode 100644
index 0000000..1b882bc
--- /dev/null
+++ b/gas/testsuite/gas/z80/quotes.s
@@ -0,0 +1,11 @@
+ ;; test the parsing of strings and character constants
+ section .data
+laf:
+ defb "single:'"
+ defb 'double:"',laf
+ defb 'escape:\\'
+
+ ex af,af'
+af0:
+ cp '9'+1
+
diff --git a/gas/testsuite/gas/z80/redef.d b/gas/testsuite/gas/z80/redef.d
new file mode 100644
index 0000000..fed1998
--- /dev/null
+++ b/gas/testsuite/gas/z80/redef.d
@@ -0,0 +1,8 @@
+#objdump: -s -j .data
+#name: .equ redefinitions
+
+.*: .*
+
+Contents of section .data:
+ 0000 00000000 0[04]00000[04] 0[08]00000[08] 0[0c]00000[0c][ ]+................[ ]*
+#pass
diff --git a/gas/testsuite/gas/z80/redef.s b/gas/testsuite/gas/z80/redef.s
new file mode 100644
index 0000000..eda6a69
--- /dev/null
+++ b/gas/testsuite/gas/z80/redef.s
@@ -0,0 +1,11 @@
+ .data
+_start:
+x: defl .-_start
+ .long x
+ .balign 4
+x: defl .-_start
+ .long x
+x: defl .-_start
+ .long x
+x: defl .-_start
+ .long x
diff --git a/gas/testsuite/gas/z80/z80.exp b/gas/testsuite/gas/z80/z80.exp
new file mode 100644
index 0000000..733ce55
--- /dev/null
+++ b/gas/testsuite/gas/z80/z80.exp
@@ -0,0 +1,10 @@
+# run targets for target Z80.
+
+if [istarget z80-*-*] then
+{
+# test redefinitions
+ run_dump_test "redef"
+# test parsing of " and '
+ run_dump_test "quotes"
+
+}