-# Copyright 2003, 2007-2012 Free Software Foundation, Inc.
+# Copyright 2003-2017 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
# This file is part of the gdb testsuite.
-if $tracelevel {
- strace $tracelevel
-}
-
#
# Test floating-point related functionality.
#
-if { [prepare_for_testing float.exp float float.c] } {
+if { [prepare_for_testing "failed to prepare" float float.c] } {
return -1
}
# Test "info float".
-if { [istarget "alpha*-*-*"] } then {
+if { [is_aarch64_target] } then {
+ gdb_test "info float" "d0.*d1.*d31.*s0.*s1.*s31.*" "info float"
+} elseif { [istarget "alpha*-*-*"] } then {
gdb_test "info float" "f0.*" "info float"
-} elseif { [istarget "arm*-*-*"] } then {
+} elseif { [is_aarch32_target] } then {
gdb_test_multiple "info float" "info float" {
-re "Software FPU type.*mask:.*flags:.*$gdb_prompt $" {
pass "info float (FPA)"
# if we have NEON.
pass "info float (VFP)"
}
- -re "No floating.point info available for this processor.*" {
+ -re "No floating.point info available for this processor.*$gdb_prompt $" {
pass "info float (without FPU)"
}
}
-re "fp0.*fp1.*fp7.*$gdb_prompt $" {
pass "info float (with FPU)"
}
- -re "No floating.point info available for this processor.*" {
+ -re "No floating.point info available for this processor.*$gdb_prompt $" {
pass "info float (without FPU)"
}
}
} elseif [istarget "mips*-*-*"] then {
- gdb_test "info float" "f0:.*flt:.*dbl:.*" "info float"
+ gdb_test_multiple "info float" "info float" {
+ -re "fpu type: none / unused\r\n$gdb_prompt $" {
+ pass "info float (without FPU)"
+ }
+ -re "fpu type:.*cause.*mask.*flags.*round.*flush.*f0:.*flt:.*dbl:.*$gdb_prompt $" {
+ pass "info float (with FPU)"
+ }
+ }
+} elseif [istarget "nds32*-*-*"] then {
+ gdb_test_multiple "info float" "info_float" {
+ -re "fd0.*fd3.*$gdb_prompt $" {
+ pass "info float (with FPU)"
+ }
+ -re "No floating.point info available for this processor.*$gdb_prompt $" {
+ pass "info float (without FPU)"
+ }
+ }
} elseif [istarget "powerpc*-*-*"] then {
gdb_test_multiple "info float" "info_float" {
-re "f0.*f1.*f31.*fpscr.*$gdb_prompt $" {
pass "info float (with FPU)"
}
- -re "No floating.point info available for this processor.*" {
+ -re "No floating.point info available for this processor.*$gdb_prompt $" {
pass "info float (without FPU)"
}
}
-re "fpul.*fr0.*fr1.*fr15.*$gdb_prompt $" {
pass "info float (with FPU)"
}
- -re "No floating.point info available for this processor.*" {
+ -re "No floating.point info available for this processor.*$gdb_prompt $" {
pass "info float (without FPU)"
}
}