[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 04/14: Add a test for local forward and backward jumps
From: |
Andy Wingo |
Subject: |
[Guile-commits] 04/14: Add a test for local forward and backward jumps |
Date: |
Fri, 12 Jun 2020 10:18:42 -0400 (EDT) |
wingo pushed a commit to branch master
in repository guile.
commit 1656fc1d81e7e2978edd3438c4390de6f95c471b
Author: Icecream95 <ixn@keemail.me>
AuthorDate: Thu Apr 9 17:31:25 2020 +1200
Add a test for local forward and backward jumps
---
tests/jmpi_local.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/tests/jmpi_local.c b/tests/jmpi_local.c
new file mode 100644
index 0000000..49e4507
--- /dev/null
+++ b/tests/jmpi_local.c
@@ -0,0 +1,25 @@
+#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_reloc_t r = jit_jmp (j);
+ jit_reti (j, 0);
+ jit_pointer_t addr = jit_address (j);
+ jit_reti (j, 1);
+ jit_patch_here (j, r);
+ jit_jmpi (j, addr);
+ jit_reti (j, 2);
+
+ int (*f)(void) = jit_end(j, NULL);
+
+ ASSERT(f() == 1);
+}
+
+int
+main (int argc, char *argv[])
+{
+ return main_helper(argc, argv, run_test);
+}
- [Guile-commits] branch master updated (fc13923 -> 3c32704), Andy Wingo, 2020/06/12
- [Guile-commits] 01/14: Switch CI to use Debian stable, Andy Wingo, 2020/06/12
- [Guile-commits] 02/14: Add flag bits to the jit_reloc_kind enum, Andy Wingo, 2020/06/12
- [Guile-commits] 05/14: Use an rsh of 0 for jumps on ARM, Andy Wingo, 2020/06/12
- [Guile-commits] 06/14: Return a function pointer from jit_address, Andy Wingo, 2020/06/12
- [Guile-commits] 08/14: Use bx instead of mov for jumps on ARM, Andy Wingo, 2020/06/12
- [Guile-commits] 09/14: Remove T2_BLXI, Andy Wingo, 2020/06/12
- [Guile-commits] 03/14: Add separate functions for veneer patching, Andy Wingo, 2020/06/12
- [Guile-commits] 04/14: Add a test for local forward and backward jumps,
Andy Wingo <=
- [Guile-commits] 07/14: Stop setting the thumb bit except on jumps to veneers, Andy Wingo, 2020/06/12
- [Guile-commits] 12/14: Add CI jobs for ARM in both instruction sets, Andy Wingo, 2020/06/12
- [Guile-commits] 11/14: Convert BLI to BLXI for jumps to ARM code, Andy Wingo, 2020/06/12
- [Guile-commits] 14/14: Update lightening, Andy Wingo, 2020/06/12
- [Guile-commits] 10/14: Always emit veneers for non-bl jumps to ARM code, Andy Wingo, 2020/06/12
- [Guile-commits] 13/14: Merge branch 'arm-fix' into 'master', Andy Wingo, 2020/06/12