diff --git a/src/ikarus.boot b/src/ikarus.boot index afb7f70..2756dc1 100644 Binary files a/src/ikarus.boot and b/src/ikarus.boot differ diff --git a/src/makefile.ss b/src/makefile.ss index 5eb381c..a59eda7 100755 --- a/src/makefile.ss +++ b/src/makefile.ss @@ -566,6 +566,8 @@ [$bytevector-set! $bytes] [$flonum-u8-ref $flonums] + [$make-flonum $flonums] + [$flonum-set! $flonums] [$make-bignum $bignums] [$bignum-positive? $bignums] diff --git a/src/pass-specify-rep-primops.ss b/src/pass-specify-rep-primops.ss index fbacae9..c3bb6f1 100644 --- a/src/pass-specify-rep-primops.ss +++ b/src/pass-specify-rep-primops.ss @@ -741,6 +741,26 @@ [(P s i) (K #t)] [(E s i) (nop)]) +(define-primop $make-flonum unsafe + [(V) + (with-tmp ([x (prm 'alloc (K (align flonum-size)) (K vector-tag))]) + (prm 'mset x (K (- vector-tag)) (K flonum-tag)) + x)] + [(P str) (K #t)] + [(E str) (nop)]) + +(define-primop $flonum-set! unsafe + [(E x i v) + (record-case i + [(constant i) + (unless (and (fixnum? i) (fx<= 0 i) (fx<= i 7)) + (interrupt)) + (prm 'bset/h (T x) + (K (+ (- 7 i) (- disp-bytevector-data bytevector-tag))) + (prm 'sll (T v) (K (- 8 fx-shift))))] + [else (interrupt)])]) + + /section) (section ;;; ratnums