-# Copyright (C) 2012-2019 Free Software Foundation, Inc.
+# Copyright (C) 2012-2021 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
&& ![istarget microblaze-*-*]
&& ![istarget mn10300-*-*]
&& ![istarget msp430*-*-*]
+ && ![istarget powerpc*-*-aix*]
&& ![istarget riscv*-*-*]
&& ![istarget rl78-*-*]
+ && ![istarget rs6000*-*-aix*]
&& ![istarget rx-*-*] } then {
gas_test_error "diff1.s" "" "difference of two undefined symbols"
}
}
# .equ works differently on some targets.
-case $target_triplet in {
- { hppa*-*-* } { }
- { *c54x*-*-* } { }
+switch -glob $target_triplet {
+ hppa*-*-* { }
+ *c54x*-*-* { }
default {
gas_test "equ-ok.s" "" "" ".equ for symbol already set"
gas_test_error "equ-bad.s" "" ".equ for symbol already set through .eqv"
gas_test "eqv-ok.s" "" "" ".eqv support"
gas_test_error "eqv-bad.s" "" ".eqv for symbol already set"
-run_dump_test eqv-dot
+if { [istarget "pdp11-*-*"] } then {
+ run_dump_test eqv-dot-pdp11
+} else {
+ run_dump_test eqv-dot
+}
if { ![istarget "bfin-*-*"] } then {
gas_test "assign-ok.s" "" "" "== assignment support"
}
gas_test_error "assign-bad.s" "" "== assignment for symbol already set"
+run_dump_test assign-bad-recursive
+run_dump_test local-label-overflow
run_dump_test simple-forward
run_dump_test forward
# mmix doesn't like .L1:
# ti addresses aren't octets.
if { ![is_aout_format] } {
- case $target_triplet in {
- { hppa*64*-*-* } {
+ switch -glob $target_triplet {
+ hppa*64*-*-* {
run_dump_test fwdexp
}
- { alpha-*-*linux*ecoff } { }
- { alpha-*-osf* } { }
- { hppa*-*-hpux* } { }
- { mep-*-* } { }
- { mmix-*-* } { }
- { nds32*-*-* } { }
- { tic30*-*-* } { }
- { tic4x*-*-* } { }
- { tic54x*-*-* } { }
+ alpha-*-*linux*ecoff { }
+ alpha-*-osf* { }
+ hppa*-*-hpux* { }
+ mep-*-* { }
+ mmix-*-* { }
+ nds32*-*-* { }
+ tic30*-*-* { }
+ tic4x*-*-* { }
+ tic54x*-*-* { }
default {
run_dump_test fwdexp
}
# most of the tests won't work on targets that set linkrelax.
# 4 octet bytes confuse address matching on ti targets.
# pdp11 gets unexpected reloc types.
-case $target_triplet in {
- { alpha*-*-* } { }
- { am3*-*-* } { }
- { cr16*-*-* } { }
- { crx*-*-* } { }
- { h8300-*-* } { }
- { mips*-*-* } { }
- { mn10200-*-* } { }
- { mn10300-*-* } { }
- { msp430*-*-* } { }
- { nds32*-*-* } { }
- { pdp11-*-* } { }
- { tic30*-*-* } { }
- { tic4x*-*-* } { }
- { tic54x*-*-* } { }
- { xtensa*-*-* } { }
- { z80-*-* } { }
+switch -glob $target_triplet {
+ alpha*-*-* { }
+ am3*-*-* { }
+ cr16*-*-* { }
+ crx*-*-* { }
+ h8300-*-* { }
+ mips*-*-* { }
+ mn10200-*-* { }
+ mn10300-*-* { }
+ msp430*-*-* { }
+ nds32*-*-* { }
+ pdp11-*-* { }
+ tic30*-*-* { }
+ tic4x*-*-* { }
+ tic54x*-*-* { }
+ xtensa*-*-* { }
+ z80-*-* { }
default {
run_dump_test redef
# These targets fail redef2 because they disallow redefined
setup_xfail "m68hc1*-*-*" "m6811-*-*" "m6812-*-*" "rl78-*-*"
setup_xfail "riscv*-*-*" "rx-*-*" "vax*-*-*" "xgate*-*-*" "z8k-*-*"
# rs6000-aix disallows redefinition via .comm.
- setup_xfail "*-*-aix*"
+ if [is_xcoff_format] {
+ setup_xfail *-*-*
+ }
# These targets fail redef3 because section contents for the
# word referencing the .comm sym is not zero and/or its reloc
# has a non-zero addend. Relaxing the test would hide real
# ".struct" and ".align" have different meanings on c54x
# These directives are done in the c54x-specific tests instead
-case $target_triplet in {
- { hppa*-*-* } { }
- { *c4x*-*-* } { }
- { *c54x*-*-* } { }
+switch -glob $target_triplet {
+ hppa*-*-* { }
+ *c4x*-*-* { }
+ *c54x*-*-* { }
default {
run_dump_test struct
run_dump_test align
}
# '<' and '>' appear to have special meanings on the excluded targets
-case $target_triplet in {
- { frv-*-* } { }
- { hppa*-*-* } { }
- { m32r-*-* } { }
- { mmix-*-* } { }
- { *c4x*-*-* } { }
- { *c54x*-*-* } { }
- { bfin-*-* } { }
+switch -glob $target_triplet {
+ frv-*-* { }
+ hppa*-*-* { }
+ m32r-*-* { }
+ mmix-*-* { }
+ *c4x*-*-* { }
+ *c54x*-*-* { }
+ bfin-*-* { }
default {
run_dump_test altmacro
# The second test is valid only when '!' is not a comment
global subdir
set testname "conditional listings"
+ if { [istarget "pdp11-*-*"] } then {
+ set listing "cond-pdp11.l"
+ } else {
+ set listing "cond.l"
+ }
gas_run cond.s "-alc" ">dump.out"
if ![string match "" $comp_output] {
send_log "$comp_output\n"
fail $testname
} else {
- if { [regexp_diff dump.out $srcdir/$subdir/cond.l] } {
+ if { [regexp_diff dump.out $srcdir/$subdir/$listing] } {
fail $testname
} else {
pass $testname
# not limited to the fact that it depends on specific section
# names appearing in the output file.
# Again, p2align doesn't work on c54x and related targets.
-case $target_triplet in {
- { alpha-*-linux*ecoff} { }
- { alpha-*-osf*} { }
- { hppa*-*-* } { }
- { *c4x*-*-* } { }
- { *c54x*-*-* } { }
- { rl78-*-* } { }
- { rx-*-* } { }
+switch -glob $target_triplet {
+ alpha-*-linux*ecoff { }
+ alpha-*-osf* { }
+ hppa*-*-* { }
+ *c4x*-*-* { }
+ *c54x*-*-* { }
+ rl78-*-* { }
+ rx-*-* { }
default {
test_cond
remote_download host "$srcdir/$subdir/incbin.dat"
}
}
+# Various targets use too custom handling to be able to sensibly create
+# common expecations for this test. Also .equ works differently on some
+# targets.
+if { ![istarget avr-*-*]
+ && ![istarget bfin-*-*]
+ && ![istarget cris*-*-*]
+ && ![istarget dlx-*-*]
+ && ![istarget hppa*-*-*]
+ && ![istarget m68k-*-*]
+ && ![istarget nios2-*-*]
+ && ![istarget pj-*-*]
+ && ![istarget sh*-*-*]
+ && ![istarget *c4x-*-*]
+ && ![istarget *c54x-*-*]
+ && ![istarget *c6x-*-*]
+ && ![istarget z80-*-*] } then {
+ # Some further targets' custom handling fails to recognize the overflows.
+ setup_xfail "crx-*-*" "h8300-*-*" "mcore-*-*" "mn10200-*-*" "mn10300-*-*" "msp430-*-*" "ns32k-*-*"
+ run_list_test "overflow"
+}
+
if { ([istarget "i*86-*-*pe*"] && ![istarget "i*86-*-openbsd*"]) \
|| [istarget "i*86-*-cygwin*"] \
|| [istarget "i*86-*-mingw32*"] } {
run_dump_test relax
}
-# powerpc and s390 allow a string argument to .byte
-if { ![istarget "powerpc*-*-*"] && ![istarget "rs6000*-*-*"] && ![istarget "s390*-*-*"] } {
- run_dump_test byte
-}
-
run_dump_test quad
-run_dump_test octa
+
+# poor little PDP-11 can't handle 16-byte values
+if { ![istarget "pdp11-*-*"] } {
+ run_dump_test octa
+}
# .set works differently on some targets.
-case $target_triplet in {
- { alpha*-*-* } { }
- { mips*-*-* } { }
- { *c54x*-*-* } { }
- { z80-*-* } { }
+switch -glob $target_triplet {
+ alpha*-*-* { }
+ mips*-*-* { }
+ *c54x*-*-* { }
+ z80-*-* { }
default {
run_dump_test weakref1
run_dump_test weakref1g
dg-finish
# Set $nop_type appropriately to indicate the NOP instruction mnemonic.
-case $target_triplet in {
- { "mmix-*-*" } {
+# Note - this code is made obsolete by the new .nops pseudo-op.
+switch -glob $target_triplet {
+ bpf-*-* {
+ set nop_type 6
+ }
+ mmix-*-* {
set nop_type 5
}
- { "or1k*-*-*" } {
+ or1k*-*-* {
set nop_type 2
}
- { "ia64-*-*" } {
+ ia64-*-* {
set nop_type 1
}
default {
run_dump_test "fill-1"
gas_test "pr23938.s" "" "" ".xstabs"
+
+run_dump_test "nop"
+run_dump_test "asciz"
+run_dump_test "pr27384"
+run_dump_test "pr27381"