Eliminate COLD-FSET. It's just fop-funcall of %DEFUN
[sbcl.git] / src / compiler / x86-64 / type-vops.lisp
blob2ba488fc128249931137bb58a9ca7877657f3039
1 ;;;; type testing and checking VOPs for the x86-64 VM
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
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.
12 (in-package "SB!VM")
14 ;;;; test generation utilities
16 ;;; Optimize the case of moving a 64-bit value into RAX when not caring
17 ;;; about the upper 32 bits: often the REX prefix can be spared.
18 (defun move-qword-to-eax (value)
19 (if (and (sc-is value any-reg descriptor-reg)
20 (< (tn-offset value) r8-offset))
21 (move eax-tn (reg-in-size value :dword))
22 (move rax-tn value)))
24 (defun generate-fixnum-test (value)
25 #!+sb-doc
26 "Set the Z flag if VALUE is fixnum"
27 (inst test
28 (cond ((sc-is value any-reg descriptor-reg)
29 (reg-in-size value :byte))
30 ;; This is hooey. None of the type-vops presently allow
31 ;; control-stack as a storage class.
32 ((sc-is value control-stack)
33 (make-ea :byte :base rbp-tn
34 :disp (frame-byte-offset (tn-offset value))))
36 value))
37 fixnum-tag-mask))
39 (defun %test-fixnum (value target not-p)
40 (generate-fixnum-test value)
41 (inst jmp (if not-p :nz :z) target))
43 ;;; General FIXME: it's fine that we wire these to use rAX which has
44 ;;; the shortest encoding, but for goodness sake can we pass the TN
45 ;;; from the VOP like every other backend does? Freely referencing the
46 ;;; permanent globals RAX-TN,EAX-TN,AL-TN is a bad way to go about it.
48 (defun %lea-for-lowtag-test (target value lowtag)
49 (inst lea target (make-ea :dword :base value :disp (- lowtag))))
51 ;; Numerics including fixnum, excluding short-float. (INTEGER,RATIONAL)
52 (defun %test-fixnum-and-headers (value target not-p headers)
53 (let ((drop-through (gen-label)))
54 (case n-fixnum-tag-bits
55 (1 (%lea-for-lowtag-test eax-tn value other-pointer-lowtag)
56 (inst test al-tn 1)
57 (inst jmp :nz (if not-p drop-through target)) ; inverted
58 (%test-headers value target not-p nil headers
59 :drop-through drop-through :compute-eax nil))
61 (generate-fixnum-test value)
62 (inst jmp :z (if not-p drop-through target))
63 (%test-headers value target not-p nil headers
64 :drop-through drop-through)))))
66 ;; I can see no reason this would ever be used.
67 ;; (or fixnum character|unbound-marker) is implausible.
68 (defun %test-fixnum-and-immediate (value target not-p immediate)
69 (let ((drop-through (gen-label)))
70 (generate-fixnum-test value)
71 (inst jmp :z (if not-p drop-through target))
72 (%test-immediate value target not-p immediate drop-through)))
74 ;; Numerics
75 (defun %test-fixnum-immediate-and-headers (value target not-p immediate
76 headers)
77 (let ((drop-through (gen-label)))
78 (case n-fixnum-tag-bits
79 (1 (%lea-for-lowtag-test eax-tn value other-pointer-lowtag)
80 (inst test al-tn 1)
81 (inst jmp :nz (if not-p drop-through target)) ; inverted
82 (inst cmp al-tn (- immediate other-pointer-lowtag))
83 (inst jmp :e (if not-p drop-through target))
84 (%test-headers value target not-p nil headers
85 :drop-through drop-through :compute-eax nil))
86 (t (generate-fixnum-test value)
87 (inst jmp :z (if not-p drop-through target))
88 (%test-immediate-and-headers value target not-p immediate headers
89 drop-through)))))
91 (defun %test-immediate (value target not-p immediate
92 &optional (drop-through (gen-label)))
93 ;; Code a single instruction byte test if possible.
94 (cond ((sc-is value any-reg descriptor-reg)
95 (inst cmp (reg-in-size value :byte) immediate))
97 (move rax-tn value)
98 (inst cmp al-tn immediate)))
99 (inst jmp (if not-p :ne :e) target)
100 (emit-label drop-through))
102 ;; Numerics including short-float, excluding fixnum
103 (defun %test-immediate-and-headers (value target not-p immediate headers
104 &optional (drop-through (gen-label)))
105 ;; Code a single instruction byte test if possible.
106 (cond ((sc-is value any-reg descriptor-reg)
107 (inst cmp (reg-in-size value :byte) immediate))
109 (move rax-tn value)
110 (inst cmp al-tn immediate)))
111 (inst jmp :e (if not-p drop-through target))
112 (%test-headers value target not-p nil headers :drop-through drop-through))
114 (defun %test-lowtag (value target not-p lowtag)
115 (%lea-for-lowtag-test eax-tn value lowtag)
116 (inst test al-tn lowtag-mask)
117 (inst jmp (if not-p :nz :z) target))
119 (defun %test-headers (value target not-p function-p headers
120 &key except
121 (drop-through (gen-label))
122 (compute-eax t))
123 (let ((lowtag (if function-p fun-pointer-lowtag other-pointer-lowtag)))
124 (multiple-value-bind (equal less-or-equal greater-or-equal when-true
125 when-false)
126 ;; EQUAL, LESS-OR-EQUAL, and GREATER-OR-EQUAL are the conditions
127 ;; for branching to TARGET. WHEN-TRUE and WHEN-FALSE are the
128 ;; labels to branch to when we know it's true and when we know
129 ;; it's false respectively.
130 (if not-p
131 (values :ne :a :b drop-through target)
132 (values :e :na :nb target drop-through))
133 (when compute-eax
134 (%lea-for-lowtag-test eax-tn value lowtag))
135 (inst test al-tn lowtag-mask)
136 (inst jmp :nz when-false)
137 ;; FIXME: this backend seems to be missing the special logic for
138 ;; testing exactly two widetags differing only in a single bit,
139 ;; which through evolution is almost totally unworkable anyway...
140 (do ((remaining headers (cdr remaining))
141 ;; It is preferable (smaller and faster code) to directly
142 ;; compare the value in memory instead of loading it into
143 ;; a register first. Find out if this is possible and set
144 ;; WIDETAG-TN accordingly. If impossible, generate the
145 ;; register load.
146 ;; Compared to x86 we additionally optimize the cases of a
147 ;; range starting with BIGNUM-WIDETAG (= min widetag)
148 ;; or ending with COMPLEX-ARRAY-WIDETAG (= max widetag)
149 (widetag-tn (if (and (null (cdr headers))
150 (not except)
151 (or (atom (car headers))
152 (= (caar headers) bignum-widetag)
153 (= (cdar headers) complex-array-widetag)))
154 (make-ea :byte :base value :disp (- lowtag))
155 (progn
156 (inst mov eax-tn (make-ea :dword :base value
157 :disp (- lowtag)))
158 al-tn))))
159 ((null remaining))
160 (dolist (widetag except) ; only after loading widetag-tn
161 (inst cmp al-tn widetag)
162 (inst jmp :e when-false))
163 (setq except nil)
164 (let ((header (car remaining))
165 (last (null (cdr remaining))))
166 (cond
167 ((atom header)
168 (inst cmp widetag-tn header)
169 (if last
170 (inst jmp equal target)
171 (inst jmp :e when-true)))
173 (let ((start (car header))
174 (end (cdr header)))
175 (cond
176 ((= start bignum-widetag)
177 (inst cmp widetag-tn end)
178 (if last
179 (inst jmp less-or-equal target)
180 (inst jmp :be when-true)))
181 ((= end complex-array-widetag)
182 (inst cmp widetag-tn start)
183 (if last
184 (inst jmp greater-or-equal target)
185 (inst jmp :b when-false)))
186 ((not last)
187 (inst cmp al-tn start)
188 (inst jmp :b when-false)
189 (inst cmp al-tn end)
190 (inst jmp :be when-true))
192 (inst sub al-tn start)
193 (inst cmp al-tn (- end start))
194 (inst jmp less-or-equal target))))))))
195 (emit-label drop-through))))
198 ;;;; type checking and testing
200 (define-vop (check-type)
201 (:args (value :target result :scs (any-reg descriptor-reg)))
202 (:results (result :scs (any-reg descriptor-reg)))
203 (:temporary (:sc unsigned-reg :offset eax-offset :to (:result 0)) eax)
204 (:ignore eax)
205 (:vop-var vop)
206 (:save-p :compute-only))
208 (define-vop (type-predicate)
209 (:args (value :scs (any-reg descriptor-reg)))
210 (:temporary (:sc unsigned-reg :offset eax-offset) eax)
211 (:ignore eax)
212 (:conditional)
213 (:info target not-p)
214 (:policy :fast-safe))
216 ;;; simpler VOP that don't need a temporary register
217 (define-vop (simple-check-type)
218 (:args (value :target result :scs (any-reg descriptor-reg)))
219 (:results (result :scs (any-reg descriptor-reg)
220 :load-if (not (and (sc-is value any-reg descriptor-reg)
221 (sc-is result control-stack)))))
222 (:vop-var vop)
223 (:save-p :compute-only))
225 (define-vop (simple-type-predicate)
226 (:args (value :scs (any-reg descriptor-reg control-stack)))
227 (:conditional)
228 (:info target not-p)
229 (:policy :fast-safe))
231 (defmacro !define-type-vops (pred-name check-name ptype error-code
232 (&rest type-codes)
233 &key (variant nil variant-p) &allow-other-keys)
234 ;; KLUDGE: UGH. Why do we need this eval? Can't we put this in the
235 ;; expansion?
236 (flet ((cost-to-test-types (type-codes)
237 (+ (* 2 (length type-codes))
238 (if (> (apply #'max type-codes) lowtag-limit) 7 2))))
239 (let* ((cost (cost-to-test-types (mapcar #'eval type-codes)))
240 (prefix (if variant-p
241 (concatenate 'string (string variant) "-")
242 "")))
243 `(progn
244 ,@(when pred-name
245 `((define-vop (,pred-name ,(intern (concatenate 'string prefix "TYPE-PREDICATE")))
246 (:translate ,pred-name)
247 (:generator ,cost
248 (test-type value target not-p (,@type-codes))))))
249 ,@(when check-name
250 `((define-vop (,check-name ,(intern (concatenate 'string prefix "CHECK-TYPE")))
251 (:generator ,cost
252 (let ((err-lab
253 (generate-error-code vop ',error-code value)))
254 (test-type value err-lab t (,@type-codes))
255 (move result value))))))
256 ,@(when ptype
257 `((primitive-type-vop ,check-name (:check) ,ptype)))))))
259 ;;;; other integer ranges
261 (define-vop (fixnump/unsigned-byte-64 simple-type-predicate)
262 (:args (value :scs (unsigned-reg)))
263 (:arg-types unsigned-num)
264 (:translate fixnump)
265 (:temporary (:sc unsigned-reg :from (:argument 0)) tmp)
266 (:info)
267 (:conditional :z)
268 (:generator 5
269 (move tmp value)
270 (inst shr tmp n-positive-fixnum-bits)))
272 #-#.(cl:if (cl:= sb!vm:n-fixnum-tag-bits 1) '(:and) '(:or))
273 (define-vop (fixnump/signed-byte-64 simple-type-predicate)
274 (:args (value :scs (signed-reg)))
275 (:info)
276 (:conditional :z)
277 (:temporary (:sc unsigned-reg) temp)
278 (:arg-types signed-num)
279 (:translate fixnump)
280 (:generator 5
281 ;; Hackers Delight, p. 53: signed
282 ;; a <= x <= a + 2^n - 1
283 ;; is equivalent to unsigned
284 ;; ((x-a) >> n) = 0
285 (inst mov temp #.(- sb!xc:most-negative-fixnum))
286 (inst add temp value)
287 (inst shr temp n-fixnum-bits)))
289 #+#.(cl:if (cl:= sb!vm:n-fixnum-tag-bits 1) '(:and) '(:or))
290 (define-vop (fixnump/signed-byte-64 simple-type-predicate)
291 (:args (value :scs (signed-reg) :target temp))
292 (:info)
293 (:conditional :no)
294 (:temporary (:sc unsigned-reg :from (:argument 0)) temp)
295 (:arg-types signed-num)
296 (:translate fixnump)
297 (:generator 5
298 (move temp value)
299 ;; The overflow flag will be set if the reg's sign bit changes.
300 (inst shl temp 1)))
302 ;;; A (SIGNED-BYTE 64) can be represented with either fixnum or a bignum with
303 ;;; exactly one digit.
305 (define-vop (signed-byte-64-p type-predicate)
306 (:translate signed-byte-64-p)
307 (:generator 45
308 (multiple-value-bind (yep nope)
309 (if not-p
310 (values not-target target)
311 (values target not-target))
312 #.(case n-fixnum-tag-bits
313 (1 '(progn
314 (%lea-for-lowtag-test eax-tn value other-pointer-lowtag)
315 (inst test al-tn fixnum-tag-mask) ; 0th bit = 1 => fixnum
316 (inst jmp :nz yep)
317 (inst test al-tn lowtag-mask)))
318 (t '(progn
319 (move-qword-to-eax value)
320 (inst test al-tn fixnum-tag-mask)
321 (inst jmp :e yep)
322 (inst and al-tn lowtag-mask)
323 (inst cmp al-tn other-pointer-lowtag))))
324 (inst jmp :ne nope)
325 (inst cmp (make-ea-for-object-slot value 0 other-pointer-lowtag)
326 (+ (ash 1 n-widetag-bits) bignum-widetag))
327 (inst jmp (if not-p :ne :e) target))
328 NOT-TARGET))
330 ;; FIXME: this vop is never emitted. I suspect that is because whenever
331 ;; we have something which needs to be asserted as (SIGNED-BYTE 64) and
332 ;; then moved to a signed-reg, the signed-byte-64-p vop is used and then
333 ;; move-to-word. We apparently never want to both assert the type and
334 ;; keep it as a tagged object. Anyway if it ever were emitted before,
335 ;; GENERATE-ERROR-CODE would have failed since OBJECT-NOT-SIGNED-BYTE-64
336 ;; did not have an error number.
337 (define-vop (check-signed-byte-64 check-type)
338 (:generator 45
339 (let ((nope (generate-error-code vop
340 'object-not-signed-byte-64-error
341 value)))
342 (generate-fixnum-test value)
343 (inst jmp :e yep)
344 (move-qword-to-eax value)
345 (inst and al-tn lowtag-mask)
346 (inst cmp al-tn other-pointer-lowtag)
347 (inst jmp :ne nope)
348 (inst cmp (make-ea-for-object-slot value 0 other-pointer-lowtag)
349 (+ (ash 1 n-widetag-bits) bignum-widetag))
350 (inst jmp :ne nope))
352 (move result value)))
354 ;;; An (unsigned-byte 64) can be represented with either a positive
355 ;;; fixnum, a bignum with exactly one positive digit, or a bignum with
356 ;;; exactly two digits and the second digit all zeros.
357 (define-vop (unsigned-byte-64-p type-predicate)
358 (:translate unsigned-byte-64-p)
359 (:generator 45
360 (let ((not-target (gen-label))
361 (single-word (gen-label))
362 (fixnum (gen-label)))
363 (multiple-value-bind (yep nope)
364 (if not-p
365 (values not-target target)
366 (values target not-target))
367 ;; Is it a fixnum?
368 (move rax-tn value)
369 (inst test al-tn fixnum-tag-mask)
370 (inst jmp :e fixnum)
372 ;; If not, is it an other pointer?
373 (inst and al-tn lowtag-mask)
374 (inst cmp al-tn other-pointer-lowtag)
375 (inst jmp :ne nope)
376 ;; Get the header.
377 (loadw rax-tn value 0 other-pointer-lowtag)
378 ;; Is it one?
379 (inst cmp rax-tn (+ (ash 1 n-widetag-bits) bignum-widetag))
380 (inst jmp :e single-word)
381 ;; If it's other than two, we can't be an (unsigned-byte 64)
382 (inst cmp rax-tn (+ (ash 2 n-widetag-bits) bignum-widetag))
383 (inst jmp :ne nope)
384 ;; Get the second digit.
385 (loadw rax-tn value (1+ bignum-digits-offset) other-pointer-lowtag)
386 ;; All zeros, its an (unsigned-byte 64).
387 (inst test rax-tn rax-tn)
388 (inst jmp :z yep)
389 (inst jmp nope)
391 (emit-label single-word)
392 ;; Get the single digit.
393 (loadw rax-tn value bignum-digits-offset other-pointer-lowtag)
395 ;; positive implies (unsigned-byte 64).
396 (emit-label fixnum)
397 (inst test rax-tn rax-tn)
398 (inst jmp (if not-p :s :ns) target)
400 (emit-label not-target)))))
402 (define-vop (check-unsigned-byte-64 check-type)
403 (:generator 45
404 (let ((nope
405 (generate-error-code vop 'object-not-unsigned-byte-64-error value))
406 (yep (gen-label))
407 (fixnum (gen-label))
408 (single-word (gen-label)))
410 ;; Is it a fixnum?
411 (generate-fixnum-test value)
412 (move rax-tn value)
413 (inst jmp :e fixnum)
415 ;; If not, is it an other pointer?
416 (inst and al-tn lowtag-mask)
417 (inst cmp al-tn other-pointer-lowtag)
418 (inst jmp :ne nope)
419 ;; Get the header.
420 (loadw rax-tn value 0 other-pointer-lowtag)
421 ;; Is it one?
422 (inst cmp rax-tn (+ (ash 1 n-widetag-bits) bignum-widetag))
423 (inst jmp :e single-word)
424 ;; If it's other than two, we can't be an (unsigned-byte 64)
425 (inst cmp rax-tn (+ (ash 2 n-widetag-bits) bignum-widetag))
426 (inst jmp :ne nope)
427 ;; Get the second digit.
428 (loadw rax-tn value (1+ bignum-digits-offset) other-pointer-lowtag)
429 ;; All zeros, its an (unsigned-byte 64).
430 (inst test rax-tn rax-tn)
431 (inst jmp :z yep)
432 (inst jmp nope)
434 (emit-label single-word)
435 ;; Get the single digit.
436 (loadw rax-tn value bignum-digits-offset other-pointer-lowtag)
438 ;; positive implies (unsigned-byte 64).
439 (emit-label fixnum)
440 (inst test rax-tn rax-tn)
441 (inst jmp :s nope)
443 (emit-label yep)
444 (move result value))))
446 (defun power-of-two-limit-p (x)
447 (and (fixnump x)
448 (= (logcount (1+ x)) 1)))
450 (define-vop (test-fixnum-mod-power-of-two)
451 (:args (value :scs (any-reg descriptor-reg
452 unsigned-reg signed-reg
453 immediate)))
454 (:arg-types *
455 (:constant (satisfies power-of-two-limit-p)))
456 (:translate fixnum-mod-p)
457 (:conditional :e)
458 (:info hi)
459 (:save-p :compute-only)
460 (:policy :fast-safe)
461 (:generator 4
462 (aver (not (sc-is value immediate)))
463 (let* ((fixnum-hi (if (sc-is value unsigned-reg signed-reg)
465 (fixnumize hi))))
466 (inst test value (constantize (lognot fixnum-hi))))))
468 (define-vop (test-fixnum-mod-tagged-unsigned)
469 (:args (value :scs (any-reg descriptor-reg
470 unsigned-reg signed-reg
471 immediate)))
472 (:arg-types (:or tagged-num unsigned-num signed-num)
473 (:constant fixnum))
474 (:translate fixnum-mod-p)
475 (:conditional :be)
476 (:info hi)
477 (:save-p :compute-only)
478 (:policy :fast-safe)
479 (:generator 5
480 (aver (not (sc-is value immediate)))
481 (let ((fixnum-hi (if (sc-is value unsigned-reg signed-reg)
483 (fixnumize hi))))
484 (inst cmp value (constantize fixnum-hi)))))
486 (define-vop (test-fixnum-mod-*)
487 (:args (value :scs (any-reg descriptor-reg)))
488 (:arg-types * (:constant fixnum))
489 (:translate fixnum-mod-p)
490 (:conditional)
491 (:info target not-p hi)
492 (:save-p :compute-only)
493 (:policy :fast-safe)
494 (:generator 6
495 (let* ((fixnum-hi (fixnumize hi))
496 (skip (gen-label)))
497 (generate-fixnum-test value)
498 (inst jmp :ne (if not-p target skip))
499 (inst cmp value (constantize fixnum-hi))
500 (inst jmp (if not-p :a :be) target)
501 (emit-label skip))))
503 ;;;; list/symbol types
505 ;;; symbolp (or symbol (eq nil))
506 ;;; consp (and list (not (eq nil)))
508 (define-vop (symbolp type-predicate)
509 (:translate symbolp)
510 (:generator 12
511 (let ((is-symbol-label (if not-p DROP-THRU target)))
512 (inst cmp value nil-value)
513 (inst jmp :e is-symbol-label)
514 (test-type value target not-p (symbol-header-widetag)))
515 DROP-THRU))
517 (define-vop (check-symbol check-type)
518 (:generator 12
519 (let ((error (generate-error-code vop 'object-not-symbol-error value)))
520 (inst cmp value nil-value)
521 (inst jmp :e DROP-THRU)
522 (test-type value error t (symbol-header-widetag)))
523 DROP-THRU
524 (move result value)))
526 (define-vop (consp type-predicate)
527 (:translate consp)
528 (:generator 8
529 (let ((is-not-cons-label (if not-p target DROP-THRU)))
530 (inst cmp value nil-value)
531 (inst jmp :e is-not-cons-label)
532 (test-type value target not-p (list-pointer-lowtag)))
533 DROP-THRU))
535 (define-vop (check-cons check-type)
536 (:generator 8
537 (let ((error (generate-error-code vop 'object-not-cons-error value)))
538 (inst cmp value nil-value)
539 (inst jmp :e error)
540 (test-type value error t (list-pointer-lowtag))
541 (move result value))))
543 ;; A vop that accepts a computed set of widetags.
544 (define-vop (%other-pointer-subtype-p type-predicate)
545 (:translate %other-pointer-subtype-p)
546 (:info target not-p widetags)
547 (:arg-types * (:constant t)) ; voodoo - 'target' and 'not-p' are absent
548 (:generator 15 ; arbitrary
549 (multiple-value-bind (headers exceptions)
550 (canonicalize-headers-and-exceptions widetags)
551 (%test-headers value target not-p nil headers
552 :except exceptions))))
554 #!+sb-simd-pack
555 (progn
556 (!define-type-vops simd-pack-p nil nil nil (simd-pack-widetag))
558 (define-vop (check-simd-pack check-type)
559 (:args (value :target result
560 :scs (any-reg descriptor-reg
561 int-sse-reg single-sse-reg double-sse-reg
562 int-sse-stack single-sse-stack double-sse-stack)))
563 (:results (result :scs (any-reg descriptor-reg
564 int-sse-reg single-sse-reg double-sse-reg)))
565 (:temporary (:sc unsigned-reg :offset eax-offset :to (:result 0)) eax)
566 (:ignore eax)
567 (:vop-var vop)
568 (:node-var node)
569 (:save-p :compute-only)
570 (:generator 50
571 (sc-case value
572 ((int-sse-reg single-sse-reg double-sse-reg
573 int-sse-stack single-sse-stack double-sse-stack)
574 (sc-case result
575 ((int-sse-reg single-sse-reg double-sse-reg)
576 (move result value))
577 ((any-reg descriptor-reg)
578 (with-fixed-allocation (result
579 simd-pack-widetag
580 simd-pack-size
581 node)
582 ;; see *simd-pack-element-types*
583 (storew (fixnumize
584 (sc-case value
585 ((int-sse-reg int-sse-stack) 0)
586 ((single-sse-reg single-sse-stack) 1)
587 ((double-sse-reg double-sse-stack) 2)))
588 result simd-pack-tag-slot other-pointer-lowtag)
589 (let ((ea (make-ea-for-object-slot
590 result simd-pack-lo-value-slot other-pointer-lowtag)))
591 (if (float-simd-pack-p value)
592 (inst movaps ea value)
593 (inst movdqa ea value)))))))
594 ((any-reg descriptor-reg)
595 (let ((leaf (sb!c::tn-leaf value)))
596 (unless (and (sb!c::lvar-p leaf)
597 (csubtypep (sb!c::lvar-type leaf)
598 (specifier-type 'simd-pack)))
599 (test-type
600 value
601 (generate-error-code vop 'object-not-simd-pack-error value)
602 t (simd-pack-widetag))))
603 (sc-case result
604 ((int-sse-reg)
605 (let ((ea (make-ea-for-object-slot
606 value simd-pack-lo-value-slot other-pointer-lowtag)))
607 (inst movdqa result ea)))
608 ((single-sse-reg double-sse-reg)
609 (let ((ea (make-ea-for-object-slot
610 value simd-pack-lo-value-slot other-pointer-lowtag)))
611 (inst movaps result ea)))
612 ((any-reg descriptor-reg)
613 (move result value)))))))
615 (primitive-type-vop check-simd-pack (:check) simd-pack-int simd-pack-single simd-pack-double))