[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 21/46] tests/tcg/i386: fix test-i386-fprem
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PATCH v3 21/46] tests/tcg/i386: fix test-i386-fprem |
Date: |
Tue, 24 Apr 2018 16:23:40 +0100 |
Remove dependencies on QEMU's source tree and build directly.
Signed-off-by: Alex Bennée <address@hidden>
---
tests/tcg/i386/test-i386-fprem.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tests/tcg/i386/test-i386-fprem.c b/tests/tcg/i386/test-i386-fprem.c
index 1a71623204..66f5a9657d 100644
--- a/tests/tcg/i386/test-i386-fprem.c
+++ b/tests/tcg/i386/test-i386-fprem.c
@@ -23,7 +23,10 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "qemu/osdep.h"
+#include <stdio.h>
+#include <stdint.h>
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
/*
* Inspired by <ieee754.h>'s union ieee854_long_double, but with single
@@ -39,7 +42,7 @@ union float80u {
unsigned int exponent:15;
unsigned int negative:1;
unsigned int empty:16;
- } QEMU_PACKED ieee;
+ } __attribute__((packed)) ieee;
/* This is for NaNs in the IEEE 854 double-extended-precision format. */
struct {
@@ -49,7 +52,7 @@ union float80u {
unsigned int exponent:15;
unsigned int negative:1;
unsigned int empty:16;
- } QEMU_PACKED ieee_nan;
+ } __attribute__((packed)) ieee_nan;
};
#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
@@ -229,6 +232,7 @@ static void test_fprem_cases(void)
do_fprem_stack_underflow();
printf("= invalid operation =\n");
+ do_fprem(q_nan.d, 1.0);
do_fprem(s_nan.d, 1.0);
do_fprem(1.0, 0.0);
do_fprem(pos_inf.d, 1.0);
@@ -238,6 +242,8 @@ static void test_fprem_cases(void)
do_fprem(pos_denorm.d, 1.0);
do_fprem(1.0, pos_denorm.d);
+ do_fprem(smallest_positive_norm.d, smallest_positive_norm.d);
+
/* printf("= underflow =\n"); */
/* TODO: Is there a case where FPREM raises underflow? */
}
--
2.17.0
- [Qemu-devel] [PATCH v3 11/46] docker: Makefile.include introduce DOCKER_SCRIPT, (continued)
- [Qemu-devel] [PATCH v3 11/46] docker: Makefile.include introduce DOCKER_SCRIPT, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 08/46] docker: Add "cc" subcommand, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 10/46] docker: allow "cc" command to run in user context, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 34/46] tests/tcg: enable building for ppc64, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 12/46] tests/tcg: move architecture independent tests into subdir, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 33/46] tests/tcg: enable building for s390x, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 23/46] tests/tcg/x86_64: add Makefile.target, Alex Bennée, 2018/04/24
- [Qemu-devel] [PATCH v3 21/46] tests/tcg/i386: fix test-i386-fprem,
Alex Bennée <=
- [Qemu-devel] [PATCH v3 28/46] tests/tcg/aarch64: add Makefile.target, Alex Bennée, 2018/04/24
[Qemu-devel] [PATCH v3 16/46] tests/tcg: move i386 specific tests into subdir, Alex Bennée, 2018/04/24