Code fixes for test-matrix.
[sb-simd.git] / patch_against_sbcl_0_9_3-1.3.txt
blob72f17d847ba318485b7c7d4edf037db5e152d87e
1 diff -x 'CVS*' -Naur src-093/compiler/x86/float.lisp src/compiler/x86/float.lisp
2 --- src-093/compiler/x86/float.lisp     2005-08-17 16:56:53.996387102 +0300
3 +++ src/compiler/x86/float.lisp 2005-08-17 15:04:50.040162831 +0300
4 @@ -4308,3 +4308,122 @@
5    (:note "inline dummy FP register bias")
6    (:ignore x)
7    (:generator 0))
10 +;; XMM Moves
13 +(defun ea-for-xmm-desc (tn)
14 +  (make-ea :xmmword :base tn 
15 +          :disp (- (* xmm-value-slot n-word-bytes) other-pointer-lowtag)))
17 +(defun ea-for-xmm-stack (tn)
18 +  (make-ea :xmmword :base ebp-tn 
19 +          :disp (- (* (+ (tn-offset tn)
20 +                         4)
21 +                      n-word-bytes))))
23 +(define-move-fun (load-xmm 2) (vop x y)
24 +  ((xmm-stack) (xmm-reg))
25 +  (inst movdqu y (ea-for-xmm-stack x)))
27 +(define-move-fun (store-xmm 2) (vop x y)
28 +  ((xmm-reg) (xmm-stack))
29 +  (inst movdqu (ea-for-xmm-stack y) x))
31 +(define-move-fun (load-xmm-single 2) (vop x y)
32 +  ((single-stack) (xmm-reg))
33 +  (inst movss y (ea-for-sf-stack x)))
35 +(define-move-fun (store-xmm-single 2) (vop x y)
36 +  ((xmm-reg) (single-stack))
37 +  (inst movss (ea-for-sf-stack y) x))
40 +(define-vop (%load-xmm-from-array/single-float)
41 +    (:policy :fast-safe)
42 +    (:args (src :scs (descriptor-reg))
43 +          (index :scs (unsigned-reg)))
44 +    (:ARG-TYPES SIMPLE-ARRAY-SINGLE-FLOAT fixnum)
45 +    (:results (dest :scs (xmm-reg)))
46 +    (:result-types xmm)
47 +    (:generator 1
48 +               (inst shl index 2)
49 +               (inst movdqu dest (make-ea :xmmword :base src :index index
50 +                                          :disp (- (* VECTOR-DATA-OFFSET N-WORD-BYTES) OTHER-POINTER-LOWTAG)))))
52 +    
53 +(define-vop (%store-xmm-to-array/single-float)
54 +    (:policy :fast-safe)
55 +    (:args (dest :scs (descriptor-reg))
56 +          (index :scs (unsigned-reg))
57 +          (src :scs (xmm-reg)))
58 +    (:ARG-TYPES SIMPLE-ARRAY-SINGLE-FLOAT fixnum XMM)
59 +    (:generator 1
60 +               (inst shl index 2)
61 +               (inst movdqu (make-ea :xmmword :base dest :index index 
62 +                                     :disp (- (* VECTOR-DATA-OFFSET N-WORD-BYTES) OTHER-POINTER-LOWTAG))
63 +                     src)))
65 +    
66 +(define-vop (xmm-move)
67 +  (:args (x :scs (xmm-reg) :target y :load-if (not (location= x y))))
68 +  (:results (y :scs (xmm-reg) :load-if (not (location= x y))))
69 +  (:note "xmm move")
70 +  (:generator 0
71 +             (unless (location= x y)
72 +               (inst movdqa y x))))
74 +(define-move-vop xmm-move :move (xmm-reg) (xmm-reg))
76 +(define-vop (move-from-xmm)
77 +  (:args (x :scs (xmm-reg) :to :save))
78 +  (:results (y :scs (descriptor-reg)))
79 +  (:node-var node)
80 +  (:note "xmm to pointer coercion")
81 +  (:generator 13
82 +     (with-fixed-allocation (y
83 +                             xmm-widetag
84 +                             xmm-size node)
85 +       (inst movdqu (ea-for-xmm-desc y) x))))
87 +(define-move-vop move-from-xmm :move (xmm-reg) (descriptor-reg))
89 +(define-vop (move-to-xmm)
90 +  (:args (x :scs (descriptor-reg)))
91 +  (:results (y :scs (xmm-reg)))
92 +  (:note "pointer to xmm coercion")
93 +  (:generator 2
94 +             (inst movdqu y (ea-for-xmm-desc x))))
96 +(define-move-vop move-to-xmm :move (descriptor-reg) (xmm-reg))
99 +(define-vop (move-xmm-arg)
100 +    (:args (x :scs (xmm-reg) :target y)
101 +          (fp :scs (any-reg)
102 +              :load-if (not (sc-is y xmm-reg))))
103 +  (:results (y))
104 +  (:note "xmm argument move")
105 +  (:generator 6
106 +             (sc-case y
107 +                      (xmm-reg
108 +                       (unless (location= x y)
109 +                         (inst movdqa y x)))
111 +                      (xmm-stack
112 +                       (if (= (tn-offset fp) esp-offset)
113 +                           (let* ((offset (* (tn-offset y) n-word-bytes))
114 +                                  (ea (make-ea :xmmword :base fp :disp offset)))
115 +                             (inst movdqu ea x))
117 +                           (let ((ea (make-ea :xmmword :base fp
118 +                                              :disp (- (* (+ (tn-offset y) 4)
119 +                                                          n-word-bytes)))))
120 +                             (inst movdqu ea x)))))))
122 +(define-move-vop move-xmm-arg :move-arg (xmm-reg descriptor-reg) (xmm-reg))
124 +(define-move-vop move-arg :move-arg (xmm-reg) (descriptor-reg))
127 diff -x 'CVS*' -Naur src-093/compiler/x86/insts.lisp src/compiler/x86/insts.lisp
128 --- src-093/compiler/x86/insts.lisp     2005-08-05 16:13:29.000000000 +0300
129 +++ src/compiler/x86/insts.lisp 2005-08-16 10:39:07.027823783 +0300
130 @@ -39,13 +39,16 @@
131    #(ax cx dx bx sp bp si di))
132  (defparameter *dword-reg-names*
133    #(eax ecx edx ebx esp ebp esi edi))
134 +(defparameter *xmmword-reg-names*
135 +  #(xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7))
137  (defun print-reg-with-width (value width stream dstate)
138    (declare (ignore dstate))
139    (princ (aref (ecase width
140                   (:byte *byte-reg-names*)
141                   (:word *word-reg-names*)
142 -                 (:dword *dword-reg-names*))
143 +                 (:dword *dword-reg-names*)
144 +                 (:xmmword *xmmword-reg-names*))
145                 value)
146           stream)
147    ;; XXX plus should do some source-var notes
148 @@ -192,6 +195,8 @@
149      (:byte 8)
150      (:word 16)
151      (:dword 32)
152 +    (:qword 64)
153 +    (:xmmword 128)
154      (:float 32)
155      (:double 64)))
157 @@ -671,14 +676,14 @@
159  (defun reg-tn-encoding (tn)
160    (declare (type tn tn))
161 -  (aver (eq (sb-name (sc-sb (tn-sc tn))) 'registers))
162 +;  (aver (eq (sb-name (sc-sb (tn-sc tn))) 'registers))
163    (let ((offset (tn-offset tn)))
164      (logior (ash (logand offset 1) 2)
165              (ash offset -1))))
167  (defstruct (ea (:constructor make-ea (size &key base index scale disp))
168                 (:copier nil))
169 -  (size nil :type (member :byte :word :dword))
170 +  (size nil :type (member :byte :word :dword :xmmword))
171    (base nil :type (or tn null))
172    (index nil :type (or tn null))
173    (scale 1 :type (member 1 2 4 8))
174 @@ -718,6 +723,8 @@
175       (ecase (sb-name (sc-sb (tn-sc thing)))
176         (registers
177          (emit-mod-reg-r/m-byte segment #b11 reg (reg-tn-encoding thing)))
178 +       (xmm-registers
179 +        (emit-mod-reg-r/m-byte segment #b11 reg (reg-tn-encoding thing)))
180         (stack
181          ;; Convert stack tns into an index off of EBP.
182          (let ((disp (- (* (1+ (tn-offset thing)) n-word-bytes))))
183 @@ -830,6 +837,19 @@
184    (and (tn-p thing)
185         (eq (sb-name (sc-sb (tn-sc thing))) 'registers)))
187 +(defun xmm-register-p (thing)
188 +  (and (tn-p thing)
189 +       (eq (sb-name (sc-sb (tn-sc thing))) 'xmm-registers)
190 +       (member (sc-name (tn-sc thing)) *xmmword-sc-names*)
191 +       t))
193 +(defun xmm-ea-p (thing)
194 +  (typecase thing
195 +    (ea (eq (ea-size thing) :xmmword))
196 +    (tn
197 +     (and (member (sc-name (tn-sc thing)) *xmmword-sc-names*) t))
198 +    (t nil)))
200  (defun accumulator-p (thing)
201    (and (register-p thing)
202         (= (tn-offset thing) 0)))
203 @@ -859,6 +879,8 @@
204          :float)
205         (#.*double-sc-names*
206          :double)
207 +       (#.*xmmword-sc-names*
208 +        :xmmword)
209         (t
210          (error "can't tell the size of ~S ~S" thing (sc-name (tn-sc thing))))))
211      (ea
212 @@ -2042,6 +2064,1419 @@
213    (:emitter
214     (emit-header-data segment return-pc-header-widetag)))
215  \f
217 +;;;; SSE instructions
218 +;;;; 
219 +;;;; Automatically generated
222 +(DEFINE-INSTRUCTION ADDPS
223 +                    (SEGMENT DST SRC)
224 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
225 +                              (EMIT-BYTE SEGMENT 88)
226 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
228 +(DEFINE-INSTRUCTION ADDSUBPS
229 +                    (SEGMENT DST SRC)
230 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
231 +                              (EMIT-BYTE SEGMENT 15)
232 +                              (EMIT-BYTE SEGMENT 208)
233 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
235 +(DEFINE-INSTRUCTION ANDNPS
236 +                    (SEGMENT DST SRC)
237 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
238 +                              (EMIT-BYTE SEGMENT 85)
239 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
241 +(DEFINE-INSTRUCTION ANDPS
242 +                    (SEGMENT DST SRC)
243 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
244 +                              (EMIT-BYTE SEGMENT 84)
245 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
247 +(DEFINE-INSTRUCTION DIVPS
248 +                    (SEGMENT DST SRC)
249 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
250 +                              (EMIT-BYTE SEGMENT 94)
251 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
253 +(DEFINE-INSTRUCTION HADDPS
254 +                    (SEGMENT DST SRC)
255 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
256 +                              (EMIT-BYTE SEGMENT 15)
257 +                              (EMIT-BYTE SEGMENT 124)
258 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
260 +(DEFINE-INSTRUCTION HSUBPS
261 +                    (SEGMENT DST SRC)
262 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
263 +                              (EMIT-BYTE SEGMENT 15)
264 +                              (EMIT-BYTE SEGMENT 125)
265 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
267 +(DEFINE-INSTRUCTION MAXPS
268 +                    (SEGMENT DST SRC)
269 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
270 +                              (EMIT-BYTE SEGMENT 95)
271 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
273 +(DEFINE-INSTRUCTION MINPS
274 +                    (SEGMENT DST SRC)
275 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
276 +                              (EMIT-BYTE SEGMENT 93)
277 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
279 +(DEFINE-INSTRUCTION MULPS
280 +                    (SEGMENT DST SRC)
281 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
282 +                              (EMIT-BYTE SEGMENT 89)
283 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
285 +(DEFINE-INSTRUCTION ORPS
286 +                    (SEGMENT DST SRC)
287 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
288 +                              (EMIT-BYTE SEGMENT 86)
289 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
291 +(DEFINE-INSTRUCTION RCPPS
292 +                    (SEGMENT DST SRC)
293 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
294 +                              (EMIT-BYTE SEGMENT 83)
295 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
297 +(DEFINE-INSTRUCTION RSQRTPS
298 +                    (SEGMENT DST SRC)
299 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
300 +                              (EMIT-BYTE SEGMENT 82)
301 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
303 +(DEFINE-INSTRUCTION SQRTPS
304 +                    (SEGMENT DST SRC)
305 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
306 +                              (EMIT-BYTE SEGMENT 81)
307 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
309 +(DEFINE-INSTRUCTION SUBPS
310 +                    (SEGMENT DST SRC)
311 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
312 +                              (EMIT-BYTE SEGMENT 92)
313 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
315 +(DEFINE-INSTRUCTION UNPCKHPS
316 +                    (SEGMENT DST SRC)
317 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
318 +                              (EMIT-BYTE SEGMENT 21)
319 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
321 +(DEFINE-INSTRUCTION UNPCKLPS
322 +                    (SEGMENT DST SRC)
323 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
324 +                              (EMIT-BYTE SEGMENT 20)
325 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
327 +(DEFINE-INSTRUCTION XORPS
328 +                    (SEGMENT DST SRC)
329 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
330 +                              (EMIT-BYTE SEGMENT 87)
331 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
333 +(DEFINE-INSTRUCTION ADDPD
334 +                    (SEGMENT DST SRC)
335 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
336 +                              (EMIT-BYTE SEGMENT 15)
337 +                              (EMIT-BYTE SEGMENT 88)
338 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
340 +(DEFINE-INSTRUCTION ADDSUBPD
341 +                    (SEGMENT DST SRC)
342 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
343 +                              (EMIT-BYTE SEGMENT 15)
344 +                              (EMIT-BYTE SEGMENT 208)
345 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
347 +(DEFINE-INSTRUCTION ANDNPD
348 +                    (SEGMENT DST SRC)
349 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
350 +                              (EMIT-BYTE SEGMENT 15)
351 +                              (EMIT-BYTE SEGMENT 85)
352 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
354 +(DEFINE-INSTRUCTION ANDPD
355 +                    (SEGMENT DST SRC)
356 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
357 +                              (EMIT-BYTE SEGMENT 15)
358 +                              (EMIT-BYTE SEGMENT 84)
359 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
361 +(DEFINE-INSTRUCTION DIVPD
362 +                    (SEGMENT DST SRC)
363 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
364 +                              (EMIT-BYTE SEGMENT 15)
365 +                              (EMIT-BYTE SEGMENT 94)
366 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
368 +(DEFINE-INSTRUCTION HADDPD
369 +                    (SEGMENT DST SRC)
370 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
371 +                              (EMIT-BYTE SEGMENT 15)
372 +                              (EMIT-BYTE SEGMENT 124)
373 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
375 +(DEFINE-INSTRUCTION HSUBPD
376 +                    (SEGMENT DST SRC)
377 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
378 +                              (EMIT-BYTE SEGMENT 15)
379 +                              (EMIT-BYTE SEGMENT 125)
380 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
382 +(DEFINE-INSTRUCTION MAXPD
383 +                    (SEGMENT DST SRC)
384 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
385 +                              (EMIT-BYTE SEGMENT 15)
386 +                              (EMIT-BYTE SEGMENT 95)
387 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
389 +(DEFINE-INSTRUCTION MINPD
390 +                    (SEGMENT DST SRC)
391 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
392 +                              (EMIT-BYTE SEGMENT 15)
393 +                              (EMIT-BYTE SEGMENT 93)
394 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
396 +(DEFINE-INSTRUCTION MULPD
397 +                    (SEGMENT DST SRC)
398 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
399 +                              (EMIT-BYTE SEGMENT 15)
400 +                              (EMIT-BYTE SEGMENT 89)
401 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
403 +(DEFINE-INSTRUCTION ORPD
404 +                    (SEGMENT DST SRC)
405 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
406 +                              (EMIT-BYTE SEGMENT 15)
407 +                              (EMIT-BYTE SEGMENT 86)
408 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
410 +(DEFINE-INSTRUCTION SQRTPD
411 +                    (SEGMENT DST SRC)
412 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
413 +                              (EMIT-BYTE SEGMENT 15)
414 +                              (EMIT-BYTE SEGMENT 81)
415 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
417 +(DEFINE-INSTRUCTION SUBPD
418 +                    (SEGMENT DST SRC)
419 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
420 +                              (EMIT-BYTE SEGMENT 15)
421 +                              (EMIT-BYTE SEGMENT 92)
422 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
424 +(DEFINE-INSTRUCTION UNPCKHPD
425 +                    (SEGMENT DST SRC)
426 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
427 +                              (EMIT-BYTE SEGMENT 15)
428 +                              (EMIT-BYTE SEGMENT 21)
429 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
431 +(DEFINE-INSTRUCTION UNPCKLPD
432 +                    (SEGMENT DST SRC)
433 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
434 +                              (EMIT-BYTE SEGMENT 15)
435 +                              (EMIT-BYTE SEGMENT 20)
436 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
438 +(DEFINE-INSTRUCTION XORPD
439 +                    (SEGMENT DST SRC)
440 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
441 +                              (EMIT-BYTE SEGMENT 15)
442 +                              (EMIT-BYTE SEGMENT 87)
443 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
445 +(DEFINE-INSTRUCTION ADDSD
446 +                    (SEGMENT DST SRC)
447 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
448 +                              (EMIT-BYTE SEGMENT 15)
449 +                              (EMIT-BYTE SEGMENT 88)
450 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
452 +(DEFINE-INSTRUCTION COMISD
453 +                    (SEGMENT DST SRC)
454 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
455 +                              (EMIT-BYTE SEGMENT 15)
456 +                              (EMIT-BYTE SEGMENT 47)
457 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
459 +(DEFINE-INSTRUCTION DIVSD
460 +                    (SEGMENT DST SRC)
461 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
462 +                              (EMIT-BYTE SEGMENT 15)
463 +                              (EMIT-BYTE SEGMENT 94)
464 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
466 +(DEFINE-INSTRUCTION MAXSD
467 +                    (SEGMENT DST SRC)
468 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
469 +                              (EMIT-BYTE SEGMENT 15)
470 +                              (EMIT-BYTE SEGMENT 95)
471 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
473 +(DEFINE-INSTRUCTION MINSD
474 +                    (SEGMENT DST SRC)
475 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
476 +                              (EMIT-BYTE SEGMENT 15)
477 +                              (EMIT-BYTE SEGMENT 93)
478 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
480 +(DEFINE-INSTRUCTION MULSD
481 +                    (SEGMENT DST SRC)
482 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
483 +                              (EMIT-BYTE SEGMENT 15)
484 +                              (EMIT-BYTE SEGMENT 89)
485 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
487 +(DEFINE-INSTRUCTION SQRTSD
488 +                    (SEGMENT DST SRC)
489 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
490 +                              (EMIT-BYTE SEGMENT 15)
491 +                              (EMIT-BYTE SEGMENT 81)
492 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
494 +(DEFINE-INSTRUCTION SUBSD
495 +                    (SEGMENT DST SRC)
496 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
497 +                              (EMIT-BYTE SEGMENT 15)
498 +                              (EMIT-BYTE SEGMENT 92)
499 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
501 +(DEFINE-INSTRUCTION UCOMISD
502 +                    (SEGMENT DST SRC)
503 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
504 +                              (EMIT-BYTE SEGMENT 15)
505 +                              (EMIT-BYTE SEGMENT 46)
506 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
508 +(DEFINE-INSTRUCTION ADDSS
509 +                    (SEGMENT DST SRC)
510 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
511 +                              (EMIT-BYTE SEGMENT 15)
512 +                              (EMIT-BYTE SEGMENT 88)
513 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
515 +(DEFINE-INSTRUCTION COMISS
516 +                    (SEGMENT DST SRC)
517 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
518 +                              (EMIT-BYTE SEGMENT 47)
519 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
521 +(DEFINE-INSTRUCTION DIVSS
522 +                    (SEGMENT DST SRC)
523 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
524 +                              (EMIT-BYTE SEGMENT 15)
525 +                              (EMIT-BYTE SEGMENT 94)
526 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
528 +(DEFINE-INSTRUCTION MAXSS
529 +                    (SEGMENT DST SRC)
530 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
531 +                              (EMIT-BYTE SEGMENT 15)
532 +                              (EMIT-BYTE SEGMENT 95)
533 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
535 +(DEFINE-INSTRUCTION MINSS
536 +                    (SEGMENT DST SRC)
537 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
538 +                              (EMIT-BYTE SEGMENT 15)
539 +                              (EMIT-BYTE SEGMENT 93)
540 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
542 +(DEFINE-INSTRUCTION MULSS
543 +                    (SEGMENT DST SRC)
544 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
545 +                              (EMIT-BYTE SEGMENT 15)
546 +                              (EMIT-BYTE SEGMENT 89)
547 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
549 +(DEFINE-INSTRUCTION RCPSS
550 +                    (SEGMENT DST SRC)
551 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
552 +                              (EMIT-BYTE SEGMENT 15)
553 +                              (EMIT-BYTE SEGMENT 83)
554 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
556 +(DEFINE-INSTRUCTION RSQRTSS
557 +                    (SEGMENT DST SRC)
558 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
559 +                              (EMIT-BYTE SEGMENT 15)
560 +                              (EMIT-BYTE SEGMENT 82)
561 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
563 +(DEFINE-INSTRUCTION SQRTSS
564 +                    (SEGMENT DST SRC)
565 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
566 +                              (EMIT-BYTE SEGMENT 15)
567 +                              (EMIT-BYTE SEGMENT 81)
568 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
570 +(DEFINE-INSTRUCTION SUBSS
571 +                    (SEGMENT DST SRC)
572 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
573 +                              (EMIT-BYTE SEGMENT 15)
574 +                              (EMIT-BYTE SEGMENT 92)
575 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
577 +(DEFINE-INSTRUCTION UCOMISS
578 +                    (SEGMENT DST SRC)
579 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
580 +                              (EMIT-BYTE SEGMENT 46)
581 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
583 +(DEFINE-INSTRUCTION PACKSSDW
584 +                    (SEGMENT DST SRC)
585 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
586 +                              (EMIT-BYTE SEGMENT 15)
587 +                              (EMIT-BYTE SEGMENT 107)
588 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
590 +(DEFINE-INSTRUCTION PACKSSWB
591 +                    (SEGMENT DST SRC)
592 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
593 +                              (EMIT-BYTE SEGMENT 15)
594 +                              (EMIT-BYTE SEGMENT 99)
595 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
597 +(DEFINE-INSTRUCTION PACKUSWB
598 +                    (SEGMENT DST SRC)
599 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
600 +                              (EMIT-BYTE SEGMENT 15)
601 +                              (EMIT-BYTE SEGMENT 103)
602 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
604 +(DEFINE-INSTRUCTION PADDB
605 +                    (SEGMENT DST SRC)
606 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
607 +                              (EMIT-BYTE SEGMENT 15)
608 +                              (EMIT-BYTE SEGMENT 252)
609 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
611 +(DEFINE-INSTRUCTION PADDD
612 +                    (SEGMENT DST SRC)
613 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
614 +                              (EMIT-BYTE SEGMENT 15)
615 +                              (EMIT-BYTE SEGMENT 254)
616 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
618 +(DEFINE-INSTRUCTION PADDQ
619 +                    (SEGMENT DST SRC)
620 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
621 +                              (EMIT-BYTE SEGMENT 15)
622 +                              (EMIT-BYTE SEGMENT 212)
623 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
625 +(DEFINE-INSTRUCTION PADDSB
626 +                    (SEGMENT DST SRC)
627 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
628 +                              (EMIT-BYTE SEGMENT 15)
629 +                              (EMIT-BYTE SEGMENT 236)
630 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
632 +(DEFINE-INSTRUCTION PADDSW
633 +                    (SEGMENT DST SRC)
634 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
635 +                              (EMIT-BYTE SEGMENT 15)
636 +                              (EMIT-BYTE SEGMENT 237)
637 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
639 +(DEFINE-INSTRUCTION PADDUSB
640 +                    (SEGMENT DST SRC)
641 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
642 +                              (EMIT-BYTE SEGMENT 15)
643 +                              (EMIT-BYTE SEGMENT 220)
644 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
646 +(DEFINE-INSTRUCTION PADDUSW
647 +                    (SEGMENT DST SRC)
648 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
649 +                              (EMIT-BYTE SEGMENT 15)
650 +                              (EMIT-BYTE SEGMENT 221)
651 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
653 +(DEFINE-INSTRUCTION PADDW
654 +                    (SEGMENT DST SRC)
655 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
656 +                              (EMIT-BYTE SEGMENT 15)
657 +                              (EMIT-BYTE SEGMENT 253)
658 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
660 +(DEFINE-INSTRUCTION PAND
661 +                    (SEGMENT DST SRC)
662 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
663 +                              (EMIT-BYTE SEGMENT 15)
664 +                              (EMIT-BYTE SEGMENT 219)
665 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
667 +(DEFINE-INSTRUCTION PANDN
668 +                    (SEGMENT DST SRC)
669 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
670 +                              (EMIT-BYTE SEGMENT 15)
671 +                              (EMIT-BYTE SEGMENT 223)
672 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
674 +(DEFINE-INSTRUCTION PAVGB
675 +                    (SEGMENT DST SRC)
676 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
677 +                              (EMIT-BYTE SEGMENT 15)
678 +                              (EMIT-BYTE SEGMENT 224)
679 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
681 +(DEFINE-INSTRUCTION PAVGW
682 +                    (SEGMENT DST SRC)
683 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
684 +                              (EMIT-BYTE SEGMENT 15)
685 +                              (EMIT-BYTE SEGMENT 227)
686 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
688 +(DEFINE-INSTRUCTION PCMPEQB
689 +                    (SEGMENT DST SRC)
690 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
691 +                              (EMIT-BYTE SEGMENT 15)
692 +                              (EMIT-BYTE SEGMENT 116)
693 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
695 +(DEFINE-INSTRUCTION PCMPEQD
696 +                    (SEGMENT DST SRC)
697 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
698 +                              (EMIT-BYTE SEGMENT 15)
699 +                              (EMIT-BYTE SEGMENT 118)
700 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
702 +(DEFINE-INSTRUCTION PCMPEQW
703 +                    (SEGMENT DST SRC)
704 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
705 +                              (EMIT-BYTE SEGMENT 15)
706 +                              (EMIT-BYTE SEGMENT 117)
707 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
709 +(DEFINE-INSTRUCTION PCMPGTB
710 +                    (SEGMENT DST SRC)
711 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
712 +                              (EMIT-BYTE SEGMENT 15)
713 +                              (EMIT-BYTE SEGMENT 100)
714 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
716 +(DEFINE-INSTRUCTION PCMPGTD
717 +                    (SEGMENT DST SRC)
718 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
719 +                              (EMIT-BYTE SEGMENT 15)
720 +                              (EMIT-BYTE SEGMENT 102)
721 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
723 +(DEFINE-INSTRUCTION PCMPGTW
724 +                    (SEGMENT DST SRC)
725 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
726 +                              (EMIT-BYTE SEGMENT 15)
727 +                              (EMIT-BYTE SEGMENT 101)
728 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
730 +(DEFINE-INSTRUCTION PMADDWD
731 +                    (SEGMENT DST SRC)
732 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
733 +                              (EMIT-BYTE SEGMENT 15)
734 +                              (EMIT-BYTE SEGMENT 245)
735 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
737 +(DEFINE-INSTRUCTION PMAXSW
738 +                    (SEGMENT DST SRC)
739 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
740 +                              (EMIT-BYTE SEGMENT 15)
741 +                              (EMIT-BYTE SEGMENT 238)
742 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
744 +(DEFINE-INSTRUCTION PMAXUB
745 +                    (SEGMENT DST SRC)
746 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
747 +                              (EMIT-BYTE SEGMENT 15)
748 +                              (EMIT-BYTE SEGMENT 222)
749 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
751 +(DEFINE-INSTRUCTION PMINSW
752 +                    (SEGMENT DST SRC)
753 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
754 +                              (EMIT-BYTE SEGMENT 15)
755 +                              (EMIT-BYTE SEGMENT 234)
756 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
758 +(DEFINE-INSTRUCTION PMINUB
759 +                    (SEGMENT DST SRC)
760 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
761 +                              (EMIT-BYTE SEGMENT 15)
762 +                              (EMIT-BYTE SEGMENT 218)
763 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
765 +(DEFINE-INSTRUCTION PMOVMSKB
766 +                    (SEGMENT DST SRC)
767 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
768 +                              (EMIT-BYTE SEGMENT 15)
769 +                              (EMIT-BYTE SEGMENT 215)
770 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
772 +(DEFINE-INSTRUCTION PMULHUW
773 +                    (SEGMENT DST SRC)
774 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
775 +                              (EMIT-BYTE SEGMENT 15)
776 +                              (EMIT-BYTE SEGMENT 228)
777 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
779 +(DEFINE-INSTRUCTION PMULHW
780 +                    (SEGMENT DST SRC)
781 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
782 +                              (EMIT-BYTE SEGMENT 15)
783 +                              (EMIT-BYTE SEGMENT 229)
784 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
786 +(DEFINE-INSTRUCTION PMULLW
787 +                    (SEGMENT DST SRC)
788 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
789 +                              (EMIT-BYTE SEGMENT 15)
790 +                              (EMIT-BYTE SEGMENT 213)
791 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
793 +(DEFINE-INSTRUCTION PMULUDQ
794 +                    (SEGMENT DST SRC)
795 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
796 +                              (EMIT-BYTE SEGMENT 15)
797 +                              (EMIT-BYTE SEGMENT 244)
798 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
800 +(DEFINE-INSTRUCTION POR
801 +                    (SEGMENT DST SRC)
802 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
803 +                              (EMIT-BYTE SEGMENT 15)
804 +                              (EMIT-BYTE SEGMENT 235)
805 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
807 +(DEFINE-INSTRUCTION PSADBW
808 +                    (SEGMENT DST SRC)
809 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
810 +                              (EMIT-BYTE SEGMENT 15)
811 +                              (EMIT-BYTE SEGMENT 246)
812 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
814 +(DEFINE-INSTRUCTION PSSLD
815 +                    (SEGMENT DST SRC)
816 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
817 +                              (EMIT-BYTE SEGMENT 15)
818 +                              (EMIT-BYTE SEGMENT 242)
819 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
821 +(DEFINE-INSTRUCTION PSLLQ
822 +                    (SEGMENT DST SRC)
823 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
824 +                              (EMIT-BYTE SEGMENT 15)
825 +                              (EMIT-BYTE SEGMENT 243)
826 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
828 +(DEFINE-INSTRUCTION PSLLW
829 +                    (SEGMENT DST SRC)
830 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
831 +                              (EMIT-BYTE SEGMENT 15)
832 +                              (EMIT-BYTE SEGMENT 241)
833 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
835 +(DEFINE-INSTRUCTION PSRAD
836 +                    (SEGMENT DST SRC)
837 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
838 +                              (EMIT-BYTE SEGMENT 15)
839 +                              (EMIT-BYTE SEGMENT 226)
840 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
842 +(DEFINE-INSTRUCTION PSRAW
843 +                    (SEGMENT DST SRC)
844 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
845 +                              (EMIT-BYTE SEGMENT 15)
846 +                              (EMIT-BYTE SEGMENT 226)
847 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
849 +(DEFINE-INSTRUCTION PSRLD
850 +                    (SEGMENT DST SRC)
851 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
852 +                              (EMIT-BYTE SEGMENT 15)
853 +                              (EMIT-BYTE SEGMENT 210)
854 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
856 +(DEFINE-INSTRUCTION PSRLQ
857 +                    (SEGMENT DST SRC)
858 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
859 +                              (EMIT-BYTE SEGMENT 15)
860 +                              (EMIT-BYTE SEGMENT 211)
861 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
863 +(DEFINE-INSTRUCTION PSRLW
864 +                    (SEGMENT DST SRC)
865 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
866 +                              (EMIT-BYTE SEGMENT 15)
867 +                              (EMIT-BYTE SEGMENT 209)
868 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
870 +(DEFINE-INSTRUCTION PSUBB
871 +                    (SEGMENT DST SRC)
872 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
873 +                              (EMIT-BYTE SEGMENT 15)
874 +                              (EMIT-BYTE SEGMENT 248)
875 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
877 +(DEFINE-INSTRUCTION PSUBD
878 +                    (SEGMENT DST SRC)
879 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
880 +                              (EMIT-BYTE SEGMENT 15)
881 +                              (EMIT-BYTE SEGMENT 250)
882 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
884 +(DEFINE-INSTRUCTION PSUBQ
885 +                    (SEGMENT DST SRC)
886 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
887 +                              (EMIT-BYTE SEGMENT 15)
888 +                              (EMIT-BYTE SEGMENT 251)
889 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
891 +(DEFINE-INSTRUCTION PSUBSB
892 +                    (SEGMENT DST SRC)
893 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
894 +                              (EMIT-BYTE SEGMENT 15)
895 +                              (EMIT-BYTE SEGMENT 232)
896 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
898 +(DEFINE-INSTRUCTION PSUBSW
899 +                    (SEGMENT DST SRC)
900 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
901 +                              (EMIT-BYTE SEGMENT 15)
902 +                              (EMIT-BYTE SEGMENT 233)
903 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
905 +(DEFINE-INSTRUCTION PSUBUSB
906 +                    (SEGMENT DST SRC)
907 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
908 +                              (EMIT-BYTE SEGMENT 15)
909 +                              (EMIT-BYTE SEGMENT 216)
910 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
912 +(DEFINE-INSTRUCTION PSUBUSW
913 +                    (SEGMENT DST SRC)
914 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
915 +                              (EMIT-BYTE SEGMENT 15)
916 +                              (EMIT-BYTE SEGMENT 217)
917 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
919 +(DEFINE-INSTRUCTION PSUBW
920 +                    (SEGMENT DST SRC)
921 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
922 +                              (EMIT-BYTE SEGMENT 15)
923 +                              (EMIT-BYTE SEGMENT 249)
924 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
926 +(DEFINE-INSTRUCTION PUNPCKHBW
927 +                    (SEGMENT DST SRC)
928 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
929 +                              (EMIT-BYTE SEGMENT 15)
930 +                              (EMIT-BYTE SEGMENT 104)
931 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
933 +(DEFINE-INSTRUCTION PUNPCKHDQ
934 +                    (SEGMENT DST SRC)
935 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
936 +                              (EMIT-BYTE SEGMENT 15)
937 +                              (EMIT-BYTE SEGMENT 106)
938 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
940 +(DEFINE-INSTRUCTION PUNPCKHQDQ
941 +                    (SEGMENT DST SRC)
942 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
943 +                              (EMIT-BYTE SEGMENT 15)
944 +                              (EMIT-BYTE SEGMENT 109)
945 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
947 +(DEFINE-INSTRUCTION PUNPCKHWD
948 +                    (SEGMENT DST SRC)
949 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
950 +                              (EMIT-BYTE SEGMENT 15)
951 +                              (EMIT-BYTE SEGMENT 105)
952 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
954 +(DEFINE-INSTRUCTION PUNPCKLBW
955 +                    (SEGMENT DST SRC)
956 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
957 +                              (EMIT-BYTE SEGMENT 15)
958 +                              (EMIT-BYTE SEGMENT 96)
959 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
961 +(DEFINE-INSTRUCTION PUNPCKLDQ
962 +                    (SEGMENT DST SRC)
963 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
964 +                              (EMIT-BYTE SEGMENT 15)
965 +                              (EMIT-BYTE SEGMENT 98)
966 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
968 +(DEFINE-INSTRUCTION PUNPCKLQDQ
969 +                    (SEGMENT DST SRC)
970 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
971 +                              (EMIT-BYTE SEGMENT 15)
972 +                              (EMIT-BYTE SEGMENT 108)
973 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
975 +(DEFINE-INSTRUCTION PUNPCKLWD
976 +                    (SEGMENT DST SRC)
977 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
978 +                              (EMIT-BYTE SEGMENT 15)
979 +                              (EMIT-BYTE SEGMENT 97)
980 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
982 +(DEFINE-INSTRUCTION PXOR
983 +                    (SEGMENT DST SRC)
984 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
985 +                              (EMIT-BYTE SEGMENT 15)
986 +                              (EMIT-BYTE SEGMENT 239)
987 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
989 +(DEFINE-INSTRUCTION CVTDQ2PD
990 +                    (SEGMENT DST SRC)
991 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
992 +                              (EMIT-BYTE SEGMENT 15)
993 +                              (EMIT-BYTE SEGMENT 230)
994 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
996 +(DEFINE-INSTRUCTION CVTDQ2PS
997 +                    (SEGMENT DST SRC)
998 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
999 +                              (EMIT-BYTE SEGMENT 91)
1000 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1002 +(DEFINE-INSTRUCTION CVTPD2DQ
1003 +                    (SEGMENT DST SRC)
1004 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
1005 +                              (EMIT-BYTE SEGMENT 15)
1006 +                              (EMIT-BYTE SEGMENT 230)
1007 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1009 +(DEFINE-INSTRUCTION CVTPD2PI
1010 +                    (SEGMENT DST SRC)
1011 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1012 +                              (EMIT-BYTE SEGMENT 15)
1013 +                              (EMIT-BYTE SEGMENT 45)
1014 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1016 +(DEFINE-INSTRUCTION CVTPD2PS
1017 +                    (SEGMENT DST SRC)
1018 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1019 +                              (EMIT-BYTE SEGMENT 15)
1020 +                              (EMIT-BYTE SEGMENT 90)
1021 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1023 +(DEFINE-INSTRUCTION CVTPI2PD
1024 +                    (SEGMENT DST SRC)
1025 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1026 +                              (EMIT-BYTE SEGMENT 15)
1027 +                              (EMIT-BYTE SEGMENT 42)
1028 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1030 +(DEFINE-INSTRUCTION CVTPI2PS
1031 +                    (SEGMENT DST SRC)
1032 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
1033 +                              (EMIT-BYTE SEGMENT 42)
1034 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1036 +(DEFINE-INSTRUCTION CVTPS2DQ
1037 +                    (SEGMENT DST SRC)
1038 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1039 +                              (EMIT-BYTE SEGMENT 15)
1040 +                              (EMIT-BYTE SEGMENT 91)
1041 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1043 +(DEFINE-INSTRUCTION CVTPS2PD
1044 +                    (SEGMENT DST SRC)
1045 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
1046 +                              (EMIT-BYTE SEGMENT 90)
1047 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1049 +(DEFINE-INSTRUCTION CVTPS2PI
1050 +                    (SEGMENT DST SRC)
1051 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
1052 +                              (EMIT-BYTE SEGMENT 45)
1053 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1055 +(DEFINE-INSTRUCTION CVTSD2SI
1056 +                    (SEGMENT DST SRC)
1057 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
1058 +                              (EMIT-BYTE SEGMENT 15)
1059 +                              (EMIT-BYTE SEGMENT 45)
1060 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1062 +(DEFINE-INSTRUCTION CVTSD2SS
1063 +                    (SEGMENT DST SRC)
1064 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
1065 +                              (EMIT-BYTE SEGMENT 15)
1066 +                              (EMIT-BYTE SEGMENT 90)
1067 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1069 +(DEFINE-INSTRUCTION CVTSI2SD
1070 +                    (SEGMENT DST SRC)
1071 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
1072 +                              (EMIT-BYTE SEGMENT 15)
1073 +                              (EMIT-BYTE SEGMENT 42)
1074 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1076 +(DEFINE-INSTRUCTION CVTSI2SS
1077 +                    (SEGMENT DST SRC)
1078 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
1079 +                              (EMIT-BYTE SEGMENT 15)
1080 +                              (EMIT-BYTE SEGMENT 42)
1081 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1083 +(DEFINE-INSTRUCTION CVTSS2SD
1084 +                    (SEGMENT DST SRC)
1085 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
1086 +                              (EMIT-BYTE SEGMENT 15)
1087 +                              (EMIT-BYTE SEGMENT 90)
1088 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1090 +(DEFINE-INSTRUCTION CVTSS2SI
1091 +                    (SEGMENT DST SRC)
1092 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
1093 +                              (EMIT-BYTE SEGMENT 15)
1094 +                              (EMIT-BYTE SEGMENT 45)
1095 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1097 +(DEFINE-INSTRUCTION CVTTPD2DQ
1098 +                    (SEGMENT DST SRC)
1099 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1100 +                              (EMIT-BYTE SEGMENT 15)
1101 +                              (EMIT-BYTE SEGMENT 230)
1102 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1104 +(DEFINE-INSTRUCTION CVTTPD2PI
1105 +                    (SEGMENT DST SRC)
1106 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1107 +                              (EMIT-BYTE SEGMENT 15)
1108 +                              (EMIT-BYTE SEGMENT 44)
1109 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1111 +(DEFINE-INSTRUCTION CVTTPS2DQ
1112 +                    (SEGMENT DST SRC)
1113 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
1114 +                              (EMIT-BYTE SEGMENT 15)
1115 +                              (EMIT-BYTE SEGMENT 91)
1116 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1118 +(DEFINE-INSTRUCTION CVTTPS2PI
1119 +                    (SEGMENT DST SRC)
1120 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
1121 +                              (EMIT-BYTE SEGMENT 44)
1122 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1124 +(DEFINE-INSTRUCTION CVTTSD2SI
1125 +                    (SEGMENT DST SRC)
1126 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
1127 +                              (EMIT-BYTE SEGMENT 15)
1128 +                              (EMIT-BYTE SEGMENT 44)
1129 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1131 +(DEFINE-INSTRUCTION CVTTSS2SI
1132 +                    (SEGMENT DST SRC)
1133 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
1134 +                              (EMIT-BYTE SEGMENT 15)
1135 +                              (EMIT-BYTE SEGMENT 44)
1136 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1138 +(DEFINE-INSTRUCTION LDDQU
1139 +                    (SEGMENT DST SRC)
1140 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
1141 +                              (EMIT-BYTE SEGMENT 15)
1142 +                              (EMIT-BYTE SEGMENT 240)
1143 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1145 +(DEFINE-INSTRUCTION MASKMOVDQU
1146 +                    (SEGMENT DST SRC)
1147 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1148 +                              (EMIT-BYTE SEGMENT 15)
1149 +                              (EMIT-BYTE SEGMENT 247)
1150 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1152 +(DEFINE-INSTRUCTION MOVDDUP
1153 +                    (SEGMENT DST SRC)
1154 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
1155 +                              (EMIT-BYTE SEGMENT 15)
1156 +                              (EMIT-BYTE SEGMENT 18)
1157 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1159 +(DEFINE-INSTRUCTION MOVHLPS
1160 +                    (SEGMENT DST SRC)
1161 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
1162 +                              (EMIT-BYTE SEGMENT 18)
1163 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1165 +(DEFINE-INSTRUCTION MOVLHPS
1166 +                    (SEGMENT DST SRC)
1167 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
1168 +                              (EMIT-BYTE SEGMENT 22)
1169 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1171 +(DEFINE-INSTRUCTION MOVMSKPD
1172 +                    (SEGMENT DST SRC)
1173 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1174 +                              (EMIT-BYTE SEGMENT 15)
1175 +                              (EMIT-BYTE SEGMENT 80)
1176 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1178 +(DEFINE-INSTRUCTION MOVMSKPS
1179 +                    (SEGMENT DST SRC)
1180 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
1181 +                              (EMIT-BYTE SEGMENT 80)
1182 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1184 +(DEFINE-INSTRUCTION MOVNTDQ
1185 +                    (SEGMENT DST SRC)
1186 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1187 +                              (EMIT-BYTE SEGMENT 15)
1188 +                              (EMIT-BYTE SEGMENT 231)
1189 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1191 +(DEFINE-INSTRUCTION MOVNTPD
1192 +                    (SEGMENT DST SRC)
1193 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1194 +                              (EMIT-BYTE SEGMENT 15)
1195 +                              (EMIT-BYTE SEGMENT 43)
1196 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1198 +(DEFINE-INSTRUCTION MOVNTPS
1199 +                    (SEGMENT DST SRC)
1200 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
1201 +                              (EMIT-BYTE SEGMENT 43)
1202 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1204 +(DEFINE-INSTRUCTION MOVSHDUP
1205 +                    (SEGMENT DST SRC)
1206 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
1207 +                              (EMIT-BYTE SEGMENT 15)
1208 +                              (EMIT-BYTE SEGMENT 22)
1209 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1211 +(DEFINE-INSTRUCTION MOVSLDUP
1212 +                    (SEGMENT DST SRC)
1213 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
1214 +                              (EMIT-BYTE SEGMENT 15)
1215 +                              (EMIT-BYTE SEGMENT 18)
1216 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))))
1218 +(DEFINE-INSTRUCTION PEXTRW
1219 +                    (SEGMENT DST SRC BYTE)
1220 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1221 +                              (EMIT-BYTE SEGMENT 15)
1222 +                              (EMIT-BYTE SEGMENT 197)
1223 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))
1224 +                              (EMIT-SIZED-IMMEDIATE SEGMENT :BYTE BYTE)))
1226 +(DEFINE-INSTRUCTION PINSRW
1227 +                    (SEGMENT DST SRC BYTE)
1228 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1229 +                              (EMIT-BYTE SEGMENT 15)
1230 +                              (EMIT-BYTE SEGMENT 196)
1231 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))
1232 +                              (EMIT-SIZED-IMMEDIATE SEGMENT :BYTE BYTE)))
1234 +(DEFINE-INSTRUCTION PSHUFD
1235 +                    (SEGMENT DST SRC BYTE)
1236 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1237 +                              (EMIT-BYTE SEGMENT 15)
1238 +                              (EMIT-BYTE SEGMENT 112)
1239 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))
1240 +                              (EMIT-SIZED-IMMEDIATE SEGMENT :BYTE BYTE)))
1242 +(DEFINE-INSTRUCTION PSHUFHW
1243 +                    (SEGMENT DST SRC BYTE)
1244 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
1245 +                              (EMIT-BYTE SEGMENT 15)
1246 +                              (EMIT-BYTE SEGMENT 112)
1247 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))
1248 +                              (EMIT-SIZED-IMMEDIATE SEGMENT :BYTE BYTE)))
1250 +(DEFINE-INSTRUCTION PSHUFLW
1251 +                    (SEGMENT DST SRC BYTE)
1252 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
1253 +                              (EMIT-BYTE SEGMENT 15)
1254 +                              (EMIT-BYTE SEGMENT 112)
1255 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))
1256 +                              (EMIT-SIZED-IMMEDIATE SEGMENT :BYTE BYTE)))
1258 +(DEFINE-INSTRUCTION SHUFPD
1259 +                    (SEGMENT DST SRC BYTE)
1260 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1261 +                              (EMIT-BYTE SEGMENT 15)
1262 +                              (EMIT-BYTE SEGMENT 198)
1263 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))
1264 +                              (EMIT-SIZED-IMMEDIATE SEGMENT :BYTE BYTE)))
1266 +(DEFINE-INSTRUCTION SHUFPS
1267 +                    (SEGMENT DST SRC BYTE)
1268 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
1269 +                              (EMIT-BYTE SEGMENT 198)
1270 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))
1271 +                              (EMIT-SIZED-IMMEDIATE SEGMENT :BYTE BYTE)))
1273 +(DEFINE-INSTRUCTION CMPPD
1274 +                    (SEGMENT DST SRC COND)
1275 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1276 +                              (EMIT-BYTE SEGMENT 15)
1277 +                              (EMIT-BYTE SEGMENT 194)
1278 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))
1279 +                              (EMIT-SIZED-IMMEDIATE SEGMENT
1280 +                                                    :BYTE
1281 +                                                    (CDR
1282 +                                                     (ASSOC COND
1283 +                                                            '((:EQ . 0)
1284 +                                                              (:E . 0) (:Z . 0)
1285 +                                                              (:L . 1)
1286 +                                                              (:NGE . 1)
1287 +                                                              (:LE . 2)
1288 +                                                              (:NG . 2)
1289 +                                                              (:UNORD . 3)
1290 +                                                              (:NE . 4)
1291 +                                                              (:NZ . 4)
1292 +                                                              (:NL . 5)
1293 +                                                              (:GE . 5)
1294 +                                                              (:NLE . 6)
1295 +                                                              (:G . 6)
1296 +                                                              (:ORD . 7)))))))
1298 +(DEFINE-INSTRUCTION CMPPS
1299 +                    (SEGMENT DST SRC COND)
1300 +                    (:EMITTER (EMIT-BYTE SEGMENT 15)
1301 +                              (EMIT-BYTE SEGMENT 194)
1302 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))
1303 +                              (EMIT-SIZED-IMMEDIATE SEGMENT
1304 +                                                    :BYTE
1305 +                                                    (CDR
1306 +                                                     (ASSOC COND
1307 +                                                            '((:EQ . 0)
1308 +                                                              (:E . 0) (:Z . 0)
1309 +                                                              (:L . 1)
1310 +                                                              (:NGE . 1)
1311 +                                                              (:LE . 2)
1312 +                                                              (:NG . 2)
1313 +                                                              (:UNORD . 3)
1314 +                                                              (:NE . 4)
1315 +                                                              (:NZ . 4)
1316 +                                                              (:NL . 5)
1317 +                                                              (:GE . 5)
1318 +                                                              (:NLE . 6)
1319 +                                                              (:G . 6)
1320 +                                                              (:ORD . 7)))))))
1322 +(DEFINE-INSTRUCTION CMPSD
1323 +                    (SEGMENT DST SRC COND)
1324 +                    (:EMITTER (EMIT-BYTE SEGMENT 242)
1325 +                              (EMIT-BYTE SEGMENT 15)
1326 +                              (EMIT-BYTE SEGMENT 194)
1327 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))
1328 +                              (EMIT-SIZED-IMMEDIATE SEGMENT
1329 +                                                    :BYTE
1330 +                                                    (CDR
1331 +                                                     (ASSOC COND
1332 +                                                            '((:EQ . 0)
1333 +                                                              (:E . 0) (:Z . 0)
1334 +                                                              (:L . 1)
1335 +                                                              (:NGE . 1)
1336 +                                                              (:LE . 2)
1337 +                                                              (:NG . 2)
1338 +                                                              (:UNORD . 3)
1339 +                                                              (:NE . 4)
1340 +                                                              (:NZ . 4)
1341 +                                                              (:NL . 5)
1342 +                                                              (:GE . 5)
1343 +                                                              (:NLE . 6)
1344 +                                                              (:G . 6)
1345 +                                                              (:ORD . 7)))))))
1347 +(DEFINE-INSTRUCTION CMPSS
1348 +                    (SEGMENT DST SRC COND)
1349 +                    (:EMITTER (EMIT-BYTE SEGMENT 243)
1350 +                              (EMIT-BYTE SEGMENT 15)
1351 +                              (EMIT-BYTE SEGMENT 194)
1352 +                              (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST))
1353 +                              (EMIT-SIZED-IMMEDIATE SEGMENT
1354 +                                                    :BYTE
1355 +                                                    (CDR
1356 +                                                     (ASSOC COND
1357 +                                                            '((:EQ . 0)
1358 +                                                              (:E . 0) (:Z . 0)
1359 +                                                              (:L . 1)
1360 +                                                              (:NGE . 1)
1361 +                                                              (:LE . 2)
1362 +                                                              (:NG . 2)
1363 +                                                              (:UNORD . 3)
1364 +                                                              (:NE . 4)
1365 +                                                              (:NZ . 4)
1366 +                                                              (:NL . 5)
1367 +                                                              (:GE . 5)
1368 +                                                              (:NLE . 6)
1369 +                                                              (:G . 6)
1370 +                                                              (:ORD . 7)))))))
1372 +(DEFINE-INSTRUCTION MOVAPD
1373 +                    (SEGMENT DST SRC)
1374 +                    (:EMITTER
1375 +                     (COND
1376 +                      ((XMM-REGISTER-P DST) (EMIT-BYTE SEGMENT 102)
1377 +                       (EMIT-BYTE SEGMENT 15) (EMIT-BYTE SEGMENT 40)
1378 +                       (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST)))
1379 +                      (T (EMIT-BYTE SEGMENT 102)
1380 +                         (EMIT-BYTE SEGMENT 15)
1381 +                         (EMIT-BYTE SEGMENT 41)
1382 +                         (EMIT-EA SEGMENT DST (REG-TN-ENCODING SRC))))))
1384 +(DEFINE-INSTRUCTION MOVAPS
1385 +                    (SEGMENT DST SRC)
1386 +                    (:EMITTER
1387 +                     (COND
1388 +                      ((XMM-REGISTER-P DST) (EMIT-BYTE SEGMENT 15)
1389 +                       (EMIT-BYTE SEGMENT 40)
1390 +                       (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST)))
1391 +                      (T (EMIT-BYTE SEGMENT 15)
1392 +                         (EMIT-BYTE SEGMENT 41)
1393 +                         (EMIT-EA SEGMENT DST (REG-TN-ENCODING SRC))))))
1395 +(DEFINE-INSTRUCTION MOVD
1396 +                    (SEGMENT DST SRC)
1397 +                    (:EMITTER
1398 +                     (COND
1399 +                      ((XMM-REGISTER-P DST) (EMIT-BYTE SEGMENT 102)
1400 +                       (EMIT-BYTE SEGMENT 15) (EMIT-BYTE SEGMENT 110)
1401 +                       (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST)))
1402 +                      (T (EMIT-BYTE SEGMENT 102)
1403 +                         (EMIT-BYTE SEGMENT 15)
1404 +                         (EMIT-BYTE SEGMENT 126)
1405 +                         (EMIT-EA SEGMENT DST (REG-TN-ENCODING SRC))))))
1407 +(DEFINE-INSTRUCTION MOVDQA
1408 +                    (SEGMENT DST SRC)
1409 +                    (:EMITTER
1410 +                     (COND
1411 +                      ((XMM-REGISTER-P DST) (EMIT-BYTE SEGMENT 102)
1412 +                       (EMIT-BYTE SEGMENT 15) (EMIT-BYTE SEGMENT 111)
1413 +                       (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST)))
1414 +                      (T (EMIT-BYTE SEGMENT 102)
1415 +                         (EMIT-BYTE SEGMENT 15)
1416 +                         (EMIT-BYTE SEGMENT 127)
1417 +                         (EMIT-EA SEGMENT DST (REG-TN-ENCODING SRC))))))
1419 +(DEFINE-INSTRUCTION MOVDQU
1420 +                    (SEGMENT DST SRC)
1421 +                    (:EMITTER
1422 +                     (COND
1423 +                      ((XMM-REGISTER-P DST) (EMIT-BYTE SEGMENT 243)
1424 +                       (EMIT-BYTE SEGMENT 15) (EMIT-BYTE SEGMENT 111)
1425 +                       (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST)))
1426 +                      (T (EMIT-BYTE SEGMENT 243)
1427 +                         (EMIT-BYTE SEGMENT 15)
1428 +                         (EMIT-BYTE SEGMENT 127)
1429 +                         (EMIT-EA SEGMENT DST (REG-TN-ENCODING SRC))))))
1431 +(DEFINE-INSTRUCTION MOVHPD
1432 +                    (SEGMENT DST SRC)
1433 +                    (:EMITTER
1434 +                     (COND
1435 +                      ((XMM-REGISTER-P DST) (EMIT-BYTE SEGMENT 102)
1436 +                       (EMIT-BYTE SEGMENT 15) (EMIT-BYTE SEGMENT 22)
1437 +                       (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST)))
1438 +                      (T (EMIT-BYTE SEGMENT 102)
1439 +                         (EMIT-BYTE SEGMENT 15)
1440 +                         (EMIT-BYTE SEGMENT 23)
1441 +                         (EMIT-EA SEGMENT DST (REG-TN-ENCODING SRC))))))
1443 +(DEFINE-INSTRUCTION MOVHPS
1444 +                    (SEGMENT DST SRC)
1445 +                    (:EMITTER
1446 +                     (COND
1447 +                      ((XMM-REGISTER-P DST) (EMIT-BYTE SEGMENT 15)
1448 +                       (EMIT-BYTE SEGMENT 22)
1449 +                       (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST)))
1450 +                      (T (EMIT-BYTE SEGMENT 15)
1451 +                         (EMIT-BYTE SEGMENT 23)
1452 +                         (EMIT-EA SEGMENT DST (REG-TN-ENCODING SRC))))))
1454 +(DEFINE-INSTRUCTION MOVLPD
1455 +                    (SEGMENT DST SRC)
1456 +                    (:EMITTER
1457 +                     (COND
1458 +                      ((XMM-REGISTER-P DST) (EMIT-BYTE SEGMENT 102)
1459 +                       (EMIT-BYTE SEGMENT 15) (EMIT-BYTE SEGMENT 18)
1460 +                       (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST)))
1461 +                      (T (EMIT-BYTE SEGMENT 102)
1462 +                         (EMIT-BYTE SEGMENT 15)
1463 +                         (EMIT-BYTE SEGMENT 19)
1464 +                         (EMIT-EA SEGMENT DST (REG-TN-ENCODING SRC))))))
1466 +(DEFINE-INSTRUCTION MOVLPS
1467 +                    (SEGMENT DST SRC)
1468 +                    (:EMITTER
1469 +                     (COND
1470 +                      ((XMM-REGISTER-P DST) (EMIT-BYTE SEGMENT 15)
1471 +                       (EMIT-BYTE SEGMENT 18)
1472 +                       (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST)))
1473 +                      (T (EMIT-BYTE SEGMENT 15)
1474 +                         (EMIT-BYTE SEGMENT 19)
1475 +                         (EMIT-EA SEGMENT DST (REG-TN-ENCODING SRC))))))
1477 +(DEFINE-INSTRUCTION MOVQ
1478 +                    (SEGMENT DST SRC)
1479 +                    (:EMITTER
1480 +                     (COND
1481 +                      ((XMM-REGISTER-P DST) (EMIT-BYTE SEGMENT 243)
1482 +                       (EMIT-BYTE SEGMENT 15) (EMIT-BYTE SEGMENT 126)
1483 +                       (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST)))
1484 +                      (T (EMIT-BYTE SEGMENT 102)
1485 +                         (EMIT-BYTE SEGMENT 15)
1486 +                         (EMIT-BYTE SEGMENT 214)
1487 +                         (EMIT-EA SEGMENT DST (REG-TN-ENCODING SRC))))))
1489 +(DEFINE-INSTRUCTION MOVSD
1490 +                    (SEGMENT DST SRC)
1491 +                    (:EMITTER
1492 +                     (COND
1493 +                      ((XMM-REGISTER-P DST) (EMIT-BYTE SEGMENT 242)
1494 +                       (EMIT-BYTE SEGMENT 15) (EMIT-BYTE SEGMENT 16)
1495 +                       (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST)))
1496 +                      (T (EMIT-BYTE SEGMENT 242)
1497 +                         (EMIT-BYTE SEGMENT 15)
1498 +                         (EMIT-BYTE SEGMENT 17)
1499 +                         (EMIT-EA SEGMENT DST (REG-TN-ENCODING SRC))))))
1501 +(DEFINE-INSTRUCTION MOVSS
1502 +                    (SEGMENT DST SRC)
1503 +                    (:EMITTER
1504 +                     (COND
1505 +                      ((XMM-REGISTER-P DST) (EMIT-BYTE SEGMENT 243)
1506 +                       (EMIT-BYTE SEGMENT 15) (EMIT-BYTE SEGMENT 16)
1507 +                       (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST)))
1508 +                      (T (EMIT-BYTE SEGMENT 243)
1509 +                         (EMIT-BYTE SEGMENT 15)
1510 +                         (EMIT-BYTE SEGMENT 17)
1511 +                         (EMIT-EA SEGMENT DST (REG-TN-ENCODING SRC))))))
1513 +(DEFINE-INSTRUCTION MOVUPD
1514 +                    (SEGMENT DST SRC)
1515 +                    (:EMITTER
1516 +                     (COND
1517 +                      ((XMM-REGISTER-P DST) (EMIT-BYTE SEGMENT 102)
1518 +                       (EMIT-BYTE SEGMENT 15) (EMIT-BYTE SEGMENT 16)
1519 +                       (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST)))
1520 +                      (T (EMIT-BYTE SEGMENT 102)
1521 +                         (EMIT-BYTE SEGMENT 15)
1522 +                         (EMIT-BYTE SEGMENT 17)
1523 +                         (EMIT-EA SEGMENT DST (REG-TN-ENCODING SRC))))))
1525 +(DEFINE-INSTRUCTION MOVUPS
1526 +                    (SEGMENT DST SRC)
1527 +                    (:EMITTER
1528 +                     (COND
1529 +                      ((XMM-REGISTER-P DST) (EMIT-BYTE SEGMENT 15)
1530 +                       (EMIT-BYTE SEGMENT 16)
1531 +                       (EMIT-EA SEGMENT SRC (REG-TN-ENCODING DST)))
1532 +                      (T (EMIT-BYTE SEGMENT 15)
1533 +                         (EMIT-BYTE SEGMENT 17)
1534 +                         (EMIT-EA SEGMENT DST (REG-TN-ENCODING SRC))))))
1536 +(DEFINE-INSTRUCTION PSLLD-IB
1537 +                    (SEGMENT DST AMOUNT)
1538 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1539 +                              (EMIT-BYTE SEGMENT 15)
1540 +                              (EMIT-BYTE SEGMENT 114)
1541 +                              (EMIT-EA SEGMENT DST 6)
1542 +                              (EMIT-BYTE SEGMENT AMOUNT)))
1544 +(DEFINE-INSTRUCTION PSLLDQ-IB
1545 +                    (SEGMENT DST AMOUNT)
1546 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1547 +                              (EMIT-BYTE SEGMENT 15)
1548 +                              (EMIT-BYTE SEGMENT 115)
1549 +                              (EMIT-EA SEGMENT DST 7)
1550 +                              (EMIT-BYTE SEGMENT AMOUNT)))
1552 +(DEFINE-INSTRUCTION PSLLQ-IB
1553 +                    (SEGMENT DST AMOUNT)
1554 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1555 +                              (EMIT-BYTE SEGMENT 15)
1556 +                              (EMIT-BYTE SEGMENT 115)
1557 +                              (EMIT-EA SEGMENT DST 6)
1558 +                              (EMIT-BYTE SEGMENT AMOUNT)))
1560 +(DEFINE-INSTRUCTION PSLLW-IB
1561 +                    (SEGMENT DST AMOUNT)
1562 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1563 +                              (EMIT-BYTE SEGMENT 15)
1564 +                              (EMIT-BYTE SEGMENT 113)
1565 +                              (EMIT-EA SEGMENT DST 6)
1566 +                              (EMIT-BYTE SEGMENT AMOUNT)))
1568 +(DEFINE-INSTRUCTION PSRAD-IB
1569 +                    (SEGMENT DST AMOUNT)
1570 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1571 +                              (EMIT-BYTE SEGMENT 15)
1572 +                              (EMIT-BYTE SEGMENT 114)
1573 +                              (EMIT-EA SEGMENT DST 4)
1574 +                              (EMIT-BYTE SEGMENT AMOUNT)))
1576 +(DEFINE-INSTRUCTION PSRAW-IB
1577 +                    (SEGMENT DST AMOUNT)
1578 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1579 +                              (EMIT-BYTE SEGMENT 15)
1580 +                              (EMIT-BYTE SEGMENT 113)
1581 +                              (EMIT-EA SEGMENT DST 4)
1582 +                              (EMIT-BYTE SEGMENT AMOUNT)))
1584 +(DEFINE-INSTRUCTION PSRLD-IB
1585 +                    (SEGMENT DST AMOUNT)
1586 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1587 +                              (EMIT-BYTE SEGMENT 15)
1588 +                              (EMIT-BYTE SEGMENT 114)
1589 +                              (EMIT-EA SEGMENT DST 2)
1590 +                              (EMIT-BYTE SEGMENT AMOUNT)))
1592 +(DEFINE-INSTRUCTION PSRLDQ-IB
1593 +                    (SEGMENT DST AMOUNT)
1594 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1595 +                              (EMIT-BYTE SEGMENT 15)
1596 +                              (EMIT-BYTE SEGMENT 115)
1597 +                              (EMIT-EA SEGMENT DST 3)
1598 +                              (EMIT-BYTE SEGMENT AMOUNT)))
1600 +(DEFINE-INSTRUCTION PSRLQ-IB
1601 +                    (SEGMENT DST AMOUNT)
1602 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1603 +                              (EMIT-BYTE SEGMENT 15)
1604 +                              (EMIT-BYTE SEGMENT 115)
1605 +                              (EMIT-EA SEGMENT DST 2)
1606 +                              (EMIT-BYTE SEGMENT AMOUNT)))
1608 +(DEFINE-INSTRUCTION PSRLW-IB
1609 +                    (SEGMENT DST AMOUNT)
1610 +                    (:EMITTER (EMIT-BYTE SEGMENT 102)
1611 +                              (EMIT-BYTE SEGMENT 15)
1612 +                              (EMIT-BYTE SEGMENT 113)
1613 +                              (EMIT-EA SEGMENT DST 2)
1614 +                              (EMIT-BYTE SEGMENT AMOUNT)))
1618 +;;; CPUID
1621 +(define-instruction cpuid (segment)
1622 +  (:emitter
1623 +   (emit-byte segment #x0F)
1624 +   (emit-byte segment #xA2)))
1629  ;;;; fp instructions
1630  ;;;;
1631  ;;;; FIXME: This section said "added by jrd", which should end up in CREDITS.
1632 diff -x 'CVS*' -Naur src-093/compiler/x86/vm.lisp src/compiler/x86/vm.lisp
1633 --- src-093/compiler/x86/vm.lisp        2005-08-05 16:13:29.000000000 +0300
1634 +++ src/compiler/x86/vm.lisp    2005-08-17 13:06:11.717026836 +0300
1635 @@ -21,7 +21,8 @@
1636    (defvar *byte-register-names* (make-array 8 :initial-element nil))
1637    (defvar *word-register-names* (make-array 16 :initial-element nil))
1638    (defvar *dword-register-names* (make-array 16 :initial-element nil))
1639 -  (defvar *float-register-names* (make-array 8 :initial-element nil)))
1640 +  (defvar *float-register-names* (make-array 8 :initial-element nil))
1641 +  (defvar *xmmword-register-names* (make-array 8 :initial-element nil)))
1643  (macrolet ((defreg (name offset size)
1644               (let ((offset-sym (symbolicate name "-OFFSET"))
1645 @@ -91,6 +92,17 @@
1646    (defreg fr7 7 :float)
1647    (defregset *float-regs* fr0 fr1 fr2 fr3 fr4 fr5 fr6 fr7)
1649 +  ;; sse registers
1650 +  (defreg xmm0 0 :xmmword)
1651 +  (defreg xmm1 1 :xmmword)
1652 +  (defreg xmm2 2 :xmmword)
1653 +  (defreg xmm3 3 :xmmword)
1654 +  (defreg xmm4 4 :xmmword)
1655 +  (defreg xmm5 5 :xmmword)
1656 +  (defreg xmm6 6 :xmmword)
1657 +  (defreg xmm7 7 :xmmword)
1658 +  (defregset *xmm-regs* xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7)
1659 +  
1660    ;; registers used to pass arguments
1661    ;;
1662    ;; the number of arguments/return values passed in registers
1663 @@ -118,6 +130,8 @@
1664  ;;; the new way:
1665  (define-storage-base float-registers :finite :size 8)
1667 +(define-storage-base xmm-registers :finite :size 8)
1669  (define-storage-base stack :unbounded :size 8)
1670  (define-storage-base constant :non-packed)
1671  (define-storage-base immediate-constant :non-packed)
1672 @@ -186,6 +200,7 @@
1673    (sap-stack stack)                     ; System area pointers.
1674    (single-stack stack)                  ; single-floats
1675    (double-stack stack :element-size 2)  ; double-floats.
1676 +  (xmm-stack stack :element-size 4)  ; xmm
1677    #!+long-float
1678    (long-stack stack :element-size 3)    ; long-floats.
1679    (complex-single-stack stack :element-size 2)  ; complex-single-floats
1680 @@ -290,6 +305,12 @@
1681                :save-p t
1682                :alternate-scs (double-stack))
1684 +  ;; non-descriptor XMMs
1685 +  (xmm-reg xmm-registers
1686 +          :locations #.*xmm-regs*
1687 +          :save-p t
1688 +          :alternate-scs (xmm-stack))
1690    ;; non-descriptor LONG-FLOATs
1691    #!+long-float
1692    (long-reg float-registers
1693 @@ -337,6 +358,7 @@
1694  ;;; These are used to (at least) determine operand size.
1695  (defparameter *float-sc-names* '(single-reg))
1696  (defparameter *double-sc-names* '(double-reg double-stack))
1697 +(defparameter *xmmword-sc-names* '(xmm-reg))
1698  ) ; EVAL-WHEN
1699  \f
1700  ;;;; miscellaneous TNs for the various registers
1701 @@ -359,7 +381,8 @@
1702    (def-misc-reg-tns unsigned-reg eax ebx ecx edx ebp esp edi esi)
1703    (def-misc-reg-tns word-reg ax bx cx dx bp sp di si)
1704    (def-misc-reg-tns byte-reg al ah bl bh cl ch dl dh)
1705 -  (def-misc-reg-tns single-reg fr0 fr1 fr2 fr3 fr4 fr5 fr6 fr7))
1706 +  (def-misc-reg-tns single-reg fr0 fr1 fr2 fr3 fr4 fr5 fr6 fr7)
1707 +  (def-misc-reg-tns xmm-reg xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7))
1709  ;;; TNs for registers used to pass arguments
1710  (defparameter *register-arg-tns*
1711 @@ -444,6 +467,7 @@
1712               ;; FIXME: Shouldn't this be an ERROR?
1713               (format nil "<unknown reg: off=~W, sc=~A>" offset sc-name))))
1714        (float-registers (format nil "FR~D" offset))
1715 +      (xmm-registers (format nil "XMM~D" offset))
1716        (stack (format nil "S~D" offset))
1717        (constant (format nil "Const~D" offset))
1718        (immediate-constant "Immed")