0.9.6.32:
[sbcl.git] / src / compiler / x86-64 / c-call.lisp
index 1ab967a..b2e4fc3 100644 (file)
 ;;; The ABI specifies that signed short/int's are returned as 32-bit
 ;;; values. Negative values need to be sign-extended to 64-bits (done
 ;;; in a :NATURALIZE-GEN alien-type-method).
-(defknown sign-extend (fixnum) fixnum (foldable flushable movable))
+(defknown sign-extend ((signed-byte 64)) (signed-byte 64)
+          (foldable flushable movable))
 
 (define-vop (sign-extend)
   (:translate sign-extend)
   (:policy :fast-safe)
-  (:args (val :scs (any-reg)))
-  (:arg-types fixnum)
-  (:results (res :scs (any-reg)))
-  (:result-types fixnum)
+  (:args (val :scs (signed-reg)))
+  (:arg-types signed-byte-64)
+  (:results (res :scs (signed-reg)))
+  (:result-types signed-byte-64)
   (:generator 1
    (inst movsxd res
          (make-random-tn :kind :normal
                                  'float-registers)))
     (inst call function)
     ;; To give the debugger a clue. XX not really internal-error?
-    (note-this-location vop :internal-error)
-    ;; FLOAT15 needs to contain FP zero in Lispland
-    (let ((float15 (make-random-tn :kind :normal
-                               :sc (sc-or-lose 'double-reg)
-                               :offset float15-offset)))
-      (inst xorpd float15 float15))))
+    (note-this-location vop :internal-error)))
 
 (define-vop (alloc-number-stack-space)
   (:info amount)