bfd:
[deliverable/binutils-gdb.git] / gas / testsuite / gas / all / gas.exp
index c5fbe75427f0b9f69d973de612f5bab5f754bbb1..081c4183bedfc8979773028110186ce6236c6edc 100644 (file)
@@ -16,7 +16,10 @@ gas_test "p2425.s" ""   "" "pcrel values in assignment"
 # The ".space" directive is taken care of in the C54x-specific tests, so fail
 #  here 
 #
-if { [istarget hppa*-*-*] || [istarget *c54x*-*-*] } then {
+# The test also doesn't work on mep targets, since they use RELC, and it
+# will avoid simplifying the expression since it conservatively assumes
+# ugly expressions can be saved until link-time.
+if { [istarget hppa*-*-*] || [istarget *c54x*-*-*] || [istarget mep*-*-*]} then {
     setup_xfail *-*-*
     fail "simplifiable double subtraction"
 } else {
@@ -57,6 +60,7 @@ gas_test_error "assign-bad.s" "" "== assignment for symbol already set"
 # .equ works differently on some targets.
 # linkrelax-ing prevents most forward references from working.
 case $target_triplet in {
+    { cr16*-*-* } { }
     { crx*-*-* } { }
     { h8300*-*-* } { }
     { hppa*-*-* } { }
@@ -74,13 +78,29 @@ case $target_triplet in {
 # .set works differently on some targets.
 case $target_triplet in {
     { alpha*-*-* } { }
-    { iq2000*-*-* } { }
     { mips*-*-* } { }
     { *c54x*-*-* } { }
     { z80-*-* } { }
     default {
        setup_xfail "*c30*-*-*" "*c4x*-*-*" "pdp11-*-*"
        run_dump_test redef
+       # The next two tests can fail if the target does not convert fixups
+       # against ordinary symbols into relocations against section symbols.
+       # This is usually revealed by the error message:
+       #  symbol `sym' required but not present
+       setup_xfail "*c30*-*-*" "*c4x*-*-*" "*arm*-*-*aout*" "*arm*-*-*coff" \
+           "*arm*-*-pe" "crx*-*-*" "h8300*-*-*" "m68hc*-*-*" "maxq-*-*" \
+           "mn10300-*-*" "pdp11-*-*" "vax*-*-*" "z8k-*-*" "cr16-*-*"
+       run_dump_test redef2
+       setup_xfail "*-*-aix*" "*-*-coff" "*-*-cygwin" "*-*-mingw*" "*-*-pe*" \
+           "bfin-*-*" "*c4x*-*-*" "crx*-*-*" "h8300*-*-*" "hppa*-*-hpux*" \
+           "m68hc*-*-*" "maxq-*-*" "mn10300-*-*" "or32-*-*" "pdp11-*-*" \
+           "vax*-*-*" "z8k-*-*" "cr16-*-*"
+       run_dump_test redef3
+       setup_xfail "*c4x*-*-*"
+       gas_test_error "redef4.s" "" ".set for symbol already used as label"
+       setup_xfail "*c4x*-*-*"
+       gas_test_error "redef5.s" "" ".set for symbol already defined through .comm"
     }
 }
 
@@ -97,7 +117,7 @@ proc do_comment {} {
        expect {
            -re "^ +1\[ \t\]+# This\[^\n\]*\n"          { set x1 1 }
            -re "^ +2\[ \t\]+# correctly\[^\n\]*\n"     { set x2 1 }
-           -re "^ +3\[ \t\]+/. C comments too. ./\r?\n" { set x3 1 }
+           -re "^ +3\[ \t\]+/. C comments too. ./\r?\r?\n" { set x3 1 }
            -re "\[^\n\]*\n"                            { }
            timeout                             { perror "timeout\n"; break }
            eof                                 { break }
@@ -135,12 +155,13 @@ proc do_930509a {} {
     if !$x then { fail $testname }
 }
 
-# This test is meaningless for the PA and CRX; the difference of two symbols
-# must not be resolved by the assembler.
+# This test is meaningless for the PA and CR16/CRX: the difference of two
+# symbols cannot be resolved by the assembler.
 # C54x assembler (for compatibility) does not allow differences between
-# forward references
+# forward references.
 # C30 counts a four byte offset as a difference of one.
 if { ![istarget hppa*-*-*] &&
+     ![istarget cr16*-*-*] &&
      ![istarget  crx*-*-*] &&
      ![istarget *c30*-*-*] &&
      ![istarget *c4x*-*-*] &&
@@ -189,14 +210,14 @@ 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
-# 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]) \
+if {   ([istarget *-*-coff*] && ![istarget *arm*-*-coff] && ![istarget thumb*-*-coff] && ![istarget xscale-*-coff] && ![istarget *c4x*-*-coff] && ![istarget *c54x*-*-coff]) \
      ||([istarget *-*-pe*] && ![istarget arm*-*-pe*] && ![istarget thumb*-*-pe*]) \
      || [istarget i*86-*-aix*] \
      || [istarget i*86-*-sco*] \
      || [istarget i*86-*-isc*] \
      || [istarget i*86-*-go32*] \
      || [istarget i*86-*-cygwin*] \
+     || [istarget x86_64-*-mingw*] \
      || [istarget i*86-*-*nt] \
      || [istarget i*86-*-interix*] \
      || ([istarget i960-*-vxworks5.*] && ![istarget i960-*-vxworks5.0*]) } {
@@ -233,6 +254,7 @@ case $target_triplet in {
     { *c54x*-*-* } { }
     default {
         test_cond
+       remote_download host "$srcdir/$subdir/incbin.dat"
         run_dump_test incbin
     }
 }
@@ -246,6 +268,11 @@ if {  ([istarget "i*86-*-*pe*"] && ![istarget "i*86-*-openbsd*"]) \
 run_dump_test assign
 run_dump_test sleb128
 
+# .byte is 32 bits on tic4x, and .p2align isn't supported on tic54x
+if { ![istarget "tic4x*-*-*"] && ![istarget "tic54x*-*-*"] } {
+    run_dump_test relax
+}
+
 # .quad is 16 bytes on i960.
 if { ![istarget "i960-*-*"] } {
     run_dump_test quad
@@ -254,22 +281,21 @@ if { ![istarget "i960-*-*"] } {
 
 # .set works differently on some targets.
 case $target_triplet in {
+    { alpha*-*-* } { }
+    { mips*-*-* } { }
+    { *c54x*-*-* } { }
     { z80-*-* } { }
     default {
-       setup_xfail cris-*-* mmix-*-*
        run_dump_test weakref1
-       setup_xfail cris-*-* mmix-*-*
        run_dump_test weakref1g
-       setup_xfail cris-*-* mmix-*-*
        run_dump_test weakref1l
-       setup_xfail cris-*-* mmix-*-*
        run_dump_test weakref1u
-       setup_xfail cris-*-* mmix-*-*
        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"
+gas_test_error "weakref4.s" "" "is already defined"
 
 load_lib gas-dg.exp
 dg-init
This page took 0.05542 seconds and 4 git commands to generate.