summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-06-05 17:00:33 +0000
committerNick Clifton <nickc@redhat.com>2007-06-05 17:00:33 +0000
commitdfeb06664ae08b270f4b46c76620a8e4fdcdeaa2 (patch)
treee05d6d823ada33c2d0d0fdb8f393731ad3ae7f7b
parent93e7bd98af3e52d6d51a9cacd0848a3c6a3e5bdb (diff)
downloadbinutils-gdb-dfeb06664ae08b270f4b46c76620a8e4fdcdeaa2.tar.gz
Patch for PR4587 + move proc run_list_test into gas-defs.exp
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-sparc.c10
-rw-r--r--gas/testsuite/ChangeLog33
-rw-r--r--gas/testsuite/gas/alpha/alpha.exp13
-rw-r--r--gas/testsuite/gas/bfin/bfin.exp12
-rw-r--r--gas/testsuite/gas/cfi/cfi.exp14
-rw-r--r--gas/testsuite/gas/crx/allinsn.exp13
-rw-r--r--gas/testsuite/gas/d10v/d10v.exp13
-rw-r--r--gas/testsuite/gas/d30v/d30.exp13
-rw-r--r--gas/testsuite/gas/elf/elf.exp8
-rw-r--r--gas/testsuite/gas/frv/allinsn.exp22
-rw-r--r--gas/testsuite/gas/i386/i386.exp13
-rw-r--r--gas/testsuite/gas/i860/i860.exp13
-rw-r--r--gas/testsuite/gas/ia64/ia64.exp13
-rw-r--r--gas/testsuite/gas/lns/lns.exp14
-rw-r--r--gas/testsuite/gas/macros/macros.exp14
-rw-r--r--gas/testsuite/gas/maxq10/maxq10.exp13
-rw-r--r--gas/testsuite/gas/maxq20/maxq20.exp13
-rw-r--r--gas/testsuite/gas/mips/mips.exp21
-rw-r--r--gas/testsuite/gas/mmix/mmix-list.exp20
-rw-r--r--gas/testsuite/gas/mn10300/basic.exp16
-rw-r--r--gas/testsuite/gas/msp430/msp430.exp13
-rw-r--r--gas/testsuite/gas/pdp11/pdp11.exp13
-rw-r--r--gas/testsuite/gas/ppc/ppc.exp13
-rw-r--r--gas/testsuite/gas/s390/s390.exp13
-rw-r--r--gas/testsuite/gas/sparc/pr4587.l2
-rw-r--r--gas/testsuite/gas/sparc/pr4587.s22
-rw-r--r--gas/testsuite/gas/sparc/sparc.exp2
-rw-r--r--gas/testsuite/lib/gas-defs.exp24
29 files changed, 106 insertions, 302 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 24bb9209d75..15c33fae27a 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-05 Nick Clifton <nickc@redhat.com>
+
+ PR gas/4587
+ * config/tc-sparc.c (sparc_ip): Terminate tls_ops array.
+
2007-06-05 Alan Modra <amodra@bigpond.net.au>
* config/tc-spu.c (spu_cons): Use deferred_expression. Handle
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index 84472b3cbd5..d4a409fbc34 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -1860,7 +1860,8 @@ sparc_ip (str, pinsn)
case '\0': /* End of args. */
if (s[0] == ',' && s[1] == '%')
{
- static const struct tls_ops {
+ static const struct tls_ops
+ {
/* The name as it appears in assembler. */
char *name;
/* strlen (name), precomputed for speed */
@@ -1869,7 +1870,9 @@ sparc_ip (str, pinsn)
int reloc;
/* 1 if call. */
int call;
- } tls_ops[] = {
+ }
+ tls_ops[] =
+ {
{ "tgd_add", 7, BFD_RELOC_SPARC_TLS_GD_ADD, 0 },
{ "tgd_call", 8, BFD_RELOC_SPARC_TLS_GD_CALL, 1 },
{ "tldm_add", 8, BFD_RELOC_SPARC_TLS_LDM_ADD, 0 },
@@ -1877,7 +1880,8 @@ sparc_ip (str, pinsn)
{ "tldo_add", 8, BFD_RELOC_SPARC_TLS_LDO_ADD, 0 },
{ "tie_ldx", 7, BFD_RELOC_SPARC_TLS_IE_LDX, 0 },
{ "tie_ld", 6, BFD_RELOC_SPARC_TLS_IE_LD, 0 },
- { "tie_add", 7, BFD_RELOC_SPARC_TLS_IE_ADD, 0 }
+ { "tie_add", 7, BFD_RELOC_SPARC_TLS_IE_ADD, 0 },
+ { NULL, 0, 0, 0 }
};
const struct tls_ops *o;
char *s1;
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index e3a93e09787..4bd02902651 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,36 @@
+2007-06-05 Nick Clifton <nickc@redhat.com>
+
+ PR gas/4587
+ * gas/sparc/sparc.exp: Run pr4587 list test.
+ * gas/sparc/pr4587.s: New test case.
+ * gas/sparc/pr4587.l: Expected assembler output.
+
+2007-06-05 Nick Clifton <nickc@redhat.com>
+
+ * lib/gas-defs.exp (run_list_test): New proc.
+ * gas/alpha/alpha.exp: Delete proc run_list_test.
+ * gas/bfin/bfin.exp : Likewise.
+ * gas/cfi/cfi.exp : Likewise.
+ * gas/crx/allinsn.exp : Likewise.
+ * gas/d10v/d10v.exp : Likewise.
+ * gas/d30v/d30v.exp : Likewise.
+ * gas/frv/allinsn.exp : Likewise.
+ * gas/i386/i386.exp : Likewise.
+ * gas/i860.i860.exp : Likewise.
+ * gas/ia64/ia64.exp : Likewise.
+ * gas/lns/lns.exp : Likewise.
+ * gas/macros/macros.exp : Likewise.
+ * gas/maxq10/maxq10.exp : Likewise.
+ * gas/maxq20/maxq20.exp : Likewise.
+ * gas/mips/mips.exp : Likewise.
+ * gas/mmix/mmix-list.exp : Likewise.
+ * gas/mn10300/basic.exp : Likewise.
+ * gas/msp430/msp430.exp : Likewise.
+ * gas/pdp11/pdp11.exp : Likewise.
+ * gas/ppc/ppc.exp : Likewise.
+ * gas/s390/s390.exp : Likewise.
+ * gas/elf/elf.exp (proc run_list_test): Rename to run_elf_list_test.
+
2007-05-29 Jakub Jelinek <jakub@redhat.com>
PR gas/4558
diff --git a/gas/testsuite/gas/alpha/alpha.exp b/gas/testsuite/gas/alpha/alpha.exp
index da785ae0404..04d99329dd7 100644
--- a/gas/testsuite/gas/alpha/alpha.exp
+++ b/gas/testsuite/gas/alpha/alpha.exp
@@ -2,19 +2,6 @@
# Some generic alpha tests
#
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "alpha $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&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 alpha*-*-*] } then {
set elf [expr [istarget *-*-elf*] \
diff --git a/gas/testsuite/gas/bfin/bfin.exp b/gas/testsuite/gas/bfin/bfin.exp
index 51690a16fe0..9f7849b27b9 100644
--- a/gas/testsuite/gas/bfin/bfin.exp
+++ b/gas/testsuite/gas/bfin/bfin.exp
@@ -1,17 +1,5 @@
# Blackfin assembler testsuite
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "bfin $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&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 bfin*-*-*] {
run_dump_test "arithmetic"
run_dump_test "bit"
diff --git a/gas/testsuite/gas/cfi/cfi.exp b/gas/testsuite/gas/cfi/cfi.exp
index 3a5650559cc..b396f9e8523 100644
--- a/gas/testsuite/gas/cfi/cfi.exp
+++ b/gas/testsuite/gas/cfi/cfi.exp
@@ -1,17 +1,3 @@
-# ??? This probably shouldn't be replicated here...
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "cfi $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
-}
-
if ![is_elf_format] then {
return
}
diff --git a/gas/testsuite/gas/crx/allinsn.exp b/gas/testsuite/gas/crx/allinsn.exp
index f3f8ae80a58..2a52f701b5c 100644
--- a/gas/testsuite/gas/crx/allinsn.exp
+++ b/gas/testsuite/gas/crx/allinsn.exp
@@ -2,19 +2,6 @@
# Driver for CRX assembler testsuite
#
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "CRX $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if {[regexp_diff "dump.out" "${file}.l"] } {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
-}
-
if ![istarget crx-*-*] {
return
}
diff --git a/gas/testsuite/gas/d10v/d10v.exp b/gas/testsuite/gas/d10v/d10v.exp
index 6169ecf1aa6..0b152b016a1 100644
--- a/gas/testsuite/gas/d10v/d10v.exp
+++ b/gas/testsuite/gas/d10v/d10v.exp
@@ -1,19 +1,6 @@
#
# Driver for D10V assembler testsuite
#
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "D10V $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if {[regexp_diff "dump.out" "${file}.l"] } {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
-}
-
if {[istarget d10v-*-*]} {
run_dump_test "inst"
run_dump_test "address-001"
diff --git a/gas/testsuite/gas/d30v/d30.exp b/gas/testsuite/gas/d30v/d30.exp
index 275b0e06df1..d06f6066c63 100644
--- a/gas/testsuite/gas/d30v/d30.exp
+++ b/gas/testsuite/gas/d30v/d30.exp
@@ -2,19 +2,6 @@
# D30V assembler tests
#
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "D30V $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if {[regexp_diff "dump.out" "${file}.l"] } {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
-}
-
if {[istarget d30v-*-*]} {
run_dump_test "inst"
run_dump_test "align"
diff --git a/gas/testsuite/gas/elf/elf.exp b/gas/testsuite/gas/elf/elf.exp
index 7f7365d5b50..227b77ef472 100644
--- a/gas/testsuite/gas/elf/elf.exp
+++ b/gas/testsuite/gas/elf/elf.exp
@@ -2,7 +2,7 @@
# elf tests
#
-proc run_list_test { name suffix opts readelf_opts readelf_pipe } {
+proc run_elf_list_test { name suffix opts readelf_opts readelf_pipe } {
global READELF
global srcdir subdir
set testname "elf $name list"
@@ -89,11 +89,11 @@ if { ([istarget "*-*-*elf*"]
}
run_dump_test "section0"
run_dump_test "section1"
- run_list_test "section2" "$target_machine" "-al" "-s" ""
+ run_elf_list_test "section2" "$target_machine" "-al" "-s" ""
run_dump_test "section3"
run_dump_test "section4"
- run_list_test "section5" "" "-al" "-SW" "| grep \" \\\\.test\\\[0-9\\\]\""
+ run_elf_list_test "section5" "" "-al" "-SW" "| grep \" \\\\.test\\\[0-9\\\]\""
run_dump_test "struct"
run_dump_test "symver"
- run_list_test "type" "" "" "-s" "| grep \"1 \\\[FONT\\\]\""
+ run_elf_list_test "type" "" "" "-s" "| grep \"1 \\\[FONT\\\]\""
}
diff --git a/gas/testsuite/gas/frv/allinsn.exp b/gas/testsuite/gas/frv/allinsn.exp
index ed29d20893b..b6950aeb614 100644
--- a/gas/testsuite/gas/frv/allinsn.exp
+++ b/gas/testsuite/gas/frv/allinsn.exp
@@ -1,31 +1,19 @@
# FRV assembler testsuite.
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "$name error test ($opts)"
- gas_run $name.s $opts >&dump.out
- if {[regexp_diff dump.out $srcdir/$subdir/$name.l]} {
- fail $testname
- verbose "output is [file_contents dump.out]" 2
- return
- }
- pass $testname
-}
-
if [istarget frv*-*-*] {
run_dump_test "allinsn"
run_dump_test "fdpic"
run_dump_test "reloc1"
run_dump_test "fr405-insn"
- run_list_test "fr405-insn" "-mcpu=fr400"
- run_list_test "fr405-insn" "-mcpu=fr500"
+ run_list_test "fr405-insn" "-mcpu=fr400" "fr405-insn -mcpu=fr400"
+ run_list_test "fr405-insn" "-mcpu=fr500" "fr405-insn -mcpu=fr500"
run_dump_test "fr450-spr"
run_dump_test "fr450-insn"
- run_list_test "fr450-insn" "-mcpu=fr405"
- run_list_test "fr450-insn" "-mcpu=fr400"
- run_list_test "fr450-insn" "-mcpu=fr500"
+ run_list_test "fr450-insn" "-mcpu=fr405" "fr450-insn -mcpu=fr405"
+ run_list_test "fr450-insn" "-mcpu=fr400" "fr450-insn -mcpu=fr400"
+ run_list_test "fr450-insn" "-mcpu=fr500" "fr450-insn -mcpu=fr500"
run_list_test "fr450-media-issue" "-mcpu=fr450"
run_dump_test "fr550-pack1"
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index e0702f59d3f..0c419d2ee99 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -1,19 +1,6 @@
#
# i386 tests
#
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "i386 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
-}
-
proc gas_64_check { } {
global NM
global NMFLAGS
diff --git a/gas/testsuite/gas/i860/i860.exp b/gas/testsuite/gas/i860/i860.exp
index 041d859cc92..39e40af26fd 100644
--- a/gas/testsuite/gas/i860/i860.exp
+++ b/gas/testsuite/gas/i860/i860.exp
@@ -1,18 +1,5 @@
# i860 assembler testsuite.
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "i860 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&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 i860-*-*] {
run_dump_test "bitwise"
run_dump_test "branch"
diff --git a/gas/testsuite/gas/ia64/ia64.exp b/gas/testsuite/gas/ia64/ia64.exp
index f68c107f528..3dfd10b8c34 100644
--- a/gas/testsuite/gas/ia64/ia64.exp
+++ b/gas/testsuite/gas/ia64/ia64.exp
@@ -1,19 +1,6 @@
#
# ia64 tests
#
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "ia64 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&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 "ia64-*"] then {
run_dump_test "regs"
diff --git a/gas/testsuite/gas/lns/lns.exp b/gas/testsuite/gas/lns/lns.exp
index 055c14029ef..2373290e842 100644
--- a/gas/testsuite/gas/lns/lns.exp
+++ b/gas/testsuite/gas/lns/lns.exp
@@ -1,17 +1,3 @@
-# ??? This probably shouldn't be replicated here...
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "lns $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
-}
-
if ![is_elf_format] then {
return
}
diff --git a/gas/testsuite/gas/macros/macros.exp b/gas/testsuite/gas/macros/macros.exp
index e175ad9a53e..62392ec3b48 100644
--- a/gas/testsuite/gas/macros/macros.exp
+++ b/gas/testsuite/gas/macros/macros.exp
@@ -1,18 +1,5 @@
# Run some tests of gas macros.
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "macros $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&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 hppa*-*-*] || [istarget *-*-linux*] } {
run_dump_test test1
}
@@ -69,6 +56,7 @@ run_dump_test app3
run_dump_test app4
run_list_test badarg ""
+
case $target_triplet in {
{ *c54x*-*-* } { }
{ *c4x*-*-* } { }
diff --git a/gas/testsuite/gas/maxq10/maxq10.exp b/gas/testsuite/gas/maxq10/maxq10.exp
index 482bd4ca2c2..8887b53494e 100644
--- a/gas/testsuite/gas/maxq10/maxq10.exp
+++ b/gas/testsuite/gas/maxq10/maxq10.exp
@@ -1,19 +1,6 @@
#
# MAXQ10 tests
#
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "maxq10 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
-}
-
proc gas_64_check { } {
global NM
global NMFLAGS
diff --git a/gas/testsuite/gas/maxq20/maxq20.exp b/gas/testsuite/gas/maxq20/maxq20.exp
index d2857f617b9..6d952e9e3ed 100644
--- a/gas/testsuite/gas/maxq20/maxq20.exp
+++ b/gas/testsuite/gas/maxq20/maxq20.exp
@@ -1,19 +1,6 @@
#
# MAXQ20 tests
#
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "maxq20 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
-}
-
proc gas_64_check { } {
global NM
global NMFLAGS
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index ae0276d7d18..523a7738242 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -292,27 +292,6 @@ proc run_dump_test_arches { name arch_list } {
}
}
-# run_list_test NAME OPTS (optional): TESTNAME
-#
-# Assemble the file "NAME.d" and compare the assembler standard error
-# output against the regular expressions given in the file "NAME.l".
-# The assembler is passed the flags given in OPTS. If TESTNAME is
-# provided, it will be used as the name of the test.
-proc run_list_test { name opts {testname {}} } {
- global srcdir subdir
- if { [string length $testname] == 0 } then {
- set testname "MIPS $name"
- }
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
-}
-
# run_list_test_arch NAME OPTS ARCH
#
# Invoke "run_list_test" for test NAME with options OPTS, with extra
diff --git a/gas/testsuite/gas/mmix/mmix-list.exp b/gas/testsuite/gas/mmix/mmix-list.exp
index 8d2a294f7c5..e4a98d0cd80 100644
--- a/gas/testsuite/gas/mmix/mmix-list.exp
+++ b/gas/testsuite/gas/mmix/mmix-list.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2007 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,24 +18,6 @@ if { ! [istarget "mmix-*"] } {
return
}
-proc run_list_test { name opts } {
- global srcdir subdir runtests
-
- if ![runtest_file_p $runtests $name] then {
- return
- }
-
- set testname "mmix list $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
-}
-
proc run_mmix_list_tests { } {
global srcdir subdir runtests
foreach test_name [lsort [find ${srcdir}/${subdir} *.l]] {
diff --git a/gas/testsuite/gas/mn10300/basic.exp b/gas/testsuite/gas/mn10300/basic.exp
index b80e006cd21..37c1972738f 100644
--- a/gas/testsuite/gas/mn10300/basic.exp
+++ b/gas/testsuite/gas/mn10300/basic.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 2000, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2002, 2004, 2007 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -1768,20 +1768,6 @@ proc do_am33_8 {} {
if [expr $x==67] then { pass $testname } else { fail $testname }
}
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "mn10300 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&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 mn10300*-*-*] then {
# Test the basic instruction parser.
do_add
diff --git a/gas/testsuite/gas/msp430/msp430.exp b/gas/testsuite/gas/msp430/msp430.exp
index a45ae4b630b..c5e8052e042 100644
--- a/gas/testsuite/gas/msp430/msp430.exp
+++ b/gas/testsuite/gas/msp430/msp430.exp
@@ -1,19 +1,6 @@
#
# msp430 tests
#
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "msp430 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- exit
- return
- }
- pass $testname
-}
if [expr [istarget "msp430-*-*"]] then {
run_dump_test "opcode"
diff --git a/gas/testsuite/gas/pdp11/pdp11.exp b/gas/testsuite/gas/pdp11/pdp11.exp
index 9ee6435df12..91ccddbb2ef 100644
--- a/gas/testsuite/gas/pdp11/pdp11.exp
+++ b/gas/testsuite/gas/pdp11/pdp11.exp
@@ -1,19 +1,6 @@
#
# pdp11/pdp11 tests
#
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "pdp11 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- exit
- return
- }
- pass $testname
-}
if [expr [istarget "pdp11-*-*"]] then {
diff --git a/gas/testsuite/gas/ppc/ppc.exp b/gas/testsuite/gas/ppc/ppc.exp
index 0f0e9bf01b7..0e2db22c66e 100644
--- a/gas/testsuite/gas/ppc/ppc.exp
+++ b/gas/testsuite/gas/ppc/ppc.exp
@@ -2,19 +2,6 @@
# Some PowerPC tests
#
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "ppc $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- return
- }
- pass $testname
-}
-
# These tests are currently ELF specific, only because nobody has
# converted them to look for XCOFF relocations.
diff --git a/gas/testsuite/gas/s390/s390.exp b/gas/testsuite/gas/s390/s390.exp
index db49134775f..8739bdd9327 100644
--- a/gas/testsuite/gas/s390/s390.exp
+++ b/gas/testsuite/gas/s390/s390.exp
@@ -1,19 +1,6 @@
#
# s390/s390x tests
#
-proc run_list_test { name opts } {
- global srcdir subdir
- set testname "s390 $name"
- set file $srcdir/$subdir/$name
- gas_run ${name}.s $opts ">&dump.out"
- if { [regexp_diff "dump.out" "${file}.l"] } then {
- fail $testname
- verbose "output is [file_contents "dump.out"]" 2
- exit
- return
- }
- pass $testname
-}
if [expr [istarget "s390-*-*"] || [istarget "s390x-*-*"]] then {
diff --git a/gas/testsuite/gas/sparc/pr4587.l b/gas/testsuite/gas/sparc/pr4587.l
new file mode 100644
index 00000000000..fd05091b1e2
--- /dev/null
+++ b/gas/testsuite/gas/sparc/pr4587.l
@@ -0,0 +1,2 @@
+.*pr4587.s: Assembler messages:
+.*pr4587.s:18: Error: Illegal operands
diff --git a/gas/testsuite/gas/sparc/pr4587.s b/gas/testsuite/gas/sparc/pr4587.s
new file mode 100644
index 00000000000..a058c1d07a3
--- /dev/null
+++ b/gas/testsuite/gas/sparc/pr4587.s
@@ -0,0 +1,22 @@
+ .section .data
+ .align 4
+zero: .single 0.0
+
+ .section .text
+ .align 4
+ .global main
+main:
+ save %sp, -96, %sp
+
+ ! Zero-out the first FP register
+ set zero, %l0
+ ld [%l0], %f0
+
+ ! Compare it to itself
+ ! The third reg (%f0) will cause a segfault in as
+ ! fcmps only takes two regs... this should be illegal operand error
+ fcmps %f0, %f0, %f0
+
+ ! Return 0
+ ret
+ restore %g0, %g0, %o0
diff --git a/gas/testsuite/gas/sparc/sparc.exp b/gas/testsuite/gas/sparc/sparc.exp
index 60ca24f122c..876f9acf801 100644
--- a/gas/testsuite/gas/sparc/sparc.exp
+++ b/gas/testsuite/gas/sparc/sparc.exp
@@ -53,6 +53,8 @@ if [istarget sparc*-*-*] {
run_dump_test "v9branch3"
run_dump_test "v9branch4"
run_dump_test "v9branch5"
+
+ run_list_test "pr4587" ""
}
if [istarget sparc-*-vxworks*] {
diff --git a/gas/testsuite/lib/gas-defs.exp b/gas/testsuite/lib/gas-defs.exp
index 3b21719615f..eabd018add9 100644
--- a/gas/testsuite/lib/gas-defs.exp
+++ b/gas/testsuite/lib/gas-defs.exp
@@ -1,5 +1,5 @@
# Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-# 2004, 2005 Free Software Foundation, Inc.
+# 2004, 2005, 2007 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -888,3 +888,25 @@ if ![string length [info proc prune_warnings]] {
return $text
}
}
+
+# run_list_test NAME OPTS (optional): TESTNAME
+#
+# Assemble the file "NAME.d" with command line options OPTS and
+# compare the assembler standard error output against thee regular
+# expressions given in the file "NAME.l". If TESTNAME is provided,
+# it will be used as the name of the test.
+
+proc run_list_test { name opts {testname {}} } {
+ global srcdir subdir
+ if { [string length $testname] == 0 } then {
+ set testname "[file tail $subdir] $name"
+ }
+ set file $srcdir/$subdir/$name
+ gas_run ${name}.s $opts ">&dump.out"
+ if { [regexp_diff "dump.out" "${file}.l"] } then {
+ fail $testname
+ verbose "output is [file_contents "dump.out"]" 2
+ return
+ }
+ pass $testname
+}