mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-16 22:32:05 -08:00
Check for NaNs among the compiled constants.
This commit is contained in:
parent
6b4dc0c182
commit
e361ceada2
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue