mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-21 19:20:21 +02:00
Add the jit_callee_save_p interface and extra register definitions.
* check/self.c, check/self.ok: New files implementing simple consistency check assertions. At first validating some macros that use values from different sources agree. * check/Makefile.am: Update for the new test case. * include/lightning.h, lib/lightning.c: Add the new jit_callee_save_p() call, that is intended to be used when writing complex code using lightning, so that one does not need to verify what backend is being used, or have access to private data, to query if a register is callee save or not; on several backends the scratch registers are actually callee save. * include/lightning/jit_aarch64.h, include/lightning/jit_arm.h, include/lightning/jit_hppa.h, include/lightning/jit_mips.h, include/lightning/jit_ppc.h, include/lightning/jit_sparc.h, include/lightning/jit_x86.h: Add an explicit definition for JIT_R3-JIT_Rn, JIT_V3-JIT_Vn and JIT_F6-JIT_Fn when applicable. This allows one to write code based on "#if defined(JIT_XN)" and therefore, not need to check what is the current backend or have access to private data structures. This is particularly useful when writing virtual machines with several specialized, global registers. * lib/jit_ia64.c: Properly flag the callee save general purpose registers as such, so that jit_callee_save_p() works as intended.
This commit is contained in:
parent
15a3ec2567
commit
a62f405751
14 changed files with 228 additions and 98 deletions
|
@ -330,6 +330,13 @@ _jit_unget_reg(jit_state_t *_jit, jit_int32_t regno)
|
|||
jit_regset_clrbit(&_jitc->regarg, regno);
|
||||
}
|
||||
|
||||
jit_bool_t
|
||||
_jit_callee_save_p(jit_state_t *_jit, jit_int32_t regno)
|
||||
{
|
||||
assert(regno >= 0 && regno < JIT_NOREG);
|
||||
return (!!(_rvs[regno].spec & jit_class_sav));
|
||||
}
|
||||
|
||||
#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