1 ;;;; various primitive memory access VOPs for the x86 VM
3 ;;;; This software is part of the SBCL system. See the README file for
6 ;;;; This software is derived from the CMU CL system, which was
7 ;;;; written at Carnegie Mellon University and released into the
8 ;;;; public domain. The software is in the public domain and is
9 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
10 ;;;; files for more information.
14 ;;;; data object ref/set stuff
17 (:args (object :scs (descriptor-reg)))
18 (:info name offset lowtag)
20 (:results (result :scs (descriptor-reg any-reg)))
22 (loadw result object offset lowtag)))
24 (define-vop (set-slot)
25 (:args (object :scs (descriptor-reg))
26 (value :scs (descriptor-reg any-reg immediate)))
27 (:temporary (:sc descriptor-reg) temp)
28 (:info name offset lowtag)
32 (if (sc-is value immediate)
33 (let ((val (tn-value value)))
34 (move-immediate (make-ea :qword
36 :disp (- (* offset n-word-bytes)
42 (+ nil-value (static-symbol-offset val)))
44 (logior (ash (char-code val) n-widetag-bits)
47 ;; Else, value not immediate.
48 (storew value object offset lowtag))))
52 ;;;; symbol hacking VOPs
54 ;;; these next two cf the sparc version, by jrd.
55 ;;; FIXME: Deref this ^ reference.
58 ;;; The compiler likes to be able to directly SET symbols.
61 (:args (symbol :scs (descriptor-reg))
62 (value :scs (descriptor-reg any-reg)))
63 (:temporary (:sc descriptor-reg) tls)
64 ;;(:policy :fast-safe)
66 (let ((global-val (gen-label))
68 (loadw tls symbol symbol-tls-index-slot other-pointer-lowtag)
70 (inst jmp :z global-val)
71 (inst fs-segment-prefix)
72 (inst cmp (make-ea :dword :scale 1 :index tls) unbound-marker-widetag)
73 (inst jmp :z global-val)
74 (inst fs-segment-prefix)
75 (inst mov (make-ea :dword :scale 1 :index tls) value)
77 (emit-label global-val)
78 (storew value symbol symbol-value-slot other-pointer-lowtag)
81 ;; unithreaded it's a lot simpler ...
83 (define-vop (set cell-set)
84 (:variant symbol-value-slot other-pointer-lowtag))
86 ;;; Do a cell ref with an error check for being unbound.
87 ;;; XXX stil used? I can't see where -dan
88 (define-vop (checked-cell-ref)
89 (:args (object :scs (descriptor-reg) :target obj-temp))
90 (:results (value :scs (descriptor-reg any-reg)))
93 (:save-p :compute-only)
94 (:temporary (:sc descriptor-reg :from (:argument 0)) obj-temp))
96 ;;; With Symbol-Value, we check that the value isn't the trap object. So
97 ;;; Symbol-Value of NIL is NIL.
99 (define-vop (symbol-value)
100 (:translate symbol-value)
102 (:args (object :scs (descriptor-reg) :to (:result 1)))
103 (:results (value :scs (descriptor-reg any-reg)))
105 (:save-p :compute-only)
107 (let* ((err-lab (generate-error-code vop unbound-symbol-error object))
108 (ret-lab (gen-label)))
109 (loadw value object symbol-tls-index-slot other-pointer-lowtag)
110 (inst fs-segment-prefix)
111 (inst mov value (make-ea :dword :index value :scale 1))
112 (inst cmp value unbound-marker-widetag)
113 (inst jmp :ne ret-lab)
114 (loadw value object symbol-value-slot other-pointer-lowtag)
115 (inst cmp value unbound-marker-widetag)
116 (inst jmp :e err-lab)
117 (emit-label ret-lab))))
120 (define-vop (fast-symbol-value symbol-value)
121 ;; KLUDGE: not really fast, in fact, because we're going to have to
122 ;; do a full lookup of the thread-local area anyway. But half of
123 ;; the meaning of FAST-SYMBOL-VALUE is "do not signal an error if
124 ;; unbound", which is used in the implementation of COPY-SYMBOL. --
127 (:translate symbol-value)
129 (let ((ret-lab (gen-label)))
130 (loadw value object symbol-tls-index-slot other-pointer-lowtag)
131 (inst fs-segment-prefix)
132 (inst mov value (make-ea :dword :index value :scale 1))
133 (inst cmp value unbound-marker-widetag)
134 (inst jmp :ne ret-lab)
135 (loadw value object symbol-value-slot other-pointer-lowtag)
136 (emit-label ret-lab))))
139 (define-vop (symbol-value)
140 (:translate symbol-value)
142 (:args (object :scs (descriptor-reg) :to (:result 1)))
143 (:results (value :scs (descriptor-reg any-reg)))
145 (:save-p :compute-only)
147 (let ((err-lab (generate-error-code vop unbound-symbol-error object)))
148 (loadw value object symbol-value-slot other-pointer-lowtag)
149 (inst cmp value unbound-marker-widetag)
150 (inst jmp :e err-lab))))
153 (define-vop (fast-symbol-value cell-ref)
154 (:variant symbol-value-slot other-pointer-lowtag)
156 (:translate symbol-value))
158 (defknown locked-symbol-global-value-add (symbol fixnum) fixnum ())
160 (define-vop (locked-symbol-global-value-add)
161 (:args (object :scs (descriptor-reg) :to :result)
162 (value :scs (any-reg) :target result))
163 (:arg-types * tagged-num)
164 (:results (result :scs (any-reg) :from (:argument 1)))
166 (:translate locked-symbol-global-value-add)
167 (:result-types tagged-num)
172 (inst add (make-ea :dword :base object
173 :disp (- (* symbol-value-slot n-word-bytes)
174 other-pointer-lowtag))
181 (:args (object :scs (descriptor-reg)))
184 (:temporary (:sc descriptor-reg #+nil(:from (:argument 0))) value)
187 (let ((not-target (gen-label)))
188 (loadw value object symbol-value-slot other-pointer-lowtag)
189 (inst cmp value unbound-marker-widetag)
190 (inst jmp :ne not-target)
191 (loadw value object symbol-tls-index-slot other-pointer-lowtag)
192 (inst fs-segment-prefix)
193 (inst cmp (make-ea :dword :index value :scale 1) unbound-marker-widetag)
195 (emit-label not-target))
197 (loadw value object symbol-value-slot other-pointer-lowtag)
198 (inst cmp value unbound-marker-widetag)
199 (inst jmp :ne target)
200 (loadw value object symbol-tls-index-slot other-pointer-lowtag)
201 (inst fs-segment-prefix)
202 (inst cmp (make-ea :dword :index value :scale 1) unbound-marker-widetag)
203 (inst jmp :ne target)))))
209 (:args (object :scs (descriptor-reg)))
212 (:temporary (:sc descriptor-reg :from (:argument 0)) value)
214 (loadw value object symbol-value-slot other-pointer-lowtag)
215 (inst cmp value unbound-marker-widetag)
216 (inst jmp (if not-p :e :ne) target)))
219 (define-vop (symbol-hash)
221 (:translate symbol-hash)
222 (:args (symbol :scs (descriptor-reg)))
223 (:results (res :scs (any-reg)))
224 (:result-types positive-fixnum)
226 ;; The symbol-hash slot of NIL holds NIL because it is also the
227 ;; cdr slot, so we have to strip off the three low bits to make sure
228 ;; it is a fixnum. The lowtag selection magic that is required to
229 ;; ensure this is explained in the comment in objdef.lisp
230 (loadw res symbol symbol-hash-slot other-pointer-lowtag)
231 (inst and res (lognot #b111))))
233 ;;;; fdefinition (FDEFN) objects
235 (define-vop (fdefn-fun cell-ref) ; /pfw - alpha
236 (:variant fdefn-fun-slot other-pointer-lowtag))
238 (define-vop (safe-fdefn-fun)
239 (:args (object :scs (descriptor-reg) :to (:result 1)))
240 (:results (value :scs (descriptor-reg any-reg)))
242 (:save-p :compute-only)
244 (loadw value object fdefn-fun-slot other-pointer-lowtag)
245 (inst cmp value nil-value)
246 (let ((err-lab (generate-error-code vop undefined-fun-error object)))
247 (inst jmp :e err-lab))))
249 (define-vop (set-fdefn-fun)
251 (:translate (setf fdefn-fun))
252 (:args (function :scs (descriptor-reg) :target result)
253 (fdefn :scs (descriptor-reg)))
254 (:temporary (:sc unsigned-reg) raw)
255 (:temporary (:sc byte-reg) type)
256 (:results (result :scs (descriptor-reg)))
258 (load-type type function (- fun-pointer-lowtag))
260 (make-ea :byte :base function
261 :disp (- (* simple-fun-code-offset n-word-bytes)
262 fun-pointer-lowtag)))
263 (inst cmp type simple-fun-header-widetag)
264 (inst jmp :e NORMAL-FUN)
265 (inst lea raw (make-fixup "closure_tramp" :foreign))
267 (storew function fdefn fdefn-fun-slot other-pointer-lowtag)
268 (storew raw fdefn fdefn-raw-addr-slot other-pointer-lowtag)
269 (move result function)))
271 (define-vop (fdefn-makunbound)
273 (:translate fdefn-makunbound)
274 (:args (fdefn :scs (descriptor-reg) :target result))
275 (:results (result :scs (descriptor-reg)))
277 (storew nil-value fdefn fdefn-fun-slot other-pointer-lowtag)
278 (storew (make-fixup "undefined_tramp" :foreign)
279 fdefn fdefn-raw-addr-slot other-pointer-lowtag)
280 (move result fdefn)))
282 ;;;; binding and unbinding
284 ;;; BIND -- Establish VAL as a binding for SYMBOL. Save the old value and
285 ;;; the symbol on the binding stack and stuff the new value into the
290 (:args (val :scs (any-reg descriptor-reg))
291 (symbol :scs (descriptor-reg)))
292 (:temporary (:sc unsigned-reg) tls-index temp bsp)
294 (let ((tls-index-valid (gen-label)))
295 (load-tl-symbol-value bsp *binding-stack-pointer*)
296 (loadw tls-index symbol symbol-tls-index-slot other-pointer-lowtag)
297 (inst add bsp (* binding-size n-word-bytes))
298 (store-tl-symbol-value bsp *binding-stack-pointer* temp)
300 (inst or tls-index tls-index)
301 (inst jmp :ne tls-index-valid)
302 ;; allocate a new tls-index
303 (load-symbol-value tls-index *free-tls-index*)
304 (inst add tls-index 4) ;XXX surely we can do this more
305 (store-symbol-value tls-index *free-tls-index*) ;succintly
306 (inst sub tls-index 4)
307 (storew tls-index symbol symbol-tls-index-slot other-pointer-lowtag)
308 (emit-label tls-index-valid)
309 (inst fs-segment-prefix)
310 (inst mov temp (make-ea :dword :scale 1 :index tls-index))
311 (storew temp bsp (- binding-value-slot binding-size))
312 (storew symbol bsp (- binding-symbol-slot binding-size))
313 (inst fs-segment-prefix)
314 (inst mov (make-ea :dword :scale 1 :index tls-index) val))))
318 (:args (val :scs (any-reg descriptor-reg))
319 (symbol :scs (descriptor-reg)))
320 (:temporary (:sc unsigned-reg) temp bsp)
322 (load-symbol-value bsp *binding-stack-pointer*)
323 (loadw temp symbol symbol-value-slot other-pointer-lowtag)
324 (inst add bsp (* binding-size n-word-bytes))
325 (store-symbol-value bsp *binding-stack-pointer*)
326 (storew temp bsp (- binding-value-slot binding-size))
327 (storew symbol bsp (- binding-symbol-slot binding-size))
328 (storew val symbol symbol-value-slot other-pointer-lowtag)))
334 (:temporary (:sc unsigned-reg) symbol value bsp tls-index)
336 (load-tl-symbol-value bsp *binding-stack-pointer*)
337 (loadw symbol bsp (- binding-symbol-slot binding-size))
338 (loadw value bsp (- binding-value-slot binding-size))
340 (loadw tls-index symbol symbol-tls-index-slot other-pointer-lowtag)
341 (inst fs-segment-prefix)
342 (inst mov (make-ea :dword :scale 1 :index tls-index) value)
344 (storew 0 bsp (- binding-symbol-slot binding-size))
345 (inst sub bsp (* binding-size n-word-bytes))
346 ;; we're done with value, so we can use it as a temp here
347 (store-tl-symbol-value bsp *binding-stack-pointer* value)))
351 (:temporary (:sc unsigned-reg) symbol value bsp)
353 (load-symbol-value bsp *binding-stack-pointer*)
354 (loadw symbol bsp (- binding-symbol-slot binding-size))
355 (loadw value bsp (- binding-value-slot binding-size))
356 (storew value symbol symbol-value-slot other-pointer-lowtag)
357 (storew 0 bsp (- binding-symbol-slot binding-size))
358 (inst sub bsp (* binding-size n-word-bytes))
359 (store-symbol-value bsp *binding-stack-pointer*)))
362 (define-vop (unbind-to-here)
363 (:args (where :scs (descriptor-reg any-reg)))
364 (:temporary (:sc unsigned-reg) symbol value bsp #!+sb-thread tls-index)
366 (load-tl-symbol-value bsp *binding-stack-pointer*)
371 (loadw symbol bsp (- binding-symbol-slot binding-size))
372 (inst or symbol symbol)
374 (loadw value bsp (- binding-value-slot binding-size))
375 #!-sb-thread (storew value symbol symbol-value-slot other-pointer-lowtag)
378 tls-index symbol symbol-tls-index-slot other-pointer-lowtag)
379 #!+sb-thread (inst fs-segment-prefix)
380 #!+sb-thread (inst mov (make-ea :dword :scale 1 :index tls-index) value)
381 (storew 0 bsp (- binding-symbol-slot binding-size))
384 (inst sub bsp (* binding-size n-word-bytes))
387 ;; we're done with value, so can use it as a temporary
388 (store-tl-symbol-value bsp *binding-stack-pointer* value)
394 ;;;; closure indexing
396 (define-full-reffer closure-index-ref *
397 closure-info-offset fun-pointer-lowtag
398 (any-reg descriptor-reg) * %closure-index-ref)
400 (define-full-setter set-funcallable-instance-info *
401 funcallable-instance-info-offset fun-pointer-lowtag
402 (any-reg descriptor-reg) * %set-funcallable-instance-info)
404 (define-full-reffer funcallable-instance-info *
405 funcallable-instance-info-offset fun-pointer-lowtag
406 (descriptor-reg any-reg) * %funcallable-instance-info)
408 (define-vop (funcallable-instance-lexenv cell-ref)
409 (:variant funcallable-instance-lexenv-slot fun-pointer-lowtag))
411 (define-vop (closure-ref slot-ref)
412 (:variant closure-info-offset fun-pointer-lowtag))
414 (define-vop (closure-init slot-set)
415 (:variant closure-info-offset fun-pointer-lowtag))
417 ;;;; value cell hackery
419 (define-vop (value-cell-ref cell-ref)
420 (:variant value-cell-value-slot other-pointer-lowtag))
422 (define-vop (value-cell-set cell-set)
423 (:variant value-cell-value-slot other-pointer-lowtag))
425 ;;;; structure hackery
427 (define-vop (instance-length)
429 (:translate %instance-length)
430 (:args (struct :scs (descriptor-reg)))
431 (:results (res :scs (unsigned-reg)))
432 (:result-types positive-fixnum)
434 (loadw res struct 0 instance-pointer-lowtag)
435 (inst shr res n-widetag-bits)))
437 (define-vop (instance-ref slot-ref)
438 (:variant instance-slots-offset instance-pointer-lowtag)
440 (:translate %instance-ref)
441 (:arg-types instance (:constant index)))
443 (define-vop (instance-set slot-set)
445 (:translate %instance-set)
446 (:variant instance-slots-offset instance-pointer-lowtag)
447 (:arg-types instance (:constant index) *))
449 (define-full-reffer instance-index-ref * instance-slots-offset
450 instance-pointer-lowtag (any-reg descriptor-reg) * %instance-ref)
452 (define-full-setter instance-index-set * instance-slots-offset
453 instance-pointer-lowtag (any-reg descriptor-reg) * %instance-set)
456 (defknown %instance-set-conditional (instance index t t) t
459 (define-vop (instance-set-conditional)
460 (:translate %instance-set-conditional)
461 (:args (object :scs (descriptor-reg) :to :eval)
462 (slot :scs (any-reg) :to :result)
463 (old-value :scs (descriptor-reg any-reg) :target eax)
464 (new-value :scs (descriptor-reg any-reg)))
465 (:arg-types instance positive-fixnum * *)
466 (:temporary (:sc descriptor-reg :offset eax-offset
467 :from (:argument 2) :to :result :target result) eax)
468 (:results (result :scs (descriptor-reg any-reg)))
469 ;(:guard (backend-featurep :i486))
474 (inst cmpxchg (make-ea :dword :base object :index slot :scale 1
475 :disp (- (* instance-slots-offset n-word-bytes)
476 instance-pointer-lowtag))
482 ;;;; code object frobbing
484 (define-full-reffer code-header-ref * 0 other-pointer-lowtag
485 (any-reg descriptor-reg) * code-header-ref)
487 (define-full-setter code-header-set * 0 other-pointer-lowtag
488 (any-reg descriptor-reg) * code-header-set)
492 ;;;; raw instance slot accessors
494 (define-vop (raw-instance-ref/word)
495 (:translate %raw-instance-ref/word)
497 (:args (object :scs (descriptor-reg)) (index :scs (any-reg)))
498 (:arg-types * tagged-num)
499 (:temporary (:sc unsigned-reg) tmp)
500 (:results (value :scs (unsigned-reg)))
501 (:result-types unsigned-num)
503 (loadw tmp object 0 instance-pointer-lowtag)
504 (inst shr tmp n-widetag-bits)
512 :disp (- (* (1- instance-slots-offset) n-word-bytes)
513 instance-pointer-lowtag)))))
515 (define-vop (raw-instance-set/word)
516 (:translate %raw-instance-set/word)
518 (:args (object :scs (descriptor-reg))
519 (index :scs (any-reg))
520 (value :scs (unsigned-reg) :target result))
521 (:arg-types * tagged-num unsigned-num)
522 (:temporary (:sc unsigned-reg) tmp)
523 (:results (result :scs (unsigned-reg)))
524 (:result-types unsigned-num)
526 (loadw tmp object 0 instance-pointer-lowtag)
527 (inst shr tmp n-widetag-bits)
534 :disp (- (* (1- instance-slots-offset) n-word-bytes)
535 instance-pointer-lowtag))
537 (move result value)))
539 (define-vop (raw-instance-ref/single)
540 (:translate %raw-instance-ref/single)
542 (:args (object :scs (descriptor-reg))
543 (index :scs (any-reg)))
544 (:arg-types * positive-fixnum)
545 (:temporary (:sc unsigned-reg) tmp)
546 (:results (value :scs (single-reg)))
547 (:result-types single-float)
549 (loadw tmp object 0 instance-pointer-lowtag)
550 (inst shr tmp n-widetag-bits)
558 :disp (- (* (1- instance-slots-offset) n-word-bytes)
559 instance-pointer-lowtag)))))
561 (define-vop (raw-instance-set/single)
562 (:translate %raw-instance-set/single)
564 (:args (object :scs (descriptor-reg))
565 (index :scs (any-reg))
566 (value :scs (single-reg) :target result))
567 (:arg-types * positive-fixnum single-float)
568 (:temporary (:sc unsigned-reg) tmp)
569 (:results (result :scs (single-reg)))
570 (:result-types single-float)
572 (loadw tmp object 0 instance-pointer-lowtag)
573 (inst shr tmp n-widetag-bits)
580 :disp (- (* (1- instance-slots-offset) n-word-bytes)
581 instance-pointer-lowtag))
583 (unless (location= result value)
584 (inst movss result value))))
586 (define-vop (raw-instance-ref/double)
587 (:translate %raw-instance-ref/double)
589 (:args (object :scs (descriptor-reg))
590 (index :scs (any-reg)))
591 (:arg-types * positive-fixnum)
592 (:temporary (:sc unsigned-reg) tmp)
593 (:results (value :scs (double-reg)))
594 (:result-types double-float)
596 (loadw tmp object 0 instance-pointer-lowtag)
597 (inst shr tmp n-widetag-bits)
605 :disp (- (* (1- instance-slots-offset) n-word-bytes)
606 instance-pointer-lowtag)))))
608 (define-vop (raw-instance-set/double)
609 (:translate %raw-instance-set/double)
611 (:args (object :scs (descriptor-reg))
612 (index :scs (any-reg))
613 (value :scs (double-reg) :target result))
614 (:arg-types * positive-fixnum double-float)
615 (:temporary (:sc unsigned-reg) tmp)
616 (:results (result :scs (double-reg)))
617 (:result-types double-float)
619 (loadw tmp object 0 instance-pointer-lowtag)
620 (inst shr tmp n-widetag-bits)
627 :disp (- (* (1- instance-slots-offset) n-word-bytes)
628 instance-pointer-lowtag))
630 (unless (location= result value)
631 (inst movsd result value))))
633 (define-vop (raw-instance-ref/complex-single)
634 (:translate %raw-instance-ref/complex-single)
636 (:args (object :scs (descriptor-reg))
637 (index :scs (any-reg)))
638 (:arg-types * positive-fixnum)
639 (:temporary (:sc unsigned-reg) tmp)
640 (:results (value :scs (complex-single-reg)))
641 (:result-types complex-single-float)
643 (loadw tmp object 0 instance-pointer-lowtag)
644 (inst shr tmp n-widetag-bits)
647 (let ((real-tn (complex-single-reg-real-tn value)))
653 :disp (- (* (1- instance-slots-offset) n-word-bytes)
654 instance-pointer-lowtag))))
655 (let ((imag-tn (complex-single-reg-imag-tn value)))
661 :disp (+ (* (1- instance-slots-offset) n-word-bytes)
663 (- instance-pointer-lowtag)))))))
665 (define-vop (raw-instance-set/complex-single)
666 (:translate %raw-instance-set/complex-single)
668 (:args (object :scs (descriptor-reg))
669 (index :scs (any-reg))
670 (value :scs (complex-single-reg) :target result))
671 (:arg-types * positive-fixnum complex-single-float)
672 (:temporary (:sc unsigned-reg) tmp)
673 (:results (result :scs (complex-single-reg)))
674 (:result-types complex-single-float)
676 (loadw tmp object 0 instance-pointer-lowtag)
677 (inst shr tmp n-widetag-bits)
680 (let ((value-real (complex-single-reg-real-tn value))
681 (result-real (complex-single-reg-real-tn result)))
682 (inst movss (make-ea :dword
685 :disp (- (* (1- instance-slots-offset) n-word-bytes)
686 instance-pointer-lowtag))
688 (unless (location= value-real result-real)
689 (inst movss result-real value-real)))
690 (let ((value-imag (complex-single-reg-imag-tn value))
691 (result-imag (complex-single-reg-imag-tn result)))
692 (inst movss (make-ea :dword
695 :disp (+ (* (1- instance-slots-offset) n-word-bytes)
697 (- instance-pointer-lowtag)))
699 (unless (location= value-imag result-imag)
700 (inst movss result-imag value-imag)))))
702 (define-vop (raw-instance-ref/complex-double)
703 (:translate %raw-instance-ref/complex-double)
705 (:args (object :scs (descriptor-reg))
706 (index :scs (any-reg)))
707 (:arg-types * positive-fixnum)
708 (:temporary (:sc unsigned-reg) tmp)
709 (:results (value :scs (complex-double-reg)))
710 (:result-types complex-double-float)
712 (loadw tmp object 0 instance-pointer-lowtag)
713 (inst shr tmp n-widetag-bits)
716 (let ((real-tn (complex-double-reg-real-tn value)))
722 :disp (- (* (- instance-slots-offset 2) n-word-bytes)
723 instance-pointer-lowtag))))
724 (let ((imag-tn (complex-double-reg-imag-tn value)))
730 :disp (- (* (1- instance-slots-offset) n-word-bytes)
731 instance-pointer-lowtag))))))
733 (define-vop (raw-instance-set/complex-double)
734 (:translate %raw-instance-set/complex-double)
736 (:args (object :scs (descriptor-reg))
737 (index :scs (any-reg))
738 (value :scs (complex-double-reg) :target result))
739 (:arg-types * positive-fixnum complex-double-float)
740 (:temporary (:sc unsigned-reg) tmp)
741 (:results (result :scs (complex-double-reg)))
742 (:result-types complex-double-float)
744 (loadw tmp object 0 instance-pointer-lowtag)
745 (inst shr tmp n-widetag-bits)
748 (let ((value-real (complex-double-reg-real-tn value))
749 (result-real (complex-double-reg-real-tn result)))
750 (inst movsd (make-ea :dword
753 :disp (- (* (- instance-slots-offset 2) n-word-bytes)
754 instance-pointer-lowtag))
756 (unless (location= value-real result-real)
757 (inst movsd result-real value-real)))
758 (let ((value-imag (complex-double-reg-imag-tn value))
759 (result-imag (complex-double-reg-imag-tn result)))
760 (inst movsd (make-ea :dword
763 :disp (- (* (1- instance-slots-offset) n-word-bytes)
764 instance-pointer-lowtag))
766 (unless (location= value-imag result-imag)
767 (inst movsd result-imag value-imag)))))