Raymond Toy pushed to branch issue-293-restart-on-reader-fp-overflow at cmucl / cmucl
Commits:
0cbb2264 by Raymond Toy at 2024-04-10T03:10:16+00:00
Fix #296: Fix disassembly of MOVD instruction
- - - - -
df78595e by Raymond Toy at 2024-04-10T03:10:20+00:00
Merge branch 'issue-296-fix-movd-disassembly' into 'master'
Fix #296: Fix disassembly of MOVD instruction
Closes #296 and #300
See merge request cmucl/cmucl!207
- - - - -
e88d7ffe by Raymond Toy at 2024-04-11T22:11:51+00:00
Fix #275: FP underflow in reader allows restart with 0
- - - - -
07c9c06b by Raymond Toy at 2024-04-11T22:11:55+00:00
Merge branch 'issue-275b-signal-float-underflow' into 'master'
Fix #275: FP underflow in reader allows restart with 0
Closes #275 and #287
See merge request cmucl/cmucl!197
- - - - -
c4cfca89 by Raymond Toy at 2024-04-11T16:01:24-07:00
Merge branch 'master' into issue-293-restart-on-reader-fp-overflow
- - - - -
2 changed files:
- src/compiler/x86/insts.lisp
- src/general-info/release-21f.md
Changes:
=====================================
src/compiler/x86/insts.lisp
=====================================
@@ -509,6 +509,14 @@
(print-byte-reg value stream dstate)
(print-mem-access value stream t dstate)))
+(defun print-word-reg/mem (value stream dstate)
+ (declare (type (or list reg) value)
+ (type stream stream)
+ (type disassem:disassem-state dstate))
+ (if (typep value 'reg)
+ (print-word-reg value stream dstate)
+ (print-mem-access value stream nil dstate)))
+
(defun print-label (value stream dstate)
(declare (ignore dstate))
(princ (if (and (numberp value) (minusp value))
@@ -716,7 +724,11 @@
(disassem:define-argument-type byte-reg/mem
:prefilter #'prefilter-reg/mem
:printer #'print-byte-reg/mem)
-
+(disassem:define-argument-type word-reg/mem
+ ;; Like reg/mem but if the reg/mem field is a register, it's a word
+ ;; register.
+ :prefilter #'prefilter-reg/mem
+ :printer #'print-word-reg/mem)
;;;
;;; added by jrd
;;;
@@ -3478,7 +3490,7 @@
;;; We do not support the MMX version of this instruction.
(define-instruction movd (segment dst src)
(:printer ext-xmm-reg/mem ((prefix #x66) (op #x6e)))
- (:printer ext-xmm-reg/mem ((prefix #x66) (op #x7e))
+ (:printer ext-xmm-reg/mem ((prefix #x66) (op #x7e) (reg/mem nil :type 'word-reg/mem))
'(:name :tab reg/mem ", " reg))
(:emitter
(cond ((xmm-register-p dst)
=====================================
src/general-info/release-21f.md
=====================================
@@ -56,6 +56,7 @@ public domain.
* ~~#271~~ Update ASDF to 3.3.7
* ~~#272~~ Move scavenge code for static vectors to its own function
* ~~#274~~ 1d99999999 hangs
+ * ~~#275~~ FP underflow in reader allows restarting with 0
* ~~#276~~ Implement xoroshiro128** generator for x86
* ~~#277~~ `float-ratio-float` returns 0 for numbers close to
least-positive-float
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/da48651df72c0685a095cc…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/da48651df72c0685a095cc…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
e88d7ffe by Raymond Toy at 2024-04-11T22:11:51+00:00
Fix #275: FP underflow in reader allows restart with 0
- - - - -
07c9c06b by Raymond Toy at 2024-04-11T22:11:55+00:00
Merge branch 'issue-275b-signal-float-underflow' into 'master'
Fix #275: FP underflow in reader allows restart with 0
Closes #275 and #287
See merge request cmucl/cmucl!197
- - - - -
4 changed files:
- src/code/reader.lisp
- src/general-info/release-21f.md
- src/i18n/locale/cmucl.pot
- tests/float.lisp
Changes:
=====================================
src/code/reader.lisp
=====================================
@@ -1832,56 +1832,70 @@ the end of the stream."
;; throw an error immediately. We don't need to be super accurate
;; with the limits. The rest of the code will handle it correctly,
;; even if we're too small or too large.
- (unless (zerop number)
- (flet ((fast-log2 (n)
- ;; For an integer, the integer-length is close enough to
- ;; the log2 of the number.
- (integer-length n)))
- ;; log2(x) = log(number*10^exponent/divisor)
- ;; = exponent*log2(10) + log2(number)-log2(divisor)
- (let ((log2-num (+ (* exponent #.(kernel::log2 10d0))
- (fast-log2 number)
- (- (fast-log2 divisor)))))
- (multiple-value-bind (log2-low log2-high)
- (ecase float-format
- ((short-float single-float)
- ;; Single-float exponents range is -149 to 127, but we
- ;; don't need to be super-accurate since we're
- ;; multiplying the values by 2.
- (values (* 2 (- vm:single-float-normal-exponent-min
- vm:single-float-bias
- vm:single-float-digits))
- (* 2 (- vm:single-float-normal-exponent-max
- vm:single-float-bias))))
- ((double-float long-float
- #+double-double kernel:double-double-float)
- (values (* 2 (- vm:double-float-normal-exponent-min
- vm:double-float-bias
- vm:double-float-digits))
- (* 2 (- vm:double-float-normal-exponent-max
- vm:double-float-bias)))))
- ;; Double-float exponent range is -1074 to -1023
- (unless (< log2-low log2-num log2-high)
- ;; The number is definitely too large or too small to fit.
- ;; Signal an error.
- (%reader-error stream _"Number not representable as a ~S: ~S"
- float-format (read-buffer-to-string)))))))
-
- ;; Otherwise the number might fit, so we carefully compute the result.
- (handler-case
- (with-float-traps-masked (:underflow)
- (let* ((ratio (/ (* (expt 10 exponent) number)
- divisor))
- (result (coerce ratio float-format)))
- (when (and (zerop result) (not (zerop number)))
- ;; The number we've read is so small that it gets
- ;; converted to 0.0, but is not actually zero. Signal an
- ;; error. See CLHS 2.3.1.1.
- (error _"Underflow"))
- result))
- (error ()
- (%reader-error stream _"Number not representable as a ~S: ~S"
- float-format (read-buffer-to-string)))))
+ (flet ((handle-extreme-numbers ()
+ (unless (zerop number)
+ (flet ((fast-log2 (n)
+ ;; For an integer, the integer-length is close enough to
+ ;; the log2 of the number.
+ (integer-length n)))
+ ;; log2(x) = log(number*10^exponent/divisor)
+ ;; = exponent*log2(10) + log2(number)-log2(divisor)
+ (let ((log2-num (+ (* exponent #.(kernel::log2 10d0))
+ (fast-log2 number)
+ (- (fast-log2 divisor)))))
+ (multiple-value-bind (log2-low log2-high)
+ (ecase float-format
+ ((short-float single-float)
+ ;; Single-float exponents range is -149 to 127, but we
+ ;; don't need to be super-accurate since we're
+ ;; multiplying the values by 2.
+ (values (* 2 (- vm:single-float-normal-exponent-min
+ vm:single-float-bias
+ vm:single-float-digits))
+ (* 2 (- vm:single-float-normal-exponent-max
+ vm:single-float-bias))))
+ ((double-float long-float
+ #+double-double kernel:double-double-float)
+ ;; Double-float exponent range is -1074 to -1023
+ (values (* 2 (- vm:double-float-normal-exponent-min
+ vm:double-float-bias
+ vm:double-float-digits))
+ (* 2 (- vm:double-float-normal-exponent-max
+ vm:double-float-bias)))))
+ (when (<= log2-num log2-low)
+ ;; Number is definitely too small; signal an underflow.
+ (error 'floating-point-underflow))
+ (when (>= log2-num log2-high)
+ ;; Number is definitely too large; signal an error
+ (error "Overflow"))))))))
+
+ ;; Otherwise the number might fit, so we carefully compute the result.
+ (handler-case
+ (with-float-traps-masked (:underflow)
+ (handle-extreme-numbers)
+ (let* ((ratio (/ (* (expt 10 exponent) number)
+ divisor))
+ (result (coerce ratio float-format)))
+ (when (and (zerop result) (not (zerop number)))
+ ;; The number we've read is so small that it gets
+ ;; converted to 0.0, but is not actually zero. Signal an
+ ;; error. See CLHS 2.3.1.1.
+ (error 'floating-point-underflow))
+ result))
+ (floating-point-underflow ()
+ ;; Resignal a reader error, but allow the user to continue with
+ ;; 0.
+ (let ((zero (coerce 0 float-format)))
+ (restart-case
+ (%reader-error stream _"Floating point underflow when reading ~S: ~S"
+ float-format (read-buffer-to-string))
+ (continue ()
+ :report (lambda (stream)
+ (format stream "Return ~A" zero))
+ zero))))
+ (error ()
+ (%reader-error stream _"Number not representable as a ~S: ~S"
+ float-format (read-buffer-to-string))))))
(defun make-ratio (stream)
=====================================
src/general-info/release-21f.md
=====================================
@@ -56,6 +56,7 @@ public domain.
* ~~#271~~ Update ASDF to 3.3.7
* ~~#272~~ Move scavenge code for static vectors to its own function
* ~~#274~~ 1d99999999 hangs
+ * ~~#275~~ FP underflow in reader allows restarting with 0
* ~~#276~~ Implement xoroshiro128** generator for x86
* ~~#277~~ `float-ratio-float` returns 0 for numbers close to
least-positive-float
=====================================
src/i18n/locale/cmucl.pot
=====================================
@@ -8750,11 +8750,11 @@ msgid "Internal error in floating point reader."
msgstr ""
#: src/code/reader.lisp
-msgid "Number not representable as a ~S: ~S"
+msgid "Floating point underflow when reading ~S: ~S"
msgstr ""
#: src/code/reader.lisp
-msgid "Underflow"
+msgid "Number not representable as a ~S: ~S"
msgstr ""
#: src/code/reader.lisp
=====================================
tests/float.lisp
=====================================
@@ -247,3 +247,44 @@
(assert-equal 0.9999999999999999d0
(rounding-test 3d0))))
+(define-test reader.underflow-enabled
+ (:tag :issues)
+ ;; Test with FP underflow enabled, we can still read denormals
+ ;; without problem. For this test we only care that we get a
+ ;; number, not the actual value.
+ (dolist (n (list least-positive-single-float
+ least-positive-normalized-single-float
+ (/ (+ least-positive-single-float
+ least-positive-normalized-single-float)
+ 2)
+ least-positive-double-float
+ least-positive-normalized-double-float
+ (/ (+ least-positive-double-float
+ least-positive-normalized-double-float)
+ 2)
+ ))
+ (assert-true (floatp
+ (ext:with-float-traps-enabled (:underflow)
+ (read-from-string (format nil "~A" n)))))))
+
+(define-test reader-restarts.underflow
+ (:tag :issues)
+ ;; Test that we get a restart when reading floating-point numbers
+ ;; that are too small to fit in a float. Invoke the restart to
+ ;; return 0. All the numbers must be less than half the
+ ;; leasst-positive float.
+ (dolist (item '(("1e-46" 0f0)
+ ("1e-999" 0f0)
+ ("1d-324" 0d0)
+ ("1d-999" 0d0)))
+ (destructuring-bind (string expected-value)
+ item
+ (assert-equal expected-value
+ (values (handler-bind
+ ((reader-error
+ (lambda (c)
+ (declare (ignore c))
+ (invoke-restart 'lisp::continue))))
+ (read-from-string string)))))))
+
+
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/df78595ef611a98eb5fe6c…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/df78595ef611a98eb5fe6c…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-293-restart-on-reader-fp-overflow at cmucl / cmucl
Commits:
da48651d by Raymond Toy at 2024-04-10T14:28:16-07:00
Add issue #293 to release notes.
- - - - -
1 changed file:
- src/general-info/release-21f.md
Changes:
=====================================
src/general-info/release-21f.md
=====================================
@@ -65,6 +65,7 @@ public domain.
* ~~#288~~ Re-enable `deftransform` for random integers.
* ~~#290~~ Pprint `with-float-traps-masked` better
* ~~#291~~ Pprint `handler-case` neatly.
+ * ~~#293~~ Allow restarts for FP overflow in reader.
* ~~#297~~ Pprint `new-assem:assemble` with less indentation.
* Other changes:
* Improvements to the PCL implementation of CLOS:
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/da48651df72c0685a095cca…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/da48651df72c0685a095cca…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-275b-signal-float-underflow at cmucl / cmucl
Commits:
6b933b4a by Raymond Toy at 2024-04-10T14:26:39-07:00
Add issue #275 to release notes.
- - - - -
1 changed file:
- src/general-info/release-21f.md
Changes:
=====================================
src/general-info/release-21f.md
=====================================
@@ -56,6 +56,7 @@ public domain.
* ~~#271~~ Update ASDF to 3.3.7
* ~~#272~~ Move scavenge code for static vectors to its own function
* ~~#274~~ 1d99999999 hangs
+ * ~~#275~~ FP underflow in reader allows restarting with 0
* ~~#276~~ Implement xoroshiro128** generator for x86
* ~~#277~~ `float-ratio-float` returns 0 for numbers close to
least-positive-float
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/6b933b4a49b664564b45b28…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/6b933b4a49b664564b45b28…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-275b-signal-float-underflow at cmucl / cmucl
Commits:
f3b2f7d8 by Raymond Toy at 2024-04-10T08:12:12-07:00
Add test reading denormals with underflow enabled.
We should be able to read denormals without problems even if FP
underflow is enabled.
- - - - -
e27ac073 by Raymond Toy at 2024-04-10T13:08:05-07:00
Fix underflow test that was underflowing
In the test, we had underflow enabled, but computed numbers that would
underflow. Hence, only wrap the part that reads floats with underflow
enabled.
- - - - -
1e3a49ea by Raymond Toy at 2024-04-10T13:10:29-07:00
Just enable underflow only around reading from the string
- - - - -
3f4072b5 by Raymond Toy at 2024-04-10T13:11:16-07:00
Handle underflow for very tiny numbers
Previously, when the numbers were very tiny, we signaled a
reader-error but didn't have a restart to return 0. Modify the code
so that when we have very tiny numbers, we signal a
`floating-point-underflow` error that we can catch and establish a
restart to return 0.
For very large numbers that overflow, we just signal a reader-error
for now.
Update cmucl.pot too for the new string.
- - - - -
3 changed files:
- src/code/reader.lisp
- src/i18n/locale/cmucl.pot
- tests/float.lisp
Changes:
=====================================
src/code/reader.lisp
=====================================
@@ -1832,67 +1832,70 @@ the end of the stream."
;; throw an error immediately. We don't need to be super accurate
;; with the limits. The rest of the code will handle it correctly,
;; even if we're too small or too large.
- (unless (zerop number)
- (flet ((fast-log2 (n)
- ;; For an integer, the integer-length is close enough to
- ;; the log2 of the number.
- (integer-length n)))
- ;; log2(x) = log(number*10^exponent/divisor)
- ;; = exponent*log2(10) + log2(number)-log2(divisor)
- (let ((log2-num (+ (* exponent #.(kernel::log2 10d0))
- (fast-log2 number)
- (- (fast-log2 divisor)))))
- (multiple-value-bind (log2-low log2-high)
- (ecase float-format
- ((short-float single-float)
- ;; Single-float exponents range is -149 to 127, but we
- ;; don't need to be super-accurate since we're
- ;; multiplying the values by 2.
- (values (* 2 (- vm:single-float-normal-exponent-min
- vm:single-float-bias
- vm:single-float-digits))
- (* 2 (- vm:single-float-normal-exponent-max
- vm:single-float-bias))))
- ((double-float long-float
- #+double-double kernel:double-double-float)
- ;; Double-float exponent range is -1074 to -1023
- (values (* 2 (- vm:double-float-normal-exponent-min
- vm:double-float-bias
- vm:double-float-digits))
- (* 2 (- vm:double-float-normal-exponent-max
- vm:double-float-bias)))))
- (unless (< log2-low log2-num log2-high)
- ;; The number is definitely too large or too small to fit.
- ;; Signal an error.
- (%reader-error stream _"Number not representable as a ~S: ~S"
- float-format (read-buffer-to-string)))))))
-
- ;; Otherwise the number might fit, so we carefully compute the result.
- (handler-case
- (with-float-traps-masked (:underflow)
- (let* ((ratio (/ (* (expt 10 exponent) number)
- divisor))
- (result (coerce ratio float-format)))
- (when (and (zerop result) (not (zerop number)))
- ;; The number we've read is so small that it gets
- ;; converted to 0.0, but is not actually zero. Signal an
- ;; error. See CLHS 2.3.1.1.
- (error 'floating-point-underflow))
- result))
- (floating-point-underflow ()
- ;; Resignal a reader error, but allow the user to continue with
- ;; 0.
- (let ((zero (coerce 0 float-format)))
- (restart-case
- (%reader-error stream _"Floating point underflow when reading ~S: ~S"
- float-format (read-buffer-to-string))
- (continue ()
- :report (lambda (stream)
- (format stream "Return ~A" zero))
- zero))))
- (error ()
- (%reader-error stream _"Number not representable as a ~S: ~S"
- float-format (read-buffer-to-string)))))
+ (flet ((handle-extreme-numbers ()
+ (unless (zerop number)
+ (flet ((fast-log2 (n)
+ ;; For an integer, the integer-length is close enough to
+ ;; the log2 of the number.
+ (integer-length n)))
+ ;; log2(x) = log(number*10^exponent/divisor)
+ ;; = exponent*log2(10) + log2(number)-log2(divisor)
+ (let ((log2-num (+ (* exponent #.(kernel::log2 10d0))
+ (fast-log2 number)
+ (- (fast-log2 divisor)))))
+ (multiple-value-bind (log2-low log2-high)
+ (ecase float-format
+ ((short-float single-float)
+ ;; Single-float exponents range is -149 to 127, but we
+ ;; don't need to be super-accurate since we're
+ ;; multiplying the values by 2.
+ (values (* 2 (- vm:single-float-normal-exponent-min
+ vm:single-float-bias
+ vm:single-float-digits))
+ (* 2 (- vm:single-float-normal-exponent-max
+ vm:single-float-bias))))
+ ((double-float long-float
+ #+double-double kernel:double-double-float)
+ ;; Double-float exponent range is -1074 to -1023
+ (values (* 2 (- vm:double-float-normal-exponent-min
+ vm:double-float-bias
+ vm:double-float-digits))
+ (* 2 (- vm:double-float-normal-exponent-max
+ vm:double-float-bias)))))
+ (when (<= log2-num log2-low)
+ ;; Number is definitely too small; signal an underflow.
+ (error 'floating-point-underflow))
+ (when (>= log2-num log2-high)
+ ;; Number is definitely too large; signal an error
+ (error "Overflow"))))))))
+
+ ;; Otherwise the number might fit, so we carefully compute the result.
+ (handler-case
+ (with-float-traps-masked (:underflow)
+ (handle-extreme-numbers)
+ (let* ((ratio (/ (* (expt 10 exponent) number)
+ divisor))
+ (result (coerce ratio float-format)))
+ (when (and (zerop result) (not (zerop number)))
+ ;; The number we've read is so small that it gets
+ ;; converted to 0.0, but is not actually zero. Signal an
+ ;; error. See CLHS 2.3.1.1.
+ (error 'floating-point-underflow))
+ result))
+ (floating-point-underflow ()
+ ;; Resignal a reader error, but allow the user to continue with
+ ;; 0.
+ (let ((zero (coerce 0 float-format)))
+ (restart-case
+ (%reader-error stream _"Floating point underflow when reading ~S: ~S"
+ float-format (read-buffer-to-string))
+ (continue ()
+ :report (lambda (stream)
+ (format stream "Return ~A" zero))
+ zero))))
+ (error ()
+ (%reader-error stream _"Number not representable as a ~S: ~S"
+ float-format (read-buffer-to-string))))))
(defun make-ratio (stream)
=====================================
src/i18n/locale/cmucl.pot
=====================================
@@ -8750,11 +8750,11 @@ msgid "Internal error in floating point reader."
msgstr ""
#: src/code/reader.lisp
-msgid "Number not representable as a ~S: ~S"
+msgid "Floating point underflow when reading ~S: ~S"
msgstr ""
#: src/code/reader.lisp
-msgid "Floating point underflow when reading ~S: ~S"
+msgid "Number not representable as a ~S: ~S"
msgstr ""
#: src/code/reader.lisp
=====================================
tests/float.lisp
=====================================
@@ -247,3 +247,44 @@
(assert-equal 0.9999999999999999d0
(rounding-test 3d0))))
+(define-test reader.underflow-enabled
+ (:tag :issues)
+ ;; Test with FP underflow enabled, we can still read denormals
+ ;; without problem. For this test we only care that we get a
+ ;; number, not the actual value.
+ (dolist (n (list least-positive-single-float
+ least-positive-normalized-single-float
+ (/ (+ least-positive-single-float
+ least-positive-normalized-single-float)
+ 2)
+ least-positive-double-float
+ least-positive-normalized-double-float
+ (/ (+ least-positive-double-float
+ least-positive-normalized-double-float)
+ 2)
+ ))
+ (assert-true (floatp
+ (ext:with-float-traps-enabled (:underflow)
+ (read-from-string (format nil "~A" n)))))))
+
+(define-test reader-restarts.underflow
+ (:tag :issues)
+ ;; Test that we get a restart when reading floating-point numbers
+ ;; that are too small to fit in a float. Invoke the restart to
+ ;; return 0. All the numbers must be less than half the
+ ;; leasst-positive float.
+ (dolist (item '(("1e-46" 0f0)
+ ("1e-999" 0f0)
+ ("1d-324" 0d0)
+ ("1d-999" 0d0)))
+ (destructuring-bind (string expected-value)
+ item
+ (assert-equal expected-value
+ (values (handler-bind
+ ((reader-error
+ (lambda (c)
+ (declare (ignore c))
+ (invoke-restart 'lisp::continue))))
+ (read-from-string string)))))))
+
+
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/9a811166998f97f907d0f8…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/9a811166998f97f907d0f8…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
0cbb2264 by Raymond Toy at 2024-04-10T03:10:16+00:00
Fix #296: Fix disassembly of MOVD instruction
- - - - -
df78595e by Raymond Toy at 2024-04-10T03:10:20+00:00
Merge branch 'issue-296-fix-movd-disassembly' into 'master'
Fix #296: Fix disassembly of MOVD instruction
Closes #296 and #300
See merge request cmucl/cmucl!207
- - - - -
1 changed file:
- src/compiler/x86/insts.lisp
Changes:
=====================================
src/compiler/x86/insts.lisp
=====================================
@@ -509,6 +509,14 @@
(print-byte-reg value stream dstate)
(print-mem-access value stream t dstate)))
+(defun print-word-reg/mem (value stream dstate)
+ (declare (type (or list reg) value)
+ (type stream stream)
+ (type disassem:disassem-state dstate))
+ (if (typep value 'reg)
+ (print-word-reg value stream dstate)
+ (print-mem-access value stream nil dstate)))
+
(defun print-label (value stream dstate)
(declare (ignore dstate))
(princ (if (and (numberp value) (minusp value))
@@ -716,7 +724,11 @@
(disassem:define-argument-type byte-reg/mem
:prefilter #'prefilter-reg/mem
:printer #'print-byte-reg/mem)
-
+(disassem:define-argument-type word-reg/mem
+ ;; Like reg/mem but if the reg/mem field is a register, it's a word
+ ;; register.
+ :prefilter #'prefilter-reg/mem
+ :printer #'print-word-reg/mem)
;;;
;;; added by jrd
;;;
@@ -3478,7 +3490,7 @@
;;; We do not support the MMX version of this instruction.
(define-instruction movd (segment dst src)
(:printer ext-xmm-reg/mem ((prefix #x66) (op #x6e)))
- (:printer ext-xmm-reg/mem ((prefix #x66) (op #x7e))
+ (:printer ext-xmm-reg/mem ((prefix #x66) (op #x7e) (reg/mem nil :type 'word-reg/mem))
'(:name :tab reg/mem ", " reg))
(:emitter
(cond ((xmm-register-p dst)
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/d9983ea57162a21367d9ff…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/d9983ea57162a21367d9ff…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
d9983ea5 by Raymond Toy at 2024-04-09T11:59:46-07:00
Add comment about using -V and use a better version
Explain why we use `-V` for `bin/make-dist.sh`. And instead of using
"ci-build" as the version, use `git describe --dirty` as the version.
This lets us know better what version was actually used for the build.
- - - - -
1 changed file:
- .gitlab-ci.yml
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -48,7 +48,9 @@ linux:build:
# Regular build using the cross-compiled result or snapshot
- bin/build.sh $bootstrap -R -C "x86_linux_clang" -o snapshot/bin/lisp
# - bin/build.sh $bootstrap -R -C "x86_linux" -o snapshot/bin/lisp
- - bin/make-dist.sh -V ci-build -I dist linux-4
+ # Use -V to specify the version in case some tag makes git
+ # describe return something that make-dist.sh doesn't like.
+ - bin/make-dist.sh -V `git describe --dirty` -I dist linux-4
linux:test:
stage: test
@@ -131,7 +133,9 @@ osx:build:
# Regular build using the cross-compiled result or snapshot.
# Need /opt/local/bin to get msgmerge and msgfmt programs.
- PATH=/opt/local/bin:$PATH bin/build.sh $bootstrap -R -C "" -o snapshot/bin/lisp
- - bin/make-dist.sh -V ci-build -I dist darwin-4
+ # Use -V to specify the version in case some tag makes git
+ # describe return something that make-dist.sh doesn't like.
+ - bin/make-dist.sh -V `git describe --dirty` -I dist darwin-4
osx:test:
stage: test
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/d9983ea57162a21367d9ffa…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/d9983ea57162a21367d9ffa…
You're receiving this email because of your account on gitlab.common-lisp.net.
Raymond Toy pushed to branch issue-299-enable-xoroshiro-assem-routine at cmucl / cmucl
Commits:
ed577605 by Raymond Toy at 2024-04-08T20:22:10-07:00
Specify version when running make-dist.sh
Also print out the GIT_HASH so we can see why the -V option seems to
be needed now.
- - - - -
2 changed files:
- .gitlab-ci.yml
- bin/make-dist.sh
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -48,7 +48,7 @@ linux:build:
# Regular build using the cross-compiled result or snapshot
- bin/build.sh $bootstrap -R -C "x86_linux_clang" -o snapshot/bin/lisp
# - bin/build.sh $bootstrap -R -C "x86_linux" -o snapshot/bin/lisp
- - bin/make-dist.sh -I dist linux-4
+ - bin/make-dist.sh -V ci-build -I dist linux-4
linux:test:
stage: test
@@ -131,7 +131,7 @@ osx:build:
# Regular build using the cross-compiled result or snapshot.
# Need /opt/local/bin to get msgmerge and msgfmt programs.
- PATH=/opt/local/bin:$PATH bin/build.sh $bootstrap -R -C "" -o snapshot/bin/lisp
- - bin/make-dist.sh -I dist darwin-4
+ - bin/make-dist.sh -V ci-build -I dist darwin-4
osx:test:
stage: test
=====================================
bin/make-dist.sh
=====================================
@@ -98,6 +98,8 @@ def_arch_os
# ("snapshot-yyyy-mm") or a release number..
GIT_HASH="`(cd src; git describe --dirty 2>/dev/null)`"
+echo GIT_HASH = ${GIT_HASH}
+
if expr "X${GIT_HASH}" : 'Xsnapshot-[0-9][0-9][0-9][0-9]-[01][0-9]' > /dev/null; then
DEFAULT_VERSION=`expr "${GIT_HASH}" : "snapshot-\(.*\)"`
fi
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/ed5776053ba1c8db18bf20a…
--
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/commit/ed5776053ba1c8db18bf20a…
You're receiving this email because of your account on gitlab.common-lisp.net.