* In 1.0.38.5, I disabled the -c character compare VOPs on SB-UNICODE
because the instruction used (cmplwi) was limited to a 16-bit constant.
* Added a predicate to determine if a character can safely be used in
the -c character compare VOPs.
* Changed the required constant type on the -c character compare VOPs
from CHARACTER to (SATISFIES <the-new-predicate>).
* Back in the commit comment for 1.0.38.5 I said that there was no
good way to conditionally use the VOPs. Looks like I was wrong, unless
you want to argue that SATISFIES types are bad.
(:translate char>)
(:variant :gt :le))
-#!-sb-unicode (progn
-;; We can't use these when unicode is enabled because cmplwi has
-;; an immediate field far smaller than the width of some unicode
-;; code points. -- AB, 2010-Apr-24.
(define-vop (character-compare/c)
(:args (x :scs (character-reg)))
- (:arg-types character (:constant character))
+ (:arg-types character (:constant (satisfies inlinable-character-constant-p)))
(:conditional)
(:info target not-p y)
(:policy :fast-safe)
(define-vop (fast-char>/character/c character-compare/c)
(:translate char>)
(:variant :gt :le))
-) ;; Not sb-unicode
(if (static-symbol-p value)
(sc-number-or-lose 'immediate)
nil))))
+
+;;; A predicate to see if a character can be used as an inline
+;;; constant (the immediate field in the instruction used is sixteen
+;;; bits wide, which is not the same as any defined subtype of
+;;; CHARACTER).
+(defun inlinable-character-constant-p (char)
+ (and (characterp char)
+ (< (char-code char) #x10000)))
\f
;;;; function call parameters
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.39.7"
+"1.0.39.8"