fixed bug in code generation for (fxarithmetic-shift-right x <n>)

where <n> is unknown.
This commit is contained in:
Abdulaziz Ghuloum 2009-09-30 04:36:09 +03:00
parent c375d537a3
commit ad0612905a
2 changed files with 3 additions and 2 deletions

View File

@ -1 +1 @@
1857
1858

View File

@ -1596,6 +1596,7 @@
(define-primop fxarithmetic-shift-right safe
[(V x n)
(struct-case n
;;; FIXME: check for known types
[(constant i)
(cond
[(and (fx? i)
@ -1615,7 +1616,7 @@
(interrupt-when
(prm '>= n (K (- (* wordsize 8) fx-shift))))
(prm 'sll
(prm 'sra x n)
(prm 'sra (prm 'sra x n) (K fx-shift))
(K fx-shift))))])])