[Git][cmucl/cmucl][master] 2 commits: Fix #426: Define float-modes type correctly

Raymond Toy pushed to branch master at cmucl / cmucl Commits: d2c96f1b by Raymond Toy at 2025-08-14T07:45:18-07:00 Fix #426: Define float-modes type correctly - - - - - 2db294b1 by Raymond Toy at 2025-08-14T07:45:18-07:00 Merge branch 'issue-426-fix-float-modes-type-def' into 'master' Fix #426: Define float-modes type correctly Closes #426 See merge request cmucl/cmucl!313 - - - - - 2 changed files: - src/compiler/x86/float-sse2.lisp - tests/float.lisp Changes: ===================================== src/compiler/x86/float-sse2.lisp ===================================== @@ -1265,7 +1265,7 @@ ;;;; Float mode hackery: -(deftype float-modes () '(unsigned-byte 24)) +(deftype float-modes () '(unsigned-byte 30)) ;; For the record, here is the format of the MXCSR register. ;; ===================================== tests/float.lisp ===================================== @@ -333,3 +333,13 @@ (declare (ignore c)) (values (invoke-restart 'lisp::largest-float))))) (read-from-string string)))))) + +#+x86 +(define-test x87-set-floating-point-modes + (:tag :issues) + (let ((new-mode (setf (x86::x87-floating-point-modes) + (dpb 2 (byte 2 24) + (x86::x87-floating-point-modes))))) + (assert-true (typep new-mode 'x86::float-modes)) + (assert-equal new-mode (setf (x86::x87-floating-point-modes) new-mode)))) + View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/cb874f7fa2cd9d0dd38435c... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/cb874f7fa2cd9d0dd38435c... You're receiving this email because of your account on gitlab.common-lisp.net.
participants (1)
-
Raymond Toy (@rtoy)