mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-30 17:00:23 +02:00
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.
This commit is contained in:
parent
948315f45e
commit
95e3fbc8bc
3 changed files with 18 additions and 0 deletions
|
@ -1,3 +1,12 @@
|
|||
2013-10-14 Paulo Andrade <pcpa@gnu.org>
|
||||
|
||||
* 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 <pcpa@gnu.org>
|
||||
|
||||
* include/lightning.h, include/lightning/jit_private.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*);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue