X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcompiler%2Fx86%2Fchar.lisp;h=2def9d479b5b78d0a2468447ea627abcb4e3dfc5;hb=dd357f3be290498fb7ef172696d986337f517a93;hp=f5ca821cc256df482f228e005e8cd7b77f27bca6;hpb=0bca0cb1bf5ce5572ab5cd7ba59f87fed1f2edb0;p=sbcl.git diff --git a/src/compiler/x86/char.lisp b/src/compiler/x86/char.lisp index f5ca821..2def9d4 100644 --- a/src/compiler/x86/char.lisp +++ b/src/compiler/x86/char.lisp @@ -138,3 +138,27 @@ (define-vop (fast-char>/base-char base-char-compare) (:translate char>) (:variant :a :na)) + +(define-vop (base-char-compare/c) + (:args (x :scs (base-char-reg base-char-stack))) + (:arg-types base-char (:constant base-char)) + (:conditional) + (:info target not-p y) + (:policy :fast-safe) + (:note "inline constant comparison") + (:variant-vars condition not-condition) + (:generator 2 + (inst cmp x (sb!xc:char-code y)) + (inst jmp (if not-p not-condition condition) target))) + +(define-vop (fast-char=/base-char/c base-char-compare/c) + (:translate char=) + (:variant :e :ne)) + +(define-vop (fast-char/base-char/c base-char-compare/c) + (:translate char>) + (:variant :a :na))