[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 11/20: Small bug fixes for ia32
From: |
Andy Wingo |
Subject: |
[Guile-commits] 11/20: Small bug fixes for ia32 |
Date: |
Sun, 28 Apr 2019 07:54:20 -0400 (EDT) |
wingo pushed a commit to branch lightening
in repository guile.
commit e0cf51e482db6f2361a87ee85108523a930f0612
Author: Andy Wingo <address@hidden>
Date: Fri Apr 26 17:41:43 2019 +0200
Small bug fixes for ia32
---
lightening/lightening.c | 1 +
lightening/x86-cpu.c | 4 ++--
tests/call_10.c | 2 ++
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lightening/lightening.c b/lightening/lightening.c
index 74ecf99..75460cd 100644
--- a/lightening/lightening.c
+++ b/lightening/lightening.c
@@ -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]);
}
diff --git a/lightening/x86-cpu.c b/lightening/x86-cpu.c
index 6d56b11..fab06c7 100644
--- a/lightening/x86-cpu.c
+++ b/lightening/x86-cpu.c
@@ -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));
}
diff --git a/tests/call_10.c b/tests/call_10.c
index 9c3c943..d99bcb8 100644
--- a/tests/call_10.c
+++ b/tests/call_10.c
@@ -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;
- [Guile-commits] 17/20: Add x86-32 tests to default test target, (continued)
- [Guile-commits] 17/20: Add x86-32 tests to default test target, Andy Wingo, 2019/04/28
- [Guile-commits] 15/20: Add test for JIT callee with many args, Andy Wingo, 2019/04/28
- [Guile-commits] 14/20: Add {enter,leave}_jit_abi calls in tests, Andy Wingo, 2019/04/28
- [Guile-commits] 09/20: Remove most __X64_32 code, Andy Wingo, 2019/04/28
- [Guile-commits] 10/20: Add facility to enter and leave JIT ABI, Andy Wingo, 2019/04/28
- [Guile-commits] 03/20: Fix lightening to compile on 32-bit x86, Andy Wingo, 2019/04/28
- [Guile-commits] 13/20: Fix ABI of arg to extr_d_f test, Andy Wingo, 2019/04/28
- [Guile-commits] 12/20: Fix jit_leave_jit_abi to pop correct registers, Andy Wingo, 2019/04/28
- [Guile-commits] 08/20: Simplify 64/32 concerns in x86-cpu.c, Andy Wingo, 2019/04/28
- [Guile-commits] 07/20: Make jit_cpu private, Andy Wingo, 2019/04/28
- [Guile-commits] 11/20: Small bug fixes for ia32,
Andy Wingo <=
- [Guile-commits] 01/20: Inline some internal definitions into backend-specific files, Andy Wingo, 2019/04/28
- [Guile-commits] 02/20: Account for saved return address when locating args, Andy Wingo, 2019/04/28
- [Guile-commits] 05/20: Fix compile warnings for 32-bit tests, Andy Wingo, 2019/04/28
- [Guile-commits] 06/20: Fix 32-bit movi_d, Andy Wingo, 2019/04/28