- :disp (- (* ,slot sb!vm:word-bytes)
- sb!vm:other-pointer-lowtag))))
+ :disp (- (* ,slot n-word-bytes)
+ other-pointer-lowtag))))
(macrolet ((ea-for-xf-stack (tn kind)
`(make-ea
:dword :base ebp-tn
:disp (- (* (+ (tn-offset ,tn)
(ecase ,kind (:single 1) (:double 2) (:long 3)))
(macrolet ((ea-for-xf-stack (tn kind)
`(make-ea
:dword :base ebp-tn
:disp (- (* (+ (tn-offset ,tn)
(ecase ,kind (:single 1) (:double 2) (:long 3)))
(defun ea-for-sf-stack (tn)
(ea-for-xf-stack tn :single))
(defun ea-for-df-stack (tn)
(defun ea-for-sf-stack (tn)
(ea-for-xf-stack tn :single))
(defun ea-for-df-stack (tn)
(defun ea-for-csf-real-stack (tn &optional (base ebp-tn))
(ea-for-cxf-stack tn :single :real base))
(defun ea-for-csf-imag-stack (tn &optional (base ebp-tn))
(defun ea-for-csf-real-stack (tn &optional (base ebp-tn))
(ea-for-cxf-stack tn :single :real base))
(defun ea-for-csf-imag-stack (tn &optional (base ebp-tn))
-;;; x is source, y is destination
-(define-move-function (load-single 2) (vop x y)
+;;; X is source, Y is destination.
+(define-move-fun (load-single 2) (vop x y)
((single-reg) (single-stack))
(cond ((zerop (tn-offset x))
(inst fst (ea-for-sf-stack y)))
((single-reg) (single-stack))
(cond ((zerop (tn-offset x))
(inst fst (ea-for-sf-stack y)))
((double-reg) (double-stack))
(cond ((zerop (tn-offset x))
(inst fstd (ea-for-df-stack y)))
((double-reg) (double-stack))
(cond ((zerop (tn-offset x))
(inst fstd (ea-for-df-stack y)))
((long-reg) (long-stack))
(cond ((zerop (tn-offset x))
(store-long-float (ea-for-lf-stack y)))
((long-reg) (long-stack))
(cond ((zerop (tn-offset x))
(store-long-float (ea-for-lf-stack y)))
;;; stored in a more precise form on chip. Anyhow, might as well use
;;; the feature. It can be turned off by hacking the
;;; "immediate-constant-sc" in vm.lisp.
;;; stored in a more precise form on chip. Anyhow, might as well use
;;; the feature. It can be turned off by hacking the
;;; "immediate-constant-sc" in vm.lisp.
((fp-constant) (single-reg double-reg #!+long-float long-reg))
(let ((value (sb!c::constant-value (sb!c::tn-leaf x))))
(with-empty-tn@fp-top(y)
((fp-constant) (single-reg double-reg #!+long-float long-reg))
(let ((value (sb!c::constant-value (sb!c::tn-leaf x))))
(with-empty-tn@fp-top(y)
-;;; x is source, y is destination.
-(define-move-function (load-complex-single 2) (vop x y)
+;;; X is source, Y is destination.
+(define-move-fun (load-complex-single 2) (vop x y)
((complex-single-stack) (complex-single-reg))
(let ((real-tn (complex-single-reg-real-tn y)))
(with-empty-tn@fp-top (real-tn)
((complex-single-stack) (complex-single-reg))
(let ((real-tn (complex-single-reg-real-tn y)))
(with-empty-tn@fp-top (real-tn)
((complex-single-reg) (complex-single-stack))
(let ((real-tn (complex-single-reg-real-tn x)))
(cond ((zerop (tn-offset real-tn))
((complex-single-reg) (complex-single-stack))
(let ((real-tn (complex-single-reg-real-tn x)))
(cond ((zerop (tn-offset real-tn))
((complex-double-stack) (complex-double-reg))
(let ((real-tn (complex-double-reg-real-tn y)))
(with-empty-tn@fp-top(real-tn)
((complex-double-stack) (complex-double-reg))
(let ((real-tn (complex-double-reg-real-tn y)))
(with-empty-tn@fp-top(real-tn)
((complex-double-reg) (complex-double-stack))
(let ((real-tn (complex-double-reg-real-tn x)))
(cond ((zerop (tn-offset real-tn))
((complex-double-reg) (complex-double-stack))
(let ((real-tn (complex-double-reg-real-tn x)))
(cond ((zerop (tn-offset real-tn))
((complex-long-stack) (complex-long-reg))
(let ((real-tn (complex-long-reg-real-tn y)))
(with-empty-tn@fp-top(real-tn)
((complex-long-stack) (complex-long-reg))
(let ((real-tn (complex-long-reg-real-tn y)))
(with-empty-tn@fp-top(real-tn)
((complex-long-reg) (complex-long-stack))
(let ((real-tn (complex-long-reg-real-tn x)))
(cond ((zerop (tn-offset real-tn))
((complex-long-reg) (complex-long-stack))
(let ((real-tn (complex-long-reg-real-tn x)))
(cond ((zerop (tn-offset real-tn))
;;;; Note these are also used to stuff fp numbers onto the c-call
;;;; stack so the order is different than the lisp-stack.
;;;; Note these are also used to stuff fp numbers onto the c-call
;;;; stack so the order is different than the lisp-stack.
(with-tn@fp-top(x)
,@(ecase format
(:single '((inst fst ea)))
(:double '((inst fstd ea)))
#!+long-float
(:long '((store-long-float ea)))))))))))
(with-tn@fp-top(x)
,@(ecase format
(:single '((inst fst ea)))
(:double '((inst fstd ea)))
#!+long-float
(:long '((store-long-float ea)))))))))))
- (frob move-single-float-argument single-reg single-stack :single)
- (frob move-double-float-argument double-reg double-stack :double)
+ (frob move-single-float-arg single-reg single-stack :single)
+ (frob move-double-float-arg double-reg double-stack :double)
(single-reg double-reg #!+long-float long-reg
complex-single-reg complex-double-reg #!+long-float complex-long-reg)
(descriptor-reg))
(single-reg double-reg #!+long-float long-reg
complex-single-reg complex-double-reg #!+long-float complex-long-reg)
(descriptor-reg))
(storew lo-bits ebp-tn (- (1+ offset)))
(with-empty-tn@fp-top(res)
(inst fldd (make-ea :dword :base ebp-tn
(storew lo-bits ebp-tn (- (1+ offset)))
(with-empty-tn@fp-top(res)
(inst fldd (make-ea :dword :base ebp-tn
(storew lo-bits ebp-tn (- (+ offset 2)))
(with-empty-tn@fp-top(res)
(inst fldl (make-ea :dword :base ebp-tn
(storew lo-bits ebp-tn (- (+ offset 2)))
(with-empty-tn@fp-top(res)
(inst fldl (make-ea :dword :base ebp-tn
(inst fstd where)))
(loadw lo-bits ebp-tn (- (+ 2 (tn-offset temp)))))
(double-stack
(loadw lo-bits ebp-tn (- (+ 2 (tn-offset float)))))
(descriptor-reg
(inst fstd where)))
(loadw lo-bits ebp-tn (- (+ 2 (tn-offset temp)))))
(double-stack
(loadw lo-bits ebp-tn (- (+ 2 (tn-offset float)))))
(descriptor-reg
(store-long-float where)))
(loadw hi-bits ebp-tn (- (+ (tn-offset temp) 2))))
(long-stack
(loadw hi-bits ebp-tn (- (+ (tn-offset float) 2))))
(descriptor-reg
(store-long-float where)))
(loadw hi-bits ebp-tn (- (+ (tn-offset temp) 2))))
(long-stack
(loadw hi-bits ebp-tn (- (+ (tn-offset float) 2))))
(descriptor-reg
(store-long-float where)))
(loadw lo-bits ebp-tn (- (+ (tn-offset temp) 3))))
(long-stack
(loadw lo-bits ebp-tn (- (+ (tn-offset float) 3))))
(descriptor-reg
(store-long-float where)))
(loadw lo-bits ebp-tn (- (+ (tn-offset temp) 3))))
(long-stack
(loadw lo-bits ebp-tn (- (+ (tn-offset float) 3))))
(descriptor-reg
-(defconstant npx-env-size (* 7 sb!vm:word-bytes))
-(defconstant npx-cw-offset 0)
-(defconstant npx-sw-offset 4)
+(def!constant npx-env-size (* 7 n-word-bytes))
+(def!constant npx-cw-offset 0)
+(def!constant npx-sw-offset 4)
;; Perhaps this is OK because of the #!+LONG-FLOAT wrapped around
;; an enormous PROGN above. Still, it would be probably be good to
;; add some code to warn about redefining VOPs.
;; Perhaps this is OK because of the #!+LONG-FLOAT wrapped around
;; an enormous PROGN above. Still, it would be probably be good to
;; add some code to warn about redefining VOPs.