aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-08-12 10:21:24 +0930
committerAlan Modra <amodra@gmail.com>2021-08-12 10:51:31 +0930
commit6e425ff4bfa87ef02f88334262f71a964673dfa7 (patch)
tree3e5c84c25cb61ed6fd171e4a2b31a55d7fb3b455
parentcf5671b1468c31d2715e152fba0609909685a056 (diff)
downloadbinutils-6e425ff4bfa87ef02f88334262f71a964673dfa7.zip
binutils-6e425ff4bfa87ef02f88334262f71a964673dfa7.tar.gz
binutils-6e425ff4bfa87ef02f88334262f71a964673dfa7.tar.bz2
Re: gas: support NaN flavors
Fixes tic4x-coff FAIL: simple FP constants * testsuite/gas/all/float.s: Make NaN tests conditional on hasnan. * testsuite/gas/all/gas.exp: Define hasnan.
-rw-r--r--gas/testsuite/gas/all/float.s4
-rw-r--r--gas/testsuite/gas/all/gas.exp7
2 files changed, 10 insertions, 1 deletions
diff --git a/gas/testsuite/gas/all/float.s b/gas/testsuite/gas/all/float.s
index f401ed3..a84222c 100644
--- a/gas/testsuite/gas/all/float.s
+++ b/gas/testsuite/gas/all/float.s
@@ -8,9 +8,11 @@ foo: .single 0r1.2345e+06
.dc.s 1
.dc.s 0f:1234
.dc.s Inf
+ .ifdef hasnan
.dc.s NaN
.dc.s QNaN
.dc.s SNaN
+ .endif
.dcb.s 1
.dcb.s 1, 1
.dcb.s 1, 0s:4321
@@ -19,9 +21,11 @@ foo: .single 0r1.2345e+06
.dc.d 1
.dc.d 0d:1234
.dc.d +Inf
+ .ifdef hasnan
.dc.d -NaN
.dc.d +QNaN
.dc.d -SNaN
+ .endif
.dcb.d 1
.dcb.d 1, 1
.dcb.d 1, 0r:4321
diff --git a/gas/testsuite/gas/all/gas.exp b/gas/testsuite/gas/all/gas.exp
index 389634f..e490d1f 100644
--- a/gas/testsuite/gas/all/gas.exp
+++ b/gas/testsuite/gas/all/gas.exp
@@ -45,7 +45,12 @@ if { [istarget hppa*-*-*] || [istarget *c54x*-*-*] || [istarget mep*-*-*]} 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"
+ if { [istarget tic4x-*-*] } then {
+ set as_opt ""
+ } else {
+ set as_opt "--defsym hasnan=1"
+ }
+ gas_test "float.s" $as_opt "" "simple FP constants"
}
# This test is meaningless for the PA; the difference of two undefined