Chez Scheme: avoid floating-point register shuffling on x86_64

For floating-point arithmetic, encourage the register allocator to use
the same register for an argument and destination in arithmetic.
This commit is contained in:
Matthew Flatt 2021-03-09 17:36:21 -07:00
parent c9956aceae
commit 8ba89cbd2a

View File

@ -636,7 +636,11 @@
[(op (x fpur) (y ur)) `(set! ,(make-live-info) ,x (asm ,info ,asm-fpcast ,y))])
(define-instruction value (fp+ fp- fp* fp/)
[(op (x fpur) (y fpmem fpur) (z fpmem fpur))
[(op (x fpur) (y fpur) (z fpmem fpur))
(seq
`(move-related ,x ,y)
`(set! ,(make-live-info) ,x (asm ,info ,(asm-fpop-2 op) ,y ,z)))]
[(op (x fpur) (y fpmem) (z fpmem fpur))
`(set! ,(make-live-info) ,x (asm ,info ,(asm-fpop-2 op) ,y ,z))])
(define-instruction value (fpsqrt)