* (fxsra <fx> <32*i>) now returns a proper value (0 or 1)

This commit is contained in:
Abdulaziz Ghuloum 2007-09-13 21:09:09 -04:00
parent cb3b0b3edd
commit 7d46631e14
3 changed files with 12 additions and 5 deletions

Binary file not shown.

View File

@ -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)])

View File

@ -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]