[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 250/437: Add the new jit_pointer_p predicate interface.
From: |
Andy Wingo |
Subject: |
[Guile-commits] 250/437: Add the new jit_pointer_p predicate interface. |
Date: |
Mon, 2 Jul 2018 05:14:31 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 95e3fbc8bc674a3d9ab745ae9d0a8ff630016fdf
Author: pcpa <address@hidden>
Date: Sat Sep 14 14:43:05 2013 -0300
Add the new jit_pointer_p predicate interface.
* include/lightning.h, lib/lightning.c: Add the new
jit_pointer_p interface, that returns a boolean value
telling if the pointer argument is inside the jit
code buffer. This is useful to avoid the need to add
extra labels and calls to jit_address to figure bounds
of code buffer, and still keep internal data private.
---
ChangeLog | 9 +++++++++
include/lightning.h | 2 ++
lib/lightning.c | 7 +++++++
3 files changed, 18 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index ec642cc..892de2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-10-14 Paulo Andrade <address@hidden>
+
+ * include/lightning.h, lib/lightning.c: Add the new
+ jit_pointer_p interface, that returns a boolean value
+ telling if the pointer argument is inside the jit
+ code buffer. This is useful to avoid the need to add
+ extra labels and calls to jit_address to figure bounds
+ of code buffer, and still keep internal data private.
+
2013-10-13 Paulo Andrade <address@hidden>
* include/lightning.h, include/lightning/jit_private.h,
diff --git a/include/lightning.h b/include/lightning.h
index 3466c4a..561c559 100644
--- a/include/lightning.h
+++ b/include/lightning.h
@@ -953,6 +953,8 @@ extern jit_node_t *_jit_new_node_pwd(jit_state_t*,
jit_code_t,
#define jit_callee_save_p(u) _jit_callee_save_p(_jit,u)
extern jit_bool_t _jit_callee_save_p(jit_state_t*, jit_int32_t);
+#define jit_pointer_p(u) _jit_pointer_p(_jit,u)
+extern jit_bool_t _jit_pointer_p(jit_state_t*,jit_pointer_t);
#define jit_get_note(n,u,v,w) _jit_get_note(_jit,n,u,v,w)
extern jit_bool_t _jit_get_note(jit_state_t*,jit_pointer_t,char**,char**,int*);
diff --git a/lib/lightning.c b/lib/lightning.c
index 58e7130..817976c 100644
--- a/lib/lightning.c
+++ b/lib/lightning.c
@@ -337,6 +337,13 @@ _jit_callee_save_p(jit_state_t *_jit, jit_int32_t regno)
return (!!(_rvs[regno].spec & jit_class_sav));
}
+extern jit_bool_t
+_jit_pointer_p(jit_state_t *_jit, jit_pointer_t address)
+{
+ return ((jit_uint8_t *)address >= _jit->code.ptr &&
+ (jit_word_t)address < _jit->pc.w);
+}
+
#if __ia64__
void
jit_regset_com(jit_regset_t *u, jit_regset_t *v)
- [Guile-commits] 199/437: Correct wrong shift value for 32 bit, (continued)
- [Guile-commits] 199/437: Correct wrong shift value for 32 bit, Andy Wingo, 2018/07/02
- [Guile-commits] 294/437: Correct change of possibly wrong bitmask in jit_update, Andy Wingo, 2018/07/02
- [Guile-commits] 291/437: MIPS: Correct use of wrong test register, Andy Wingo, 2018/07/02
- [Guile-commits] 303/437: Only mark callee save regs as live on jumps that cannot be tracked., Andy Wingo, 2018/07/02
- [Guile-commits] 218/437: Build and pass all test cases on a multiprocessor HP-UX., Andy Wingo, 2018/07/02
- [Guile-commits] 285/437: GNU lightning 2.0.4 release, Andy Wingo, 2018/07/02
- [Guile-commits] 193/437: Make code and data buffer readonly., Andy Wingo, 2018/07/02
- [Guile-commits] 145/437: Add new test case for int/float to/from conversion., Andy Wingo, 2018/07/02
- [Guile-commits] 308/437: x86: Update instruction size information for Windows x64, Andy Wingo, 2018/07/02
- [Guile-commits] 313/437: Implement the jit_align interface, Andy Wingo, 2018/07/02
- [Guile-commits] 250/437: Add the new jit_pointer_p predicate interface.,
Andy Wingo <=
- [Guile-commits] 286/437: Do not export private definitions and types., Andy Wingo, 2018/07/02
- [Guile-commits] 147/437: Correct test cases in the mips backend., Andy Wingo, 2018/07/02
- [Guile-commits] 292/437: AARCH64: Correct assertion test, Andy Wingo, 2018/07/02
- [Guile-commits] 305/437: Consider all callee_save_p regs as live on non trackable jumps, Andy Wingo, 2018/07/02
- [Guile-commits] 40/437: checkin rewrite of i386 assembler, Andy Wingo, 2018/07/02
- [Guile-commits] 295/437: Always mark return registers as live in epilog, Andy Wingo, 2018/07/02
- [Guile-commits] 326/437: Actually install the pkgconfig file., Andy Wingo, 2018/07/02
- [Guile-commits] 325/437: misc: Create a pkg-config file, Andy Wingo, 2018/07/02
- [Guile-commits] 335/437: PPC: Add initial powerpc le support., Andy Wingo, 2018/07/02
- [Guile-commits] 272/437: x86: Correct wrong x87 float indexed store code generation., Andy Wingo, 2018/07/02