summaryrefslogtreecommitdiff
path: root/module/system/vm/assembler.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2015-11-21 10:32:33 +0100
committerAndy Wingo <wingo@pobox.com>2015-12-01 15:42:19 +0100
commit8bf77f7192dd319cf5391639310abb35b9e627d7 (patch)
tree7cc17b7847a1de7ec736268eafe2041d96dcd3f8 /module/system/vm/assembler.scm
parentf34688ad25c8e4cb1ebc97734f255d36518d763f (diff)
downloadguile-8bf77f7192dd319cf5391639310abb35b9e627d7.tar.gz
Add support for unboxed s64 values
* libguile/frames.c (enum stack_item_representation): (scm_to_stack_item_representation): (scm_frame_local_ref, scm_frame_local_set_x): Support for S64 representations. * libguile/frames.h (union scm_vm_stack_element): Add signed 64-bit integer field. * libguile/vm-engine.c (scm->s64, s64->scm, load-s64): New instructions. * module/language/cps/compile-bytecode.scm (compile-function): * module/language/cps/cse.scm (compute-equivalent-subexpressions): * module/language/cps/effects-analysis.scm: * module/language/cps/slot-allocation.scm (compute-var-representations) (compute-needs-slot, allocate-slots): * module/language/cps/utils.scm (compute-constant-values): * module/language/cps/specialize-primcalls.scm (specialize-primcalls): Add support for new primcalls. * module/language/cps/types.scm (&s64): New type. (&s64-min, &s64-max, &u64-max): New convenience definitions. (&range-min, &range-max): Use &s64-min and &u64-max names. (scm->s64, load-s64, s64->scm): Add support for new primcalls. * module/system/vm/assembler.scm (emit-scm->s64, emit-s64->scm) (emit-load-s64): New exports. * module/system/vm/assembler.scm (write-arities): Support for s64 slots. * module/system/vm/debug.scm (arity-definitions): Support for s64 slots.
Diffstat (limited to 'module/system/vm/assembler.scm')
-rw-r--r--module/system/vm/assembler.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/system/vm/assembler.scm b/module/system/vm/assembler.scm
index bbd4e5d3a..59b194d16 100644
--- a/module/system/vm/assembler.scm
+++ b/module/system/vm/assembler.scm
@@ -173,6 +173,9 @@
(emit-scm->u64* . emit-scm->u64)
emit-load-u64
(emit-u64->scm* . emit-u64->scm)
+ (emit-scm->s64* . emit-scm->s64)
+ emit-load-s64
+ (emit-s64->scm* . emit-s64->scm)
(emit-bv-length* . emit-bv-length)
(emit-bv-u8-ref* . emit-bv-u8-ref)
(emit-bv-s8-ref* . emit-bv-s8-ref)
@@ -1919,6 +1922,7 @@ procedure with label @var{rw-init}. @var{rw-init} may be false. If
((scm) 0)
((f64) 1)
((u64) 2)
+ ((s64) 3)
(else (error "what!" representation)))))
(put-uleb128 names-port (logior (ash slot 2) tag)))
(lp definitions))))))