X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86-64%2Ffloat.lisp;h=397ffdf19922a2cb6aeb946e1b7c0892f6771e4c;hb=7dfa54273d2ebc6c2be9a39ab5cd6df639d340c9;hp=c74c8c7a6cd7a019301b972ed4a149009d7c2c0a;hpb=3a5eea238fd103af32a3d26082d1b9f7388ddf4b;p=sbcl.git diff --git a/src/compiler/x86-64/float.lisp b/src/compiler/x86-64/float.lisp index c74c8c7..397ffdf 100644 --- a/src/compiler/x86-64/float.lisp +++ b/src/compiler/x86-64/float.lisp @@ -856,7 +856,7 @@ :load-if (not (sc-is y ,constant-sc)))) (:arg-types ,type ,type) (:temporary (:sc ,sc :from :eval) mask) - (:temporary (:sc any-reg) bits) + (:temporary (:sc dword-reg) bits) (:conditional :e) (:generator ,cost (when (or (location= y mask) @@ -868,7 +868,8 @@ (setf y (register-inline-constant :aligned (tn-value y)))) (inst pcmpeqd mask y) (inst movmskps bits mask) - (inst cmp bits #b1111))))) + (inst cmp (if (location= bits eax-tn) al-tn bits) + #b1111))))) (define-float-eql eql/single-float 4 single-reg fp-single-immediate single-float) (define-float-eql eql/double-float 4 @@ -980,7 +981,7 @@ :load-if (not (sc-is y ,complex-constant-sc)))) (:arg-types ,complex-type ,complex-type) (:temporary (:sc ,complex-sc :from :eval) cmp) - (:temporary (:sc unsigned-reg) bits) + (:temporary (:sc dword-reg) bits) (:info) (:conditional :e) (:generator 3 @@ -1000,7 +1001,8 @@ (note-this-location vop :internal-error) (inst ,cmp-inst :eq cmp y) (inst ,mask-inst bits cmp) - (inst cmp bits ,mask))) + (inst cmp (if (location= bits eax-tn) al-tn bits) + ,mask))) (define-vop (,complex-real-name ,complex-complex-name) (:args (x :scs (,complex-sc ,complex-constant-sc) :target cmp @@ -1264,17 +1266,21 @@ (:policy :fast-safe) (:vop-var vop) (:generator 5 - (sc-case float - (double-reg - (inst movsd temp float) - (move lo-bits temp)) - (double-stack - (loadw lo-bits ebp-tn (frame-word-offset (tn-offset float)))) - (descriptor-reg - (loadw lo-bits float double-float-value-slot - other-pointer-lowtag))) - (inst shl lo-bits 32) - (inst shr lo-bits 32))) + (let ((dword-lo-bits (reg-in-size lo-bits :dword))) + (sc-case float + (double-reg + (inst movsd temp float) + (inst mov dword-lo-bits + (make-ea :dword :base rbp-tn + :disp (frame-byte-offset (tn-offset temp))))) + (double-stack + (inst mov dword-lo-bits + (make-ea :dword :base rbp-tn + :disp (frame-byte-offset (tn-offset float))))) + (descriptor-reg + (inst mov dword-lo-bits + (make-ea-for-object-slot-half float double-float-value-slot + other-pointer-lowtag)))))))