mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-13 15:10:34 +02:00
Minor JIT cleanups
* libguile/jit.c (fp_scm_operand): Fix assertion about register state. (compile_call_scm_sz_u32): Fix ABI declaration for immediate. Some whitespace cleanups as well.
This commit is contained in:
parent
39d1ed3c27
commit
9ff21412ff
1 changed files with 12 additions and 19 deletions
|
@ -890,7 +890,7 @@ emit_direct_tail_call (scm_jit_state *j, const uint32_t *vcode)
|
||||||
static jit_arg_t
|
static jit_arg_t
|
||||||
fp_scm_operand (scm_jit_state *j, uint32_t slot)
|
fp_scm_operand (scm_jit_state *j, uint32_t slot)
|
||||||
{
|
{
|
||||||
ASSERT_HAS_REGISTER_STATE (SP_IN_REGISTER);
|
ASSERT_HAS_REGISTER_STATE (FP_IN_REGISTER);
|
||||||
|
|
||||||
return (jit_arg_t) { JIT_ARG_LOC_MEM,
|
return (jit_arg_t) { JIT_ARG_LOC_MEM,
|
||||||
{ .mem = { FP, -8 * ((ptrdiff_t) slot + 1) } } };
|
{ .mem = { FP, -8 * ((ptrdiff_t) slot + 1) } } };
|
||||||
|
@ -1059,12 +1059,6 @@ emit_sp_ref_s32 (scm_jit_state *j, jit_gpr_t dst, uint32_t src)
|
||||||
emit_sp_ref_sz (j, dst, src);
|
emit_sp_ref_sz (j, dst, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
static jit_arg_t
|
|
||||||
sp_s64_operand (scm_jit_state *j, uint32_t src)
|
|
||||||
{
|
|
||||||
return sp_sz_operand (j, src);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
emit_sp_ref_u64 (scm_jit_state *j, jit_gpr_t dst_lo, jit_gpr_t dst_hi,
|
emit_sp_ref_u64 (scm_jit_state *j, jit_gpr_t dst_lo, jit_gpr_t dst_hi,
|
||||||
uint32_t src)
|
uint32_t src)
|
||||||
|
@ -2335,7 +2329,7 @@ compile_call_scm_sz_u32 (scm_jit_state *j, uint8_t a, uint8_t b, uint8_t c, uint
|
||||||
emit_store_current_ip (j, T0);
|
emit_store_current_ip (j, T0);
|
||||||
|
|
||||||
const jit_arg_abi_t abi[] =
|
const jit_arg_abi_t abi[] =
|
||||||
{ JIT_ARG_ABI_POINTER, JIT_ARG_ABI_INTMAX, JIT_ARG_ABI_INTMAX };
|
{ JIT_ARG_ABI_POINTER, JIT_ARG_ABI_INTMAX, JIT_ARG_ABI_UINT32 };
|
||||||
jit_arg_t args[] = { sp_scm_operand (j, a),
|
jit_arg_t args[] = { sp_scm_operand (j, a),
|
||||||
sp_sz_operand (j, b),
|
sp_sz_operand (j, b),
|
||||||
sp_sz_operand (j, c) };
|
sp_sz_operand (j, c) };
|
||||||
|
@ -2661,7 +2655,6 @@ compile_call_scm_from_scm_u64 (scm_jit_state *j, uint8_t dst, uint8_t a, uint8_t
|
||||||
jit_arg_t args[] = { sp_scm_operand (j, a), sp_u64_loc_operand (j, b) };
|
jit_arg_t args[] = { sp_scm_operand (j, a), sp_u64_loc_operand (j, b) };
|
||||||
#else
|
#else
|
||||||
const jit_arg_abi_t abi[] = { JIT_ARG_ABI_POINTER, JIT_ARG_ABI_UINT64 };
|
const jit_arg_abi_t abi[] = { JIT_ARG_ABI_POINTER, JIT_ARG_ABI_UINT64 };
|
||||||
// jit_addi (j->jit, T0, SP, src * sizeof (union scm_vm_stack_element));
|
|
||||||
jit_arg_t args[] = { sp_scm_operand (j, a), sp_u64_operand (j, b) };
|
jit_arg_t args[] = { sp_scm_operand (j, a), sp_u64_operand (j, b) };
|
||||||
#endif
|
#endif
|
||||||
jit_calli (j->jit, intrinsic, 2, abi, args);
|
jit_calli (j->jit, intrinsic, 2, abi, args);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue