[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 25/40] tests/tcg/s390x: Add long-double.c
From: |
Richard Henderson |
Subject: |
[PULL 25/40] tests/tcg/s390x: Add long-double.c |
Date: |
Sat, 4 Feb 2023 06:32:55 -1000 |
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tests/tcg/s390x/long-double.c | 24 ++++++++++++++++++++++++
tests/tcg/s390x/Makefile.target | 1 +
2 files changed, 25 insertions(+)
create mode 100644 tests/tcg/s390x/long-double.c
diff --git a/tests/tcg/s390x/long-double.c b/tests/tcg/s390x/long-double.c
new file mode 100644
index 0000000000..757a6262fd
--- /dev/null
+++ b/tests/tcg/s390x/long-double.c
@@ -0,0 +1,24 @@
+/*
+ * Perform some basic arithmetic with long double, as a sanity check.
+ * With small integral numbers, we can cross-check with integers.
+ */
+
+#include <assert.h>
+
+int main()
+{
+ int i, j;
+
+ for (i = 1; i < 5; i++) {
+ for (j = 1; j < 5; j++) {
+ long double la = (long double)i + j;
+ long double lm = (long double)i * j;
+ long double ls = (long double)i - j;
+
+ assert(la == i + j);
+ assert(lm == i * j);
+ assert(ls == i - j);
+ }
+ }
+ return 0;
+}
diff --git a/tests/tcg/s390x/Makefile.target b/tests/tcg/s390x/Makefile.target
index 79250f31dd..1d454270c0 100644
--- a/tests/tcg/s390x/Makefile.target
+++ b/tests/tcg/s390x/Makefile.target
@@ -26,6 +26,7 @@ TESTS+=branch-relative-long
TESTS+=noexec
TESTS+=div
TESTS+=clst
+TESTS+=long-double
Z13_TESTS=vistr
$(Z13_TESTS): CFLAGS+=-march=z13 -O2
--
2.34.1
- [PULL 04/40] tcg: Handle dh_typecode_i128 with TCG_CALL_{RET, ARG}_NORMAL, (continued)
- [PULL 04/40] tcg: Handle dh_typecode_i128 with TCG_CALL_{RET, ARG}_NORMAL, Richard Henderson, 2023/02/04
- [PULL 15/40] tcg: Add temp allocation for TCGv_i128, Richard Henderson, 2023/02/04
- [PULL 17/40] tcg: Add guest load/store primitives for TCGv_i128, Richard Henderson, 2023/02/04
- [PULL 18/40] tcg: Add tcg_gen_{non}atomic_cmpxchg_i128, Richard Henderson, 2023/02/04
- [PULL 20/40] target/arm: Use tcg_gen_atomic_cmpxchg_i128 for STXP, Richard Henderson, 2023/02/04
- [PULL 19/40] tcg: Split out tcg_gen_nonatomic_cmpxchg_i{32,64}, Richard Henderson, 2023/02/04
- [PULL 21/40] target/arm: Use tcg_gen_atomic_cmpxchg_i128 for CASP, Richard Henderson, 2023/02/04
- [PULL 22/40] target/ppc: Use tcg_gen_atomic_cmpxchg_i128 for STQCX, Richard Henderson, 2023/02/04
- [PULL 23/40] tests/tcg/s390x: Add div.c, Richard Henderson, 2023/02/04
- [PULL 24/40] tests/tcg/s390x: Add clst.c, Richard Henderson, 2023/02/04
- [PULL 25/40] tests/tcg/s390x: Add long-double.c,
Richard Henderson <=
- [PULL 26/40] tests/tcg/s390x: Add cdsg.c, Richard Henderson, 2023/02/04
- [PULL 27/40] target/s390x: Use a single return for helper_divs32/u32, Richard Henderson, 2023/02/04
- [PULL 28/40] target/s390x: Use a single return for helper_divs64/u64, Richard Henderson, 2023/02/04
- [PULL 29/40] target/s390x: Use Int128 for return from CLST, Richard Henderson, 2023/02/04
- [PULL 30/40] target/s390x: Use Int128 for return from CKSM, Richard Henderson, 2023/02/04
- [PULL 31/40] target/s390x: Use Int128 for return from TRE, Richard Henderson, 2023/02/04
- [PULL 32/40] target/s390x: Copy wout_x1 to wout_x1_P, Richard Henderson, 2023/02/04
- [PULL 33/40] target/s390x: Use Int128 for returning float128, Richard Henderson, 2023/02/04
- [PULL 35/40] target/s390x: Use tcg_gen_atomic_cmpxchg_i128 for CDSG, Richard Henderson, 2023/02/04
- [PULL 36/40] target/s390x: Implement CC_OP_NZ in gen_op_calc_cc, Richard Henderson, 2023/02/04