diff --git a/src/ikarus.boot b/src/ikarus.boot index 0ecb681..b1ba670 100644 Binary files a/src/ikarus.boot and b/src/ikarus.boot differ diff --git a/src/pass-specify-rep-primops.ss b/src/pass-specify-rep-primops.ss index 58badf4..2359371 100644 --- a/src/pass-specify-rep-primops.ss +++ b/src/pass-specify-rep-primops.ss @@ -641,11 +641,18 @@ (record-case i [(constant i) (unless (fixnum? i) (interrupt)) - (prm 'logand (prm 'sra (T x) (K i)) (K (* -1 fixnum-scale)))] + (prm 'logand + (prm 'sra (T x) (K (if (> i 31) 31 i))) + (K (* -1 fixnum-scale)))] [else - (prm 'logand - (prm 'sra (T x) (prm 'sra (T i) (K fixnum-shift))) - (K (* -1 fixnum-scale)))])] + (with-tmp ([i (prm 'sra (T i) (K fixnum-shift))]) + (with-tmp ([i (make-conditional + (prm '< i (K 32)) + i + (K 31))]) + (prm 'logand + (prm 'sra (T x) i) + (K (* -1 fixnum-scale)))))])] [(P x i) (K #t)] [(E x i) (nop)]) diff --git a/src/todo-r6rs.ss b/src/todo-r6rs.ss index ea4229e..5510012 100755 --- a/src/todo-r6rs.ss +++ b/src/todo-r6rs.ss @@ -288,7 +288,7 @@ [fxmax S fx] [fxmin S fx] [fxmod D fx] - [fxmod0 S fx] + [fxmod0 D fx] [fxnegative? C fx] [fxnot C fx] [fxodd? C fx]