in vop templates, (:constant <type>) eventually boiled down to a TYPEP
test. For (:constant fixnum) in the cross-compiler, this is not right,
because the typep test runs on the host. Use SB!XC:TYPEP instead, which
means making sure that types are available to the cross-compiler (using
DEF!TYPE instead of DEFTYPE). Tested on x86-64; one issue on ppc fixed
blindly.
(if (stringp host-object)
(warn-and-give-up)
(values nil t)))
- ((target-type-is-in '(character base-char))
+ ((target-type-is-in '(character base-char standard-char))
(cond ((typep host-object 'standard-char)
(values t t))
((not (characterp host-object))
(rest type))))
(:constant
``(:constant ,#'(lambda (x)
- (typep x ',(second type)))
+ (sb!xc:typep x ',(second type)))
,',(second type)))))))
(defun specify-operand-types (types ops more-ops)
(define-vop (character-compare/c)
(:args (x :scs (character-reg)))
- (:arg-types character (:constant (satisfies inlinable-character-constant-p)))
+ (:arg-types character
+ ;; KLUDGE: having a SATISFIES type here is too hairy for
+ ;; the cross-compiler (running on an arbitrary CL host)
+ ;; to cope with. Since we know we only have standard
+ ;; characters in the build anyway, we can restrict the
+ ;; cross-compiler's arg type to standard char, and all
+ ;; is well.
+ #+sb-xc-host
+ (:constant standard-char)
+ #-sb-xc-host
+ (:constant (satisfies inlinable-character-constant-p)))
(:conditional)
(:info target not-p y)
(:policy :fast-safe)
;; For use in constant indexing; we can't use INDEX since the displacement
;; field of an EA can't contain 64 bit values.
-(deftype low-index () '(signed-byte 29))
+(def!type low-index () '(signed-byte 29))
;;;; allocator for the array header