X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgeneric%2Fearly-type-vops.lisp;h=8f289daef7030f682faad995cce970286a1b4a12;hb=a3649ba68e298d9203e8bb1de5629ff788586fe1;hp=06d21b386d6b682446fa40c41b19785d70d4b78f;hpb=9c9c68bd6e5e3c6d02e9f1bfd583b87bb9e85eea;p=sbcl.git diff --git a/src/compiler/generic/early-type-vops.lisp b/src/compiler/generic/early-type-vops.lisp index 06d21b3..8f289da 100644 --- a/src/compiler/generic/early-type-vops.lisp +++ b/src/compiler/generic/early-type-vops.lisp @@ -11,7 +11,9 @@ (in-package "SB!VM") (defparameter *immediate-types* - (list unbound-marker-widetag base-char-widetag)) + (list* unbound-marker-widetag character-widetag + (when (= sb!vm::n-word-bits 64) + (list single-float-widetag)))) (defparameter *fun-header-widetags* (list funcallable-instance-header-widetag @@ -57,7 +59,7 @@ (if (subsetp headers *fun-header-widetags*) t (error "can't test for mix of function subtypes ~ - and normal header types")) + and normal header types")) nil))) (unless type-codes (error "At least one type must be supplied for TEST-TYPE.")) @@ -70,23 +72,42 @@ (error "can't mix fixnum testing with other lowtags")) (when function-p (error "can't mix fixnum testing with function subtype testing")) - (when immediates - (error "can't mix fixnum testing with other immediates")) - (if headers - `(%test-fixnum-and-headers ,value ,target ,not-p - ',(canonicalize-headers headers) - ,@other-args) - `(%test-fixnum ,value ,target ,not-p - ,@other-args))) + (cond + ((and (= sb!vm:n-word-bits 64) immediates headers) + `(%test-fixnum-immediate-and-headers ,value ,target ,not-p + ,(car immediates) + ',(canonicalize-headers + headers) + ,@other-args)) + (immediates + (if (= sb!vm:n-word-bits 64) + `(%test-fixnum-and-immediate ,value ,target ,not-p + ,(car immediates) + ,@other-args) + (error "can't mix fixnum testing with other immediates"))) + (headers + `(%test-fixnum-and-headers ,value ,target ,not-p + ',(canonicalize-headers headers) + ,@other-args)) + (t + `(%test-fixnum ,value ,target ,not-p + ,@other-args)))) (immediates - (when headers - (error "can't mix testing of immediates with testing of headers")) - (when lowtags - (error "can't mix testing of immediates with testing of lowtags")) - (when (cdr immediates) - (error "can't test multiple immediates at the same time")) - `(%test-immediate ,value ,target ,not-p ,(car immediates) - ,@other-args)) + (cond + (headers + (if (= sb!vm:n-word-bits 64) + `(%test-immediate-and-headers ,value ,target ,not-p + ,(car immediates) + ',(canonicalize-headers headers) + ,@other-args) + (error "can't mix testing of immediates with testing of headers"))) + (lowtags + (error "can't mix testing of immediates with testing of lowtags")) + ((cdr immediates) + (error "can't test multiple immediates at the same time")) + (t + `(%test-immediate ,value ,target ,not-p ,(car immediates) + ,@other-args)))) (lowtags (when (cdr lowtags) (error "can't test multiple lowtags at the same time"))