Commit e361cead authored by Juan Jose Garcia Ripoll's avatar Juan Jose Garcia Ripoll
Browse files

Check for NaNs among the compiled constants.

parent 6b4dc0c1
......@@ -32,21 +32,27 @@
(make-c1form* 'LOCATION :type 'CHARACTER
:args (list 'CHARACTER-VALUE (char-code val))))
((typep val 'DOUBLE-FLOAT)
(when (and (ext:float-nan-p val) (not only-small-values))
(cmperr "Cannot externalize value ~A" val))
(make-c1form* 'LOCATION :type 'DOUBLE-FLOAT
:args (list 'DOUBLE-FLOAT-VALUE val (add-object val))))
((typep val 'SINGLE-FLOAT)
(when (and (ext:float-nan-p val) (not only-small-values))
(cmperr "Cannot externalize value ~A" val))
(make-c1form* 'LOCATION :type 'SINGLE-FLOAT
:args (list 'SINGLE-FLOAT-VALUE val (add-object val))))
((typep val 'LONG-FLOAT)
(when (and (ext:float-nan-p val) (not only-small-values))
(cmperr "Cannot externalize value ~A" val))
(make-c1form* 'LOCATION :type 'LONG-FLOAT
:args (list 'LONG-FLOAT-VALUE val (add-object val))))
#+sse2
((typep val 'EXT:SSE-PACK)
(c1constant-value/sse val))
(only-small-values nil)
(always
(make-c1form* 'LOCATION :type (object-type val)
:args (add-object val)))
(only-small-values nil)
(t nil)))
#+sse2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment