[Top][All Lists]

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

[Guile-commits] branch master updated: Fix build on 32-bit systems with

From: Andy Wingo
Subject: [Guile-commits] branch master updated: Fix build on 32-bit systems with JIT support
Date: Sat, 11 Jan 2020 04:40:19 -0500

This is an automated email from the git hooks/post-receive script.

wingo pushed a commit to branch master
in repository guile.

The following commit(s) were added to refs/heads/master by this push:
     new 74f46ef  Fix build on 32-bit systems with JIT support
74f46ef is described below

commit 74f46efc73012c508850749579cef927e895726b
Author: Andy Wingo <address@hidden>
AuthorDate: Sat Jan 11 10:28:36 2020 +0100

    Fix build on 32-bit systems with JIT support
    * libguile/intrinsics.h: Add s64->f64 intrinsic, for 32-bit targets.
    * libguile/jit.c (compile_s64_to_f64): Call the intrinsic for 32-bit
 libguile/intrinsics.h | 3 +++
 libguile/jit.c        | 8 +++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/libguile/intrinsics.h b/libguile/intrinsics.h
index 275a13a..f2682fb 100644
--- a/libguile/intrinsics.h
+++ b/libguile/intrinsics.h
@@ -49,12 +49,14 @@ typedef void (*scm_t_s64_from_scm_intrinsic) (int64_t*, 
 typedef SCM (*scm_t_scm_from_u64_intrinsic) (uint64_t*);
 typedef SCM (*scm_t_scm_from_s64_intrinsic) (int64_t*);
 typedef SCM (*scm_t_scm_from_scm_u64_intrinsic) (SCM, uint64_t*);
+typedef double (*scm_t_f64_from_s64_intrinsic) (uint64_t*);
 typedef uint64_t (*scm_t_u64_from_scm_intrinsic) (SCM);
 typedef int64_t (*scm_t_s64_from_scm_intrinsic) (SCM);
 typedef SCM (*scm_t_scm_from_u64_intrinsic) (uint64_t);
 typedef SCM (*scm_t_scm_from_s64_intrinsic) (int64_t);
 typedef SCM (*scm_t_scm_from_scm_u64_intrinsic) (SCM, uint64_t);
+typedef double (*scm_t_f64_from_s64_intrinsic) (uint64_t);
 typedef void (*scm_t_thread_intrinsic) (scm_thread*);
@@ -189,6 +191,7 @@ typedef uint32_t* scm_t_vcode_intrinsic;
   M(scm_from_thread_sz, allocate_pointerless_words, 
"allocate-pointerless-words", ALLOCATE_POINTERLESS_WORDS) \
   M(scm_from_thread_sz, allocate_pointerless_words_with_freelist, 
   M(scm_from_scm, inexact, "inexact", INEXACT) \
+  M(f64_from_s64, s64_to_f64, "s64->f64", S64_TO_F64) \
   /* Add new intrinsics here; also update scm_bootstrap_intrinsics.  */
 enum scm_vm_intrinsic
diff --git a/libguile/jit.c b/libguile/jit.c
index fb669b6..1a2728a 100644
--- a/libguile/jit.c
+++ b/libguile/jit.c
@@ -1,4 +1,4 @@
-/* Copyright 2018-2019
+/* Copyright 2018-2020
      Free Software Foundation, Inc.
    This file is part of Guile.
@@ -5004,8 +5004,14 @@ compile_f64_set_slow (scm_jit_state *j, uint8_t ptr, 
uint8_t idx, uint8_t v)
 static void
 compile_s64_to_f64 (scm_jit_state *j, uint16_t dst, uint16_t src)
   emit_sp_ref_s64 (j, T0, src);
   jit_extr_d (j->jit, JIT_F0, T0);
+  emit_call_1 (j, scm_vm_intrinsics.s64_to_f64, sp_slot_operand (j, src));
+  jit_retval_d (j->jit, JIT_F0);
+  emit_reload_sp (j);
   record_fpr_clobber (j, JIT_F0);
   emit_sp_set_f64 (j, dst, JIT_F0);

reply via email to

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