guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 375/437: Update the correct fp offset and add assertions


From: Andy Wingo
Subject: [Guile-commits] 375/437: Update the correct fp offset and add assertions
Date: Mon, 2 Jul 2018 05:14:59 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit e4fe5186e6203bf77ebea07b1deaf4df0d93a10a
Author: pcpa <address@hidden>
Date:   Thu Apr 30 10:17:17 2015 -0300

    Update the correct fp offset and add assertions
---
 lib/jit_x86-cpu.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/jit_x86-cpu.c b/lib/jit_x86-cpu.c
index c2f5a9b..61f2bc4 100644
--- a/lib/jit_x86-cpu.c
+++ b/lib/jit_x86-cpu.c
@@ -3656,6 +3656,8 @@ _vastart(jit_state_t *_jit, jit_int32_t r0)
 {
     jit_int32_t                reg;
 
+    assert(_jitc->function->self.call & jit_call_varargs);
+
     /* Return jit_va_list_t in the register argument */
     addi(r0, _RBP_REGNO, _jitc->function->vaoff);
     reg = jit_get_reg(jit_class_gpr);
@@ -3693,6 +3695,8 @@ _vaarg(jit_state_t *_jit, jit_int32_t r0, jit_int32_t r1)
     jit_word_t         lt_code;
 #endif
 
+    assert(_jitc->function->self.call & jit_call_varargs);
+
     rg0 = jit_get_reg(jit_class_gpr);
 #if __X64 && !__CYGWIN__
     rg1 = jit_get_reg(jit_class_gpr);
@@ -3756,6 +3760,8 @@ _vaarg_d(jit_state_t *_jit, jit_int32_t r0, jit_int32_t 
r1, jit_bool_t x87)
     jit_word_t         lt_code;
 #endif
 
+    assert(_jitc->function->self.call & jit_call_varargs);
+
     rg0 = jit_get_reg(jit_class_gpr);
 #if __X64 && !__CYGWIN__
     rg1 = jit_get_reg(jit_class_gpr);
@@ -3777,9 +3783,9 @@ _vaarg_d(jit_state_t *_jit, jit_int32_t r0, jit_int32_t 
r1, jit_bool_t x87)
     else
        sse_ldxr_d(r0, rn(rg1), rn(rg0));
 
-    /* Update the gp (or fp) offset. */
+    /* Update the fp offset. */
     addi(rn(rg0), rn(rg0), va_fp_increment);
-    stxi_i(offsetof(jit_va_list_t, gpoff), r1, rn(rg0));
+    stxi_i(offsetof(jit_va_list_t, fpoff), r1, rn(rg0));
 
     /* Will only need one temporary register below. */
     jit_unget_reg(rg1);



reply via email to

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