SPARC only supports (SIGNED-BYTE 13) for literal values. Only emit
comparison with literal characters up to (CODE-CHAR 4095).
Reported by Eric Marsden on sbcl-devel.
Fixes lp#883519.
* bug fix: low-level control flow optimisations could result in bogus
code in functions with tail and non-tail calls to local functions on
x86oids. (lp#883500)
+ * bug fix: on SPARC/:sb-unicode, avoid crashing the assembler by trying
+ to emit literal characters > (code-char 4095), for comparisons with
+ constant characters.
changes in sbcl-1.0.52 relative to sbcl-1.0.51:
* enhancement: ASDF has been updated to version 2.017.
(define-vop (character-compare/c)
(:args (x :scs (character-reg)))
- (:arg-types character (:constant character))
+ (:arg-types character (:constant (character-set ((0 . 4095)))))
(:conditional)
(:info target not-p y)
(:policy :fast-safe)
(declare (optimize (speed 0)))
(mod (mod a (min -5 a)) 5)))
1))
+
+;; Test for literals too large for the ISA (e.g. (SIGNED-BYTE 13) on SPARC).
+#+sb-unicode
+(with-test (:name :bug-883519)
+ (compile nil `(lambda (x)
+ (declare (type character x))
+ (eql x #\U0010FFFF))))