(:conditional :e)
(:policy :fast-safe)
(:translate eq)
- (:generator 8
+ (:generator 6
(cond
((sc-is y immediate)
(let ((val (tn-value y)))
;; We only weaken EQL => EQ for characters and fixnums, and detect
;; when types definitely mismatch. No need to import other EQL
;; VOPs (e.g. floats).
-(macrolet ((def (eq-name eql-name)
+(macrolet ((def (eq-name eql-name cost)
`(define-vop (,eq-name ,eql-name)
- (:translate eq))))
- (def fast-if-eq-character fast-char=/character)
- (def fast-if-eq-character/c fast-char=/character/c)
- (def fast-if-eq-fixnum fast-eql/fixnum)
- (def fast-if-eq-fixnum/c fast-eql-c/fixnum)
- (def fast-if-eq/signed fast-if-eql/signed)
- (def fast-if-eq-c/signed fast-if-eql-c/signed)
- (def fast-if-eq/unsigned fast-if-eql/unsigned)
- (def fast-if-eq-c/unsigned fast-if-eql-c/unsigned))
+ (: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))
(:info)
(:policy :fast-safe)
(:translate eq)
- (:generator 8
+ (:generator 6
(let ((x-val (encode-value-if-immediate x))
(y-val (encode-value-if-immediate y)))
(cond
(t (inst cmp x y-val))))))
-(macrolet ((def (eq-name eql-name)
+(macrolet ((def (eq-name eql-name cost)
`(define-vop (,eq-name ,eql-name)
- (:translate eq))))
- (def fast-if-eq-character fast-char=/character)
- (def fast-if-eq-character/c fast-char=/character/c)
- (def fast-if-eq-fixnum fast-eql/fixnum)
- (def fast-if-eq-fixnum/c fast-eql-c/fixnum)
- (def fast-if-eq/signed fast-if-eql/signed)
- (def fast-if-eq-c/signed fast-if-eql-c/signed)
- (def fast-if-eq/unsigned fast-if-eql/unsigned)
- (def fast-if-eq-c/unsigned fast-if-eql-c/unsigned))
+ (: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))