mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
tests/tcg: add float_madds test to multiarch
This is a generic floating point multiply and accumulate test for single precision floating point values. I've split of the common float functions into a helper library so additional tests can use the same common code. As I don't have references for all architectures I've allowed some flexibility for tests to pass without reference files. They can be added as we get collect them. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
149911cff7
commit
a4f3ed629e
8 changed files with 1918 additions and 1 deletions
26
tests/tcg/multiarch/float_helpers.h
Normal file
26
tests/tcg/multiarch/float_helpers.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Common Float Helpers
|
||||
*
|
||||
* Copyright (c) 2019 Linaro
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
/* Number of constants in each table */
|
||||
int get_num_f16(void);
|
||||
int get_num_f32(void);
|
||||
int get_num_f64(void);
|
||||
|
||||
/* Accessor helpers, overflows will automatically wrap */
|
||||
uint16_t get_f16(int i); /* use _Float16 when we can */
|
||||
float get_f32(int i);
|
||||
double get_f64(int i);
|
||||
|
||||
/* Return format strings, free after use */
|
||||
char * fmt_f16(uint16_t);
|
||||
char * fmt_f32(float);
|
||||
char * fmt_f64(double);
|
||||
/* exception flags */
|
||||
char * fmt_flags(void);
|
Loading…
Add table
Add a link
Reference in a new issue