diff options
author | Andy Wingo <wingo@pobox.com> | 2015-11-12 21:44:24 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2015-12-01 11:30:54 +0100 |
commit | dfbe869e2421e6db03fd14c6fbfc0838e5e1988b (patch) | |
tree | eb2344376bd382cbcd296c980c8c7b11d86dc1ea /module/language/cps/cse.scm | |
parent | 58153e3a08c89fd9cc84dbf65e1df27119986cca (diff) | |
download | guile-dfbe869e2421e6db03fd14c6fbfc0838e5e1988b.tar.gz |
Add low-level support for unboxed 64-bit unsigned ints
* libguile/frames.c (enum stack_item_representation)
* libguile/frames.c (scm_to_stack_item_representation):
(scm_frame_local_ref, scm_frame_local_set_x): Support 'u64 slots.
* libguile/frames.h (union scm_vm_stack_element): Add as_u64 member.
* libguile/vm-engine.c (SP_REF_U64, SP_SET_U64): New helpers.
(scm->u64, u64->scm): New instructions.
* module/language/cps/cse.scm (compute-equivalent-subexpressions):
Scalar replacement for u64->scm and scm->u64.
* module/language/cps/effects-analysis.scm (scm->u64, u64->scm): Add
cases.
* module/language/cps/slot-allocation.scm (compute-var-representations):
(allocate-slots): Represent the result of scm->u64 as a "u64" slot.
* module/language/cps/types.scm (&u64): New type.
(scm->u64, u64->scm): Add support for these ops.
* module/system/vm/assembler.scm (write-arities):
* module/system/vm/debug.scm (arity-definitions): Support u64
representations.
Diffstat (limited to 'module/language/cps/cse.scm')
-rw-r--r-- | module/language/cps/cse.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/module/language/cps/cse.scm b/module/language/cps/cse.scm index 2e47f379c..ad554faa0 100644 --- a/module/language/cps/cse.scm +++ b/module/language/cps/cse.scm @@ -307,6 +307,14 @@ false. It could be that both true and false proofs are available." (match defs ((scm) (add-def! `(primcall scm->f64 ,scm) f64)))) + (('primcall 'scm->u64 scm) + (match defs + ((u64) + (add-def! `(primcall u64->scm ,u64) scm)))) + (('primcall 'u64->scm u64) + (match defs + ((scm) + (add-def! `(primcall scm->u64 ,scm) u64)))) (_ #t)))) (define (visit-label label equiv-labels var-substs) |