i3 repairs related to fp unboxing

original commit: 0f33056b6503013237b26c09c2e9baba4377a750
This commit is contained in:
Matthew Flatt 2020-06-03 16:29:26 -06:00
parent a1def58a46
commit c9f2d1e156
2 changed files with 21 additions and 7 deletions

View File

@ -668,12 +668,26 @@
(loop n)))) (loop n))))
(set! frame-vars new-vec)))) (set! frame-vars new-vec))))
(or (vector-ref frame-vars x) (or (vector-ref frame-vars x)
(let ([fv ($make-fv x (constant-case stack-word-alignment (let ([fv ($make-fv x (let* ([type
[(2) (if (and (eq? type 'fp) ;; Don't allocate misaligned 'fp
(fxodd? x)) (constant-case stack-word-alignment
'ptr [(2) (if (and (eq? type 'fp)
type)] (fxodd? x))
[(1) type]))]) 'ptr
type)]
[(1) type])]
[type
;; Don't allocate 'fp that overlaps
;; an allocated slot
(constant-case ptr-bits
[(32) (let ([next-fv (and (fx< (fx+ x 1) (vector-length frame-vars))
(vector-ref frame-vars (add1 x)))])
(if (and next-fv
(not (eq? (fv-type next-fv) 'reserved)))
'ptr
type))]
[(64) type])])
type))])
(vector-set! frame-vars x fv) (vector-set! frame-vars x fv)
fv))])) fv))]))
(define get-ptr-fv (define get-ptr-fv

View File

@ -824,7 +824,7 @@
`(asm ,info ,(asm-fl-load op (info-loadfl-flreg info)) ,x ,y ,z)]) `(asm ,info ,(asm-fl-load op (info-loadfl-flreg info)) ,x ,y ,z)])
(define-instruction value (fpt) (define-instruction value (fpt)
[(op (x fpur) (y ur)) `(asm ,info ,asm-fpt ,x ,y)]) [(op (x fpur) (y ur)) `(set! ,(make-live-info) ,x (asm ,info ,asm-fpt ,y))])
(define-instruction value (fpmove) (define-instruction value (fpmove)
[(op (x fpmem) (y fpur)) `(set! ,(make-live-info) ,x (asm ,info ,asm-fpmove ,y))] [(op (x fpmem) (y fpur)) `(set! ,(make-live-info) ,x (asm ,info ,asm-fpmove ,y))]