From 93aafd3ceb1497fe757d8d0cabac69b6917e7bc6 Mon Sep 17 00:00:00 2001 From: Jacob Bramley Date: Thu, 16 Sep 2010 16:27:45 +0100 Subject: [PATCH] Remove dependency on Bash 3 regex support and simplify test selection for soft-float platforms. [Bug 535709] [r=nnethercote] --HG-- extra : convert_revision : 10432e19f751b78f39991b15e60686c7d78226bb --- js/src/lirasm/testlirc.sh | 26 ++++++++++++++------ js/src/lirasm/tests/{ => hardfloat}/d2i.in | 0 js/src/lirasm/tests/{ => hardfloat}/d2i.out | 0 js/src/lirasm/tests/{ => hardfloat}/f2i.in | 0 js/src/lirasm/tests/{ => hardfloat}/f2i.out | 0 js/src/lirasm/tests/{ => hardfloat}/i2d.in | 0 js/src/lirasm/tests/{ => hardfloat}/i2d.out | 0 js/src/lirasm/tests/{ => hardfloat}/ui2d.in | 0 js/src/lirasm/tests/{ => hardfloat}/ui2d.out | 0 9 files changed, 18 insertions(+), 8 deletions(-) rename js/src/lirasm/tests/{ => hardfloat}/d2i.in (100%) rename js/src/lirasm/tests/{ => hardfloat}/d2i.out (100%) rename js/src/lirasm/tests/{ => hardfloat}/f2i.in (100%) rename js/src/lirasm/tests/{ => hardfloat}/f2i.out (100%) rename js/src/lirasm/tests/{ => hardfloat}/i2d.in (100%) rename js/src/lirasm/tests/{ => hardfloat}/i2d.out (100%) rename js/src/lirasm/tests/{ => hardfloat}/ui2d.in (100%) rename js/src/lirasm/tests/{ => hardfloat}/ui2d.out (100%) diff --git a/js/src/lirasm/testlirc.sh b/js/src/lirasm/testlirc.sh index ba5829a3013f..523e23088103 100755 --- a/js/src/lirasm/testlirc.sh +++ b/js/src/lirasm/testlirc.sh @@ -44,6 +44,18 @@ done # ---- Platform-specific tests and configurations. ---- +# Tests for hardware floating-point. +# These tests use LIR instructions which are normally removed by the soft-float +# filter, so soft-float targets do not need to support them. +# +# There is no conditional check for hardfloat support as every platform appears +# to support it. If the default for a particular platform does not support +# hardfloat, exclude the hardfloat tests (based on something like "uname -m"). +for infile in "$TESTS_DIR"/hardfloat/*.in +do + runtest $infile +done + # 64-bit platforms if [[ $($LIRASM --word-size) == 64 ]] then @@ -72,17 +84,15 @@ then # a platform seems so unlikely that it probably isn't worthwhile. It's also # unlikely that it's worth testing ARMv5 with VFP. runtest $infile "--arch 6" - - # For --novfp, Skip tests that require hard floating-point. - # Note that these are also disabled in the --random test. The - # soft-float filter normally removes instructions that these tests use. - if [[ $infile =~ .*/(f2i|d2i|i2d|ui2d)\.in$ ]] - then - continue - fi runtest $infile "--arch 5 --novfp" done + for infile in "$TESTS_DIR"/hardfloat/*.in + do + # Run tests that require hardware floating-point. + runtest $infile "--arch 6" + done + # Run specific soft-float tests, but only for ARMv5 without VFP. # NOTE: It looks like MIPS ought to be able to run these tests, but I can't # test this and _not_ running them seems like the safest option. diff --git a/js/src/lirasm/tests/d2i.in b/js/src/lirasm/tests/hardfloat/d2i.in similarity index 100% rename from js/src/lirasm/tests/d2i.in rename to js/src/lirasm/tests/hardfloat/d2i.in diff --git a/js/src/lirasm/tests/d2i.out b/js/src/lirasm/tests/hardfloat/d2i.out similarity index 100% rename from js/src/lirasm/tests/d2i.out rename to js/src/lirasm/tests/hardfloat/d2i.out diff --git a/js/src/lirasm/tests/f2i.in b/js/src/lirasm/tests/hardfloat/f2i.in similarity index 100% rename from js/src/lirasm/tests/f2i.in rename to js/src/lirasm/tests/hardfloat/f2i.in diff --git a/js/src/lirasm/tests/f2i.out b/js/src/lirasm/tests/hardfloat/f2i.out similarity index 100% rename from js/src/lirasm/tests/f2i.out rename to js/src/lirasm/tests/hardfloat/f2i.out diff --git a/js/src/lirasm/tests/i2d.in b/js/src/lirasm/tests/hardfloat/i2d.in similarity index 100% rename from js/src/lirasm/tests/i2d.in rename to js/src/lirasm/tests/hardfloat/i2d.in diff --git a/js/src/lirasm/tests/i2d.out b/js/src/lirasm/tests/hardfloat/i2d.out similarity index 100% rename from js/src/lirasm/tests/i2d.out rename to js/src/lirasm/tests/hardfloat/i2d.out diff --git a/js/src/lirasm/tests/ui2d.in b/js/src/lirasm/tests/hardfloat/ui2d.in similarity index 100% rename from js/src/lirasm/tests/ui2d.in rename to js/src/lirasm/tests/hardfloat/ui2d.in diff --git a/js/src/lirasm/tests/ui2d.out b/js/src/lirasm/tests/hardfloat/ui2d.out similarity index 100% rename from js/src/lirasm/tests/ui2d.out rename to js/src/lirasm/tests/hardfloat/ui2d.out