In some bare-metal environments, the tests for fp16 runtime support fail
in a way that causes a timeout rather than immediate failure. (E.g.,
the runtime might provide a do-nothing exception handler that just sits
in a tight loop and never returns.) This patch changes the
effective-target tests for fp16 hardware support to cache the result of
the test so that we don't have to do this more than once. I think it
was probably just an oversight that it wasn't done this way originally,
since the target is hardly likely to sprout fp16 instruction support
midway through the test run anyway. ;-) Anyway, test results are the
same with this patch, they just run faster. OK to commit?
-Sandra
2019-09-13 Sandra Loosemore <san...@codesourcery.com>
gcc/testsuite/
* lib/target-supports.exp
(check_effective_target_arm_neon_fp16_hw)
(check_effective_target_arm_fp16_hw): Use check_runtime
instead of check_runtime_nocache.
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp (revision 275699)
+++ gcc/testsuite/lib/target-supports.exp (working copy)
@@ -3909,7 +3909,7 @@ proc check_effective_target_arm_neon_fp1
return 0
}
global et_arm_neon_fp16_flags
- check_runtime_nocache arm_neon_fp16_hw {
+ check_runtime arm_neon_fp16_hw {
int
main (int argc, char **argv)
{
@@ -4162,7 +4162,7 @@ proc check_effective_target_arm_fp16_hw
return 0
}
global et_arm_fp16_flags
- check_runtime_nocache arm_fp16_hw {
+ check_runtime arm_fp16_hw {
int
main (int argc, char **argv)
{