repair for eqv?
on an immediate flonum
original commit: fd544591c6d8ba59456d5cbe6e9fc7fc010410f2
This commit is contained in:
parent
627c809de4
commit
3db5d5ab2d
|
@ -6053,16 +6053,16 @@
|
|||
(lambda (e1 e2)
|
||||
(nanopass-case (L7 Expr) e1
|
||||
[(quote ,d) (and (flonum? d)
|
||||
(build-and
|
||||
(%type-check mask-flonum type-flonum ,e2)
|
||||
(if ($nan? d)
|
||||
;; NaN: invert `fl=` on self
|
||||
(bind #t (e2)
|
||||
(build-not (%inline fl= ,e2 ,e2)))
|
||||
;; Non-NaN: compare bits
|
||||
(constant-case ptr-bits
|
||||
[(32)
|
||||
(bind #t (e2)
|
||||
(bind #t (e2)
|
||||
(build-and
|
||||
(%type-check mask-flonum type-flonum ,e2)
|
||||
(if ($nan? d)
|
||||
;; NaN: invert `fl=` on self
|
||||
(bind #t (e2)
|
||||
(build-not (%inline fl= ,e2 ,e2)))
|
||||
;; Non-NaN: compare bits
|
||||
(constant-case ptr-bits
|
||||
[(32)
|
||||
(let ([d0 (if (eq? (constant-case native-endianness) (native-endianness)) 0 4)])
|
||||
(let ([word1 ($object-ref 'iptr d (fx+ (constant flonum-data-disp) d0))]
|
||||
[word2 ($object-ref 'iptr d (fx+ (constant flonum-data-disp) (fx- 4 d0)))])
|
||||
|
@ -6072,15 +6072,15 @@
|
|||
(immediate ,word1))
|
||||
(%inline eq?
|
||||
,(%mref ,e2 ,(fx+ (constant flonum-data-disp) 4))
|
||||
(immediate ,word2))))))]
|
||||
[(64)
|
||||
(let ([word ($object-ref 'iptr d (constant flonum-data-disp))])
|
||||
(%inline eq?
|
||||
,(%mref ,e2 ,(constant flonum-data-disp))
|
||||
(immediate ,word)))]
|
||||
[else ($oops 'compiler-internal
|
||||
"eqv doesn't handle ptr-bits = ~s"
|
||||
(constant ptr-bits))]))))]
|
||||
(immediate ,word2)))))]
|
||||
[(64)
|
||||
(let ([word ($object-ref 'iptr d (constant flonum-data-disp))])
|
||||
(%inline eq?
|
||||
,(%mref ,e2 ,(constant flonum-data-disp))
|
||||
(immediate ,word)))]
|
||||
[else ($oops 'compiler-internal
|
||||
"eqv doesn't handle ptr-bits = ~s"
|
||||
(constant ptr-bits))])))))]
|
||||
[else #f])))
|
||||
(define eqok-help?
|
||||
(lambda (obj)
|
||||
|
|
Loading…
Reference in New Issue
Block a user