Raymond Toy pushed to branch master at cmucl / cmucl
Commits: 755f7a80 by Raymond Toy at 2021-01-11T20:05:32-08:00 Fix #98: Use FSTP instruction with appropriate size
Instead of printing `FSTP` and `FSTPD`, print `FSTP DWORD PTR` and `FSTP QWORD PTR` to store a single-float and double-float value to memory.
Clang likes this form better than the original, but gcc accepts both.
- - - - - 9c0c857d by Raymond Toy at 2021-01-12T04:27:13+00:00 Merge branch 'issue-98-fstpd-formatting' into 'master'
Fix #98: Use FSTP instruction with appropriate size
Closes #98
See merge request cmucl/cmucl!65 - - - - -
1 changed file:
- src/compiler/x86/insts.lisp
Changes:
===================================== src/compiler/x86/insts.lisp ===================================== @@ -2636,7 +2636,8 @@ ;;; store single from st(0) and pop ;;; (define-instruction fstp (segment dest) - (:printer floating-point ((op '(#b001 #b011)))) + (:printer floating-point ((op '(#b001 #b011))) + '('fstp :tab 'dword " " 'ptr " " reg/mem)) (:emitter (cond ((fp-reg-tn-p dest) (emit-byte segment #b11011101) @@ -2648,7 +2649,8 @@ ;;; store double from st(0) and pop ;;; (define-instruction fstpd (segment dest) - (:printer floating-point ((op '(#b101 #b011)))) + (:printer floating-point ((op '(#b101 #b011))) + '('fstp :tab 'qword " " 'ptr " " reg/mem)) (:printer floating-point-fp ((op '(#b101 #b011)))) (:emitter (cond ((fp-reg-tn-p dest)
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/5e87a39ad45b1dde4d565a4...