[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 73/86: Add movi_[df] tests
From: |
Andy Wingo |
Subject: |
[Guile-commits] 73/86: Add movi_[df] tests |
Date: |
Wed, 3 Apr 2019 11:39:03 -0400 (EDT) |
wingo pushed a commit to branch lightening
in repository guile.
commit 40ebd5de44dffc715344d8fbe294b5db2aa7b682
Author: Andy Wingo <address@hidden>
Date: Tue Mar 26 22:34:04 2019 +0100
Add movi_[df] tests
---
tests/movi_d.c | 20 ++++++++++++++++++++
tests/movi_f.c | 20 ++++++++++++++++++++
2 files changed, 40 insertions(+)
diff --git a/tests/movi_d.c b/tests/movi_d.c
new file mode 100644
index 0000000..58ec949
--- /dev/null
+++ b/tests/movi_d.c
@@ -0,0 +1,20 @@
+#include "test.h"
+
+static void
+run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size)
+{
+ jit_begin(j, arena_base, arena_size);
+
+ jit_movi_d(j, JIT_F0, 3.14159);
+ jit_retr_d(j, JIT_F0);
+
+ double (*f)(void) = jit_end(j, NULL);
+
+ ASSERT(f() == 3.14159);
+}
+
+int
+main (int argc, char *argv[])
+{
+ return main_helper(argc, argv, run_test);
+}
diff --git a/tests/movi_f.c b/tests/movi_f.c
new file mode 100644
index 0000000..0b92f92
--- /dev/null
+++ b/tests/movi_f.c
@@ -0,0 +1,20 @@
+#include "test.h"
+
+static void
+run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size)
+{
+ jit_begin(j, arena_base, arena_size);
+
+ jit_movi_f(j, JIT_F0, 3.14159f);
+ jit_retr_f(j, JIT_F0);
+
+ float (*f)(void) = jit_end(j, NULL);
+
+ ASSERT(f() == 3.14159f);
+}
+
+int
+main (int argc, char *argv[])
+{
+ return main_helper(argc, argv, run_test);
+}
- [Guile-commits] 57/86: Fix stxi_d bug, (continued)
- [Guile-commits] 57/86: Fix stxi_d bug, Andy Wingo, 2019/04/03
- [Guile-commits] 49/86: Add ldxr tests, Andy Wingo, 2019/04/03
- [Guile-commits] 61/86: Add int/int reg/imm compare-and-branch tests, Andy Wingo, 2019/04/03
- [Guile-commits] 63/86: Add unordered float compare-and-branch tests, Andy Wingo, 2019/04/03
- [Guile-commits] 53/86: Add stxr tests, Andy Wingo, 2019/04/03
- [Guile-commits] 56/86: Tweak test build to run faster, and adapt CI, Andy Wingo, 2019/04/03
- [Guile-commits] 40/86: Add bitops tests, Andy Wingo, 2019/04/03
- [Guile-commits] 78/86: Clean up stack after calls, Andy Wingo, 2019/04/03
- [Guile-commits] 75/86: get_temp_{gpr, xpr} returns a jit_{gpr, fpr}_t, Andy Wingo, 2019/04/03
- [Guile-commits] 66/86: Add sub-and-branch-on-overflow tests, Andy Wingo, 2019/04/03
- [Guile-commits] 73/86: Add movi_[df] tests,
Andy Wingo <=
- [Guile-commits] 64/86: Add flag-checking test-and-branch tests, Andy Wingo, 2019/04/03
- [Guile-commits] 69/86: Add abs/sqrt tests, Andy Wingo, 2019/04/03
- [Guile-commits] 67/86: Add some nop and jmp tests, and fix a hazard with jmpi/calli, Andy Wingo, 2019/04/03
- [Guile-commits] 62/86: Add anti-float comparison tests, Andy Wingo, 2019/04/03
- [Guile-commits] 51/86: Add str tests, Andy Wingo, 2019/04/03
- [Guile-commits] 58/86: Add bltr test, Andy Wingo, 2019/04/03
- [Guile-commits] 65/86: Add add-and-branch-on-overflow tests, Andy Wingo, 2019/04/03
- [Guile-commits] 59/86: Add more integer reg/reg branch-and-compare tests, Andy Wingo, 2019/04/03
- [Guile-commits] 80/86: Add subdir-objects option to libguile makefile., Andy Wingo, 2019/04/03
- [Guile-commits] 82/86: Merge in changes from upstream lightening, Andy Wingo, 2019/04/03