X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Fpred.lisp;h=5ed4fd905bf82dc4d6622ba78177412a7286f0d3;hb=9c510b74eca61bbcc2014dc2b1d02049dff50508;hp=da77d6fe0cab9cb2db8a0c39453a86d44622c86a;hpb=91ee7afd75d8b282829daa647d0a8f1469336a77;p=sbcl.git diff --git a/src/compiler/x86/pred.lisp b/src/compiler/x86/pred.lisp index da77d6f..5ed4fd9 100644 --- a/src/compiler/x86/pred.lisp +++ b/src/compiler/x86/pred.lisp @@ -82,8 +82,7 @@ the values, and VOP-name the name of the VOP that will be used to execute the conditional move.") -(!def-vm-support-routine - convert-conditional-move-p (node dst-tn x-tn y-tn) +(defun convert-conditional-move-p (node dst-tn x-tn y-tn) (declare (ignore node)) (let* ((ptype (sb!c::tn-primitive-type dst-tn)) (name (sb!c::primitive-type-name ptype)) @@ -177,7 +176,7 @@ (:info) (:policy :fast-safe) (:translate eq) - (:generator 3 + (:generator 6 (let ((x-val (encode-value-if-immediate x)) (y-val (encode-value-if-immediate y))) (cond @@ -189,3 +188,16 @@ ((sc-is x immediate) (inst cmp y x-val)) (t (inst cmp x y-val)))))) + +(macrolet ((def (eq-name eql-name cost) + `(define-vop (,eq-name ,eql-name) + (:translate eq) + (:variant-cost ,cost)))) + (def fast-if-eq-character fast-char=/character 3) + (def fast-if-eq-character/c fast-char=/character/c 2) + (def fast-if-eq-fixnum fast-eql/fixnum 3) + (def fast-if-eq-fixnum/c fast-eql-c/fixnum 2) + (def fast-if-eq-signed fast-if-eql/signed 5) + (def fast-if-eq-signed/c fast-if-eql-c/signed 4) + (def fast-if-eq-unsigned fast-if-eql/unsigned 5) + (def fast-if-eq-unsigned/c fast-if-eql-c/unsigned 4))