From: stassats <sta...@us...> - 2016-10-05 18:58:28
|
The branch "master" has been updated in SBCL: via 9d936845b2e12d2f43554448c20ee1675e129177 (commit) from 63622f92dd2c6493394acc1a903f037508bba35e (commit) - Log ----------------------------------------------------------------- commit 9d936845b2e12d2f43554448c20ee1675e129177 Author: Stas Boukarev <sta...@gm...> Date: Wed Oct 5 21:58:12 2016 +0300 Fix unsigned to float conversion on arm64. It was using SCVTF instead of UCVTF. --- src/compiler/arm64/float.lisp | 4 +++- tests/compiler.pure.lisp | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/src/compiler/arm64/float.lisp b/src/compiler/arm64/float.lisp index 4a22907..be16528 100644 --- a/src/compiler/arm64/float.lisp +++ b/src/compiler/arm64/float.lisp @@ -432,7 +432,9 @@ (:vop-var vop) (:save-p :compute-only) (:generator 5 - (inst scvtf y x))))) + (inst ,(if (eq from-type 'signed-num) + 'scvtf + 'ucvtf) y x))))) (frob %single-float/signed %single-float signed-reg signed-num single-reg single-float) (frob %double-float/signed %double-float diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 3d01107..abfaa2d 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -5986,3 +5986,10 @@ x))) '(2 4 3)) 3))) + +(with-test (:name :usigned-word-float-conversion) + (assert (= (rational (funcall (checked-compile `(lambda (x) + (float (the sb-ext:word x) 1d0))) + sb-ext:most-positive-word)) + #+32-bit 4294967295 + #+64-bit 18446744073709551616))) ----------------------------------------------------------------------- hooks/post-receive -- SBCL |