0.9.1.24:
[sbcl.git] / src / compiler / x86-64 / arith.lisp
index c4fd46e..b0a7ead 100644 (file)
@@ -28,7 +28,7 @@
 (define-vop (signed-unop fast-safe-arith-op)
   (:args (x :scs (signed-reg) :target res))
   (:results (res :scs (signed-reg)))
-  (:note "inline (signed-byte 32) arithmetic")
+  (:note "inline (signed-byte 64) arithmetic")
   (:arg-types signed-num)
   (:result-types signed-num))
 
@@ -90,7 +90,7 @@
                               (sc-is r unsigned-stack)
                               (location= x r)))))
   (:result-types unsigned-num)
-  (:note "inline (unsigned-byte 32) arithmetic"))
+  (:note "inline (unsigned-byte 64) arithmetic"))
 
 (define-vop (fast-signed-binop fast-safe-arith-op)
   (:args (x :target r :scs (signed-reg)
                               (sc-is r signed-stack)
                               (location= x r)))))
   (:result-types signed-num)
-  (:note "inline (signed-byte 32) arithmetic"))
+  (:note "inline (signed-byte 64) arithmetic"))
 
 (define-vop (fast-fixnum-binop-c fast-safe-arith-op)
   (:args (x :target r :scs (any-reg control-stack)))
   (:results (r :scs (unsigned-reg)
               :load-if (not (location= x r))))
   (:result-types unsigned-num)
-  (:note "inline (unsigned-byte 32) arithmetic"))
+  (:note "inline (unsigned-byte 64) arithmetic"))
 
-;; 32 not 64 because it's hard work loading 64 bit constants
 (define-vop (fast-signed-binop-c fast-safe-arith-op)
   (:args (x :target r :scs (signed-reg signed-stack)))
   (:info y)
   (:results (r :scs (signed-reg)
               :load-if (not (location= x r))))
   (:result-types signed-num)
-  (:note "inline (signed-byte 32) arithmetic"))
+  (:note "inline (signed-byte 64) arithmetic"))
 
 (macrolet ((define-binop (translate untagged-penalty op)
             `(progn
                                  (sc-is y signed-reg)
                                  (location= x r)))))
   (:result-types signed-num)
-  (:note "inline (signed-byte 32) arithmetic")
+  (:note "inline (signed-byte 64) arithmetic")
   (:generator 5
     (cond ((and (sc-is x signed-reg) (sc-is y signed-reg) (sc-is r signed-reg)
                (not (location= x r)))
 (define-vop (fast-logand-c/signed-unsigned=>unsigned
             fast-logand-c/unsigned=>unsigned)
   (:args (x :target r :scs (signed-reg signed-stack)))
-  (:arg-types signed-num (:constant (unsigned-byte 32))))
+  (:arg-types signed-num (:constant (unsigned-byte 31))))
 
 (define-vop (fast-logand/unsigned-signed=>unsigned
             fast-logand/unsigned=>unsigned)
   (:results (r :scs (signed-reg)
               :load-if (not (location= x r))))
   (:result-types signed-num)
-  (:note "inline (signed-byte 32) arithmetic")
+  (:note "inline (signed-byte 64) arithmetic")
   (:generator 4
     (cond ((and (sc-is x signed-reg) (sc-is r signed-reg)
                (not (location= x r)))
                                  (sc-is r unsigned-stack)
                                  (location= x r)))))
   (:result-types unsigned-num)
-  (:note "inline (unsigned-byte 32) arithmetic")
+  (:note "inline (unsigned-byte 64) arithmetic")
   (:generator 5
     (cond ((and (sc-is x unsigned-reg) (sc-is y unsigned-reg)
                (sc-is r unsigned-reg) (not (location= x r)))
   (:translate +)
   (:args (x :target r :scs (unsigned-reg unsigned-stack)))
   (:info y)
-  (:arg-types unsigned-num (:constant (unsigned-byte 32)))
+  (:arg-types unsigned-num (:constant (unsigned-byte 31)))
   (:results (r :scs (unsigned-reg)
               :load-if (not (location= x r))))
   (:result-types unsigned-num)
-  (:note "inline (unsigned-byte 32) arithmetic")
+  (:note "inline (unsigned-byte 64) arithmetic")
   (:generator 4
     (cond ((and (sc-is x unsigned-reg) (sc-is r unsigned-reg)
                (not (location= x r)))
   (:arg-types signed-num signed-num)
   (:results (r :scs (signed-reg) :from (:argument 0)))
   (:result-types signed-num)
-  (:note "inline (signed-byte 32) arithmetic")
+  (:note "inline (signed-byte 64) arithmetic")
   (:generator 5
     (move r x)
     (inst imul r y)))
   (:arg-types signed-num (:constant (signed-byte 32)))
   (:results (r :scs (signed-reg)))
   (:result-types signed-num)
-  (:note "inline (signed-byte 32) arithmetic")
+  (:note "inline (signed-byte 64) arithmetic")
   (:generator 4
     (inst imul r x y)))
 
   (:ignore edx)
   (:results (result :scs (unsigned-reg)))
   (:result-types unsigned-num)
-  (:note "inline (unsigned-byte 32) arithmetic")
+  (:note "inline (unsigned-byte 64) arithmetic")
   (:vop-var vop)
   (:save-p :compute-only)
   (:generator 6
   (:results (quo :scs (unsigned-reg))
            (rem :scs (unsigned-reg)))
   (:result-types unsigned-num unsigned-num)
-  (:note "inline (unsigned-byte 32) arithmetic")
+  (:note "inline (unsigned-byte 64) arithmetic")
   (:vop-var vop)
   (:save-p :compute-only)
   (:generator 33
   (:translate truncate)
   (:args (x :scs (unsigned-reg) :target eax))
   (:info y)
-  (:arg-types unsigned-num (:constant (unsigned-byte 32)))
+  (:arg-types unsigned-num (:constant (unsigned-byte 31)))
   (:temporary (:sc unsigned-reg :offset eax-offset :target quo
                   :from :argument :to (:result 0)) eax)
   (:temporary (:sc unsigned-reg :offset edx-offset :target rem
   (:results (quo :scs (unsigned-reg))
            (rem :scs (unsigned-reg)))
   (:result-types unsigned-num unsigned-num)
-  (:note "inline (unsigned-byte 32) arithmetic")
+  (:note "inline (unsigned-byte 64) arithmetic")
   (:vop-var vop)
   (:save-p :compute-only)
   (:generator 32
   (:results (quo :scs (signed-reg))
            (rem :scs (signed-reg)))
   (:result-types signed-num signed-num)
-  (:note "inline (signed-byte 32) arithmetic")
+  (:note "inline (signed-byte 64) arithmetic")
   (:vop-var vop)
   (:save-p :compute-only)
   (:generator 33
   (:results (quo :scs (signed-reg))
            (rem :scs (signed-reg)))
   (:result-types signed-num signed-num)
-  (:note "inline (signed-byte 32) arithmetic")
+  (:note "inline (signed-byte 64) arithmetic")
   (:vop-var vop)
   (:save-p :compute-only)
   (:generator 32
     (move result number)
     (move ecx amount)
     (inst or ecx ecx)
-    (inst jmp :ns positive)
+    (inst jmp :ns POSITIVE)
     (inst neg ecx)
     (inst cmp ecx 63)
-    (inst jmp :be okay)
+    (inst jmp :be OKAY)
     (inst mov ecx 63)
     OKAY
     (inst sar result :cl)
-    (inst jmp done)
+    (inst jmp DONE)
 
     POSITIVE
     ;; The result-type ensures us that this shift will not overflow.
     (move result number)
     (move ecx amount)
     (inst or ecx ecx)
-    (inst jmp :ns positive)
+    (inst jmp :ns POSITIVE)
     (inst neg ecx)
     (inst cmp ecx 63)
-    (inst jmp :be okay)
+    (inst jmp :be OKAY)
     (inst xor result result)
-    (inst jmp done)
+    (inst jmp DONE)
     OKAY
     (inst shr result :cl)
-    (inst jmp done)
+    (inst jmp DONE)
 
     POSITIVE
     ;; The result-type ensures us that this shift will not overflow.
     (move result number)
     (move ecx amount)
     (inst or ecx ecx)
-    (inst jmp :ns positive)
+    (inst jmp :ns POSITIVE)
     (inst neg ecx)
     (inst xor zero zero)
     (inst shr result :cl)
     (inst cmp ecx 63)
     (inst cmov :nbe result zero)
-    (inst jmp done)
+    (inst jmp DONE)
     
     POSITIVE
     ;; The result-type ensures us that this shift will not overflow.
 \f
 (define-vop (signed-byte-64-len)
   (:translate integer-length)
-  (:note "inline (signed-byte 32) integer-length")
+  (:note "inline (signed-byte 64) integer-length")
   (:policy :fast-safe)
   (:args (arg :scs (signed-reg) :target res))
   (:arg-types signed-num)
     (inst not res)
     POS
     (inst bsr res res)
-    (inst jmp :z zero)
+    (inst jmp :z ZERO)
     (inst inc res)
-    (inst jmp done)
+    (inst jmp DONE)
     ZERO
     (inst xor res res)
     DONE))
 
 (define-vop (unsigned-byte-64-len)
   (:translate integer-length)
-  (:note "inline (unsigned-byte 32) integer-length")
+  (:note "inline (unsigned-byte 64) integer-length")
   (:policy :fast-safe)
   (:args (arg :scs (unsigned-reg)))
   (:arg-types unsigned-num)
   (:result-types unsigned-num)
   (:generator 26
     (inst bsr res arg)
-    (inst jmp :z zero)
+    (inst jmp :z ZERO)
     (inst inc res)
-    (inst jmp done)
+    (inst jmp DONE)
     ZERO
     (inst xor res res)
     DONE))
                               (sc-is y signed-reg))))
         (y :scs (signed-reg signed-stack)))
   (:arg-types signed-num signed-num)
-  (:note "inline (signed-byte 32) comparison"))
+  (:note "inline (signed-byte 64) comparison"))
 
 (define-vop (fast-conditional-c/signed fast-conditional/signed)
   (:args (x :scs (signed-reg signed-stack)))
                               (sc-is y unsigned-reg))))
         (y :scs (unsigned-reg unsigned-stack)))
   (:arg-types unsigned-num unsigned-num)
-  (:note "inline (unsigned-byte 32) comparison"))
+  (:note "inline (unsigned-byte 64) comparison"))
 
 (define-vop (fast-conditional-c/unsigned fast-conditional/unsigned)
   (:args (x :scs (unsigned-reg unsigned-stack)))