[Git][cmucl/cmucl][master] 2 commits: Fix #98: Use FSTP instruction with appropriate size

Raymond Toy gitlab at common-lisp.net
Tue Jan 12 04:27:19 UTC 2021



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/5e87a39ad45b1dde4d565a4aa4273d5fb9c4e113...9c0c857dd10067e1cf90ec577a79eb79593c3250

-- 
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/5e87a39ad45b1dde4d565a4aa4273d5fb9c4e113...9c0c857dd10067e1cf90ec577a79eb79593c3250
You're receiving this email because of your account on gitlab.common-lisp.net.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20210112/ab559750/attachment.html>


More information about the cmucl-cvs mailing list