fp-test fixes
cover fp-test fixes
Fix the issues reported by Peter in this thread:
https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg04135.html
The most important fix is in patch 4 -- I forgot to include config-host.h from platform.h! Thanks to Alex for pointing out on IRC that LITTLEENDIAN was not consistently defined, that was the hint I needed to find the problem.
This series applies on top of Alex's fpu/next branch. With them, `make check-softfloat' works on both little and big endian hosts.
Thanks,
Emilio
PATCH 1/4 berkeley-testfloat-3: pull 'fail: constify fail_programName'
Pull just one change: 5a59dce ("fail: constify fail_programName", 2019-01-17).
This gets rid of a warning when building fp-test on some hosts, e.g.:
/var/tmp/qemu-test.Z0AmK8/tests/fp/berkeley-testfloat-3/source/fail.c:44:7:
warning: initializing 'char *' with an expression of type 'const char [1]' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
char *fail_programName = "";
^ ~~
--- tests/fp/berkeley-testfloat-3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/fp/berkeley-testfloat-3 +1 -1
@@ -1 +1 @@ -Subproject commit ca9fa2ba05625ba929958f163b01747e07dd39cc +Subproject commit 5a59dcec19327396a011a17fd924aed4fec416b3
Signature · 1 line
2.17.1
PATCH 2/4 tests/fp/Makefile: do not use gcc-only -W flags
In reply to Emilio G. CotaThe build of testfloat objects now completes with both gcc and clang.
--- tests/fp/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
tests/fp/Makefile +1 -2
@@ -65,8 +65,7 @@ QEMU_CFLAGS += $(TF_OPTS) TF_CFLAGS := TF_CFLAGS += -Wno-strict-prototypes TF_CFLAGS += -Wno-unknown-pragmas -TF_CFLAGS += -Wno-discarded-qualifiers -TF_CFLAGS += -Wno-maybe-uninitialized +TF_CFLAGS += -Wno-uninitialized TF_CFLAGS += -Wno-missing-prototypes TF_CFLAGS += -Wno-return-type TF_CFLAGS += -Wno-unused-function
Signature · 1 line
2.17.1
PATCH 3/4 fp-test: fix signature of slow_clear_flags and qemu_clear_flags
In reply to Emilio G. CotaTo match the type in testfloat.
--- tests/fp/fp-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tests/fp/fp-test.c +2 -2
@@ -789,7 +789,7 @@ static int set_init_flags(const char *flags)return 0 ; } -static uint8_t slow_clear_flags (void ) +static uint_fast8_t slow_clear_flags (void ) {uint8_t prev = slowfloat_exceptionFlags;
@@ -797,7 +797,7 @@ static uint8_t slow_clear_flags(void)return prev; } -static uint8_t qemu_clear_flags (void ) +static uint_fast8_t qemu_clear_flags (void ) {uint8_t prev =qemu_flags_to_sf (qsf.float_exception_flags);
Signature · 1 line
2.17.1
PATCH 4/4 tests/fp/platform.h: include config-host.h
In reply to Emilio G. CotaWe get HOST_WORDS_BIGENDIAN from config-host.h, but the include is missing. Fix it.
This fixes `make check-softfloat' on big endian hosts.
--- tests/fp/platform.h | 1 + 1 file changed, 1 insertion(+)
tests/fp/platform.h +1 -0
@@ -29,6 +29,7 @@* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "config-host.h" #ifndef HOST_WORDS_BIGENDIAN #define LITTLEENDIAN 1
Signature · 1 line
2.17.1