[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 44/86: Add mov_addr test
From: |
Andy Wingo |
Subject: |
[Guile-commits] 44/86: Add mov_addr test |
Date: |
Wed, 3 Apr 2019 11:38:56 -0400 (EDT) |
wingo pushed a commit to branch lightening
in repository guile.
commit 3acf10280bbe2d1527caae1e5d1fd60208d898d1
Author: Andy Wingo <address@hidden>
Date: Tue Mar 26 10:11:12 2019 +0100
Add mov_addr test
---
tests/mov_addr.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/tests/mov_addr.c b/tests/mov_addr.c
new file mode 100644
index 0000000..0d7d9e0
--- /dev/null
+++ b/tests/mov_addr.c
@@ -0,0 +1,23 @@
+#include "test.h"
+
+static uint64_t thing = 0x123456789abcdef0;
+
+static void
+run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size)
+{
+ jit_begin(j, arena_base, arena_size);
+
+ jit_patch_there(j, jit_mov_addr(j, JIT_R0), &thing);
+ jit_retr(j, JIT_R0);
+
+ void* (*f)(void) = jit_end(j, NULL);
+
+ ASSERT(f() == &thing);
+ ASSERT(*(uint64_t*)f() == thing);
+}
+
+int
+main (int argc, char *argv[])
+{
+ return main_helper(argc, argv, run_test);
+}
- [Guile-commits] 30/86: Add "addi" test, (continued)
- [Guile-commits] 30/86: Add "addi" test, Andy Wingo, 2019/04/03
- [Guile-commits] 31/86: Better loading of args to registers; add tests, Andy Wingo, 2019/04/03
- [Guile-commits] 26/86: Inline private.h into jit.c, Andy Wingo, 2019/04/03
- [Guile-commits] 32/86: Convert tests to jit_load_args, Andy Wingo, 2019/04/03
- [Guile-commits] 34/86: Add note about current status, Andy Wingo, 2019/04/03
- [Guile-commits] 14/86: Simplify file names, Andy Wingo, 2019/04/03
- [Guile-commits] 39/86: Add remr tests, Andy Wingo, 2019/04/03
- [Guile-commits] 37/86: Tests for some div operations, Andy Wingo, 2019/04/03
- [Guile-commits] 35/86: Add new tests, Andy Wingo, 2019/04/03
- [Guile-commits] 28/86: Beginnings of port of x86 to new design, Andy Wingo, 2019/04/03
- [Guile-commits] 44/86: Add mov_addr test,
Andy Wingo <=
- [Guile-commits] 38/86: Add more div tests, Andy Wingo, 2019/04/03
- [Guile-commits] 52/86: Add sti tests, Andy Wingo, 2019/04/03
- [Guile-commits] 47/86: Add ldr tests, Andy Wingo, 2019/04/03
- [Guile-commits] 46/86: Add bswap tests, and fix missing breaks in jit_load_args, Andy Wingo, 2019/04/03
- [Guile-commits] 50/86: Add ldxi tests, Andy Wingo, 2019/04/03
- [Guile-commits] 41/86: Add lsh/rsh tests, Andy Wingo, 2019/04/03
- [Guile-commits] 15/86: Remove unneeded bits of lightning, Andy Wingo, 2019/04/03
- [Guile-commits] 45/86: Add extr tests, Andy Wingo, 2019/04/03
- [Guile-commits] 42/86: Add comr/negr tests, Andy Wingo, 2019/04/03
- [Guile-commits] 55/86: Add .gitlab-ci.yml, Andy Wingo, 2019/04/03