1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-01 18:00:23 +02:00

Small bug fixes for ia32

This commit is contained in:
Andy Wingo 2019-04-26 17:41:43 +02:00
parent 42bc762d26
commit e0cf51e482
3 changed files with 5 additions and 2 deletions

View file

@ -1023,6 +1023,7 @@ jit_locate_args(jit_state_t *_jit, size_t argc, jit_operand_t args[])
struct abi_arg_iterator iter;
reset_abi_arg_iterator(&iter, argc, args, AFTER_CALL);
iter.stack_size += _jit->frame_size;
for (size_t i = 0; i < argc; i++)
next_abi_arg(&iter, &args[i]);
}

View file

@ -252,7 +252,7 @@ rx(jit_state_t *_jit, int32_t rd, int32_t md,
static void
pushr(jit_state_t *_jit, int32_t r0)
{
_jit->frame_size += __WORDSIZE;
_jit->frame_size += __WORDSIZE / 8;
rex(_jit, 0, WIDE, 0, 0, r0);
ic(_jit, 0x50 | r7(r0));
}
@ -260,7 +260,7 @@ pushr(jit_state_t *_jit, int32_t r0)
static void
popr(jit_state_t *_jit, int32_t r0)
{
_jit->frame_size -= __WORDSIZE;
_jit->frame_size -= __WORDSIZE / 8;
rex(_jit, 0, WIDE, 0, 0, r0);
ic(_jit, 0x58 | r7(r0));
}

View file

@ -19,6 +19,7 @@ static void
run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size)
{
jit_begin(j, arena_base, arena_size);
size_t align = jit_enter_jit_abi(j, 0, 0, 0);
jit_load_args_1(j, jit_operand_gpr (JIT_OPERAND_ABI_POINTER, JIT_R0));
jit_operand_t args[10] = {
@ -34,6 +35,7 @@ run_test(jit_state_t *j, uint8_t *arena_base, size_t arena_size)
jit_operand_mem(JIT_OPERAND_ABI_INT32, JIT_R0, 9 * sizeof(int32_t))
};
jit_calli(j, f, 10, args);
jit_leave_jit_abi(j, 0, 0, align);
jit_ret(j);
size_t size = 0;