mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 20:30:28 +02:00
bv-{f32,f64}-{ref,set!} operate on raw f64 values
* module/language/tree-il/compile-cps.scm (convert): Box results of bv-f32-ref and bv-f64-ref. Unbox the argument to bv-f32-set! and bv-f64-set!. * libguile/vm-engine.c (bv-f32-ref, bv-f64-ref): Results are raw. (bv-f32-set!, bv-f64-set!): Take unboxed arguments. * module/system/vm/assembler.scm (emit-scm->f64, emit-f64->scm): Export. * module/language/cps/compile-bytecode.scm (compile-function): * module/language/cps/effects-analysis.scm: Add support for scm->f64 and f64->scm. * module/language/cps/slot-allocation.scm (compute-var-representations): Add cases for primops returning raw values. * module/language/cps/types.scm (bv-f32-ref, bv-f32-set!) (bv-f64-ref, bv-f64-set!): Deal in &f64 values instead of reals.
This commit is contained in:
parent
608753982f
commit
b1ac8d68b5
7 changed files with 68 additions and 18 deletions
|
@ -181,6 +181,10 @@
|
|||
(constant n)))
|
||||
(($ $primcall 'builtin-ref (name))
|
||||
(emit-builtin-ref asm (from-sp dst) (constant name)))
|
||||
(($ $primcall 'scm->f64 (src))
|
||||
(emit-scm->f64 asm (from-sp dst) (from-sp (slot src))))
|
||||
(($ $primcall 'f64->scm (src))
|
||||
(emit-f64->scm asm (from-sp dst) (from-sp (slot src))))
|
||||
(($ $primcall 'bv-u8-ref (bv idx))
|
||||
(emit-bv-u8-ref asm (from-sp dst) (from-sp (slot bv))
|
||||
(from-sp (slot idx))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue