guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 118/437: Account stack alignment on jit functions with o


From: Andy Wingo
Subject: [Guile-commits] 118/437: Account stack alignment on jit functions with odd number of arguments.
Date: Mon, 2 Jul 2018 05:13:56 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit 67e10518277beb68729a9240a8d254100687cfb6
Author: Paulo Cesar Pereira de Andrade <address@hidden>
Date:   Wed Aug 25 20:50:41 2010 -0300

    Account stack alignment on jit functions with odd number of arguments.
    
      The x86_64 correction to keep stack aligned in jit_finish* was only
    correct for functions being called, but did not correctly handle alignment
    of stack arguments.
---
 lightning/i386/core-64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lightning/i386/core-64.h b/lightning/i386/core-64.h
index ea53845..48a8996 100644
--- a/lightning/i386/core-64.h
+++ b/lightning/i386/core-64.h
@@ -133,7 +133,7 @@ struct jit_local_state {
 #define jit_popr_i(rs)         POPQr(rs)
 
 /* A return address is 8 bytes, plus 5 registers = 40 bytes, total = 48 bytes. 
*/
-#define jit_prolog(n) (_jitl.framesize = 48, _jitl.nextarg_getfp = 
_jitl.nextarg_geti = 0, _jitl.alloca_offset = 0, \
+#define jit_prolog(n) (_jitl.framesize = ((n) & 1) ? 56 : 48, 
_jitl.nextarg_getfp = _jitl.nextarg_geti = 0, _jitl.alloca_offset = 0, \
                       PUSHQr(_EBX), PUSHQr(_R12), PUSHQr(_R13), PUSHQr(_R14), 
PUSHQr(_EBP), MOVQrr(_ESP, _EBP))
 
 #define jit_calli(sub)          (MOVQir((long) (sub), JIT_REXTMP), 
CALLsr(JIT_REXTMP))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]