1 // stop compiling if NORECBUILD build (only for Visual Studio)
2 #if !(defined(_MSC_VER) && defined(PCSX2_NORECBUILD))
10 /********************/
15 void MOVQMtoR( x86MMXRegType to, uptr from )
17 MEMADDR_OP(0, VAROP2(0x0F, 0x6F), true, to, from, 0);
21 void MOVQRtoM( uptr to, x86MMXRegType from )
23 MEMADDR_OP(0, VAROP2(0x0F, 0x7F), true, from, to, 0);
27 void PANDRtoR( x86MMXRegType to, x86MMXRegType from )
34 void PANDNRtoR( x86MMXRegType to, x86MMXRegType from )
42 void PORRtoR( x86MMXRegType to, x86MMXRegType from )
50 void PXORRtoR( x86MMXRegType to, x86MMXRegType from )
57 /* psllq r64 to r64 */
58 void PSLLQRtoR( x86MMXRegType to, x86MMXRegType from )
65 /* psllq m64 to r64 */
66 void PSLLQMtoR( x86MMXRegType to, uptr from )
68 MEMADDR_OP(0, VAROP2(0x0F, 0xF3), true, to, from, 0);
71 /* psllq imm8 to r64 */
72 void PSLLQItoR( x86MMXRegType to, u8 from )
80 /* psrlq r64 to r64 */
81 void PSRLQRtoR( x86MMXRegType to, x86MMXRegType from )
88 /* psrlq m64 to r64 */
89 void PSRLQMtoR( x86MMXRegType to, uptr from )
91 MEMADDR_OP(0, VAROP2(0x0F, 0xD3), true, to, from, 0);
94 /* psrlq imm8 to r64 */
95 void PSRLQItoR( x86MMXRegType to, u8 from )
103 /* paddusb r64 to r64 */
104 void PADDUSBRtoR( x86MMXRegType to, x86MMXRegType from )
108 ModRM( 3, to, from );
111 /* paddusb m64 to r64 */
112 void PADDUSBMtoR( x86MMXRegType to, uptr from )
114 MEMADDR_OP(0, VAROP2(0x0F, 0xDC), true, to, from, 0);
117 /* paddusw r64 to r64 */
118 void PADDUSWRtoR( x86MMXRegType to, x86MMXRegType from )
122 ModRM( 3, to, from );
125 /* paddusw m64 to r64 */
126 void PADDUSWMtoR( x86MMXRegType to, uptr from )
128 MEMADDR_OP(0, VAROP2(0x0F, 0xDD), true, to, from, 0);
131 /* paddb r64 to r64 */
132 void PADDBRtoR( x86MMXRegType to, x86MMXRegType from )
136 ModRM( 3, to, from );
139 /* paddb m64 to r64 */
140 void PADDBMtoR( x86MMXRegType to, uptr from )
142 MEMADDR_OP(0, VAROP2(0x0F, 0xFC), true, to, from, 0);
145 /* paddw r64 to r64 */
146 void PADDWRtoR( x86MMXRegType to, x86MMXRegType from )
150 ModRM( 3, to, from );
153 /* paddw m64 to r64 */
154 void PADDWMtoR( x86MMXRegType to, uptr from )
156 MEMADDR_OP(0, VAROP2(0x0F, 0xFD), true, to, from, 0);
159 /* paddd r64 to r64 */
160 void PADDDRtoR( x86MMXRegType to, x86MMXRegType from )
164 ModRM( 3, to, from );
167 /* paddd m64 to r64 */
168 void PADDDMtoR( x86MMXRegType to, uptr from )
170 MEMADDR_OP(0, VAROP2(0x0F, 0xFE), true, to, from, 0);
179 void PADDSBRtoR( x86MMXRegType to, x86MMXRegType from )
183 ModRM( 3, to, from );
186 void PADDSWRtoR( x86MMXRegType to, x86MMXRegType from )
190 ModRM( 3, to, from );
193 // paddq m64 to r64 (sse2 only?)
194 void PADDQMtoR( x86MMXRegType to, uptr from )
196 MEMADDR_OP(0, VAROP2(0x0F, 0xD4), true, to, from, 0);
199 // paddq r64 to r64 (sse2 only?)
200 void PADDQRtoR( x86MMXRegType to, x86MMXRegType from )
204 ModRM( 3, to, from );
207 void PSUBSBRtoR( x86MMXRegType to, x86MMXRegType from )
211 ModRM( 3, to, from );
214 void PSUBSWRtoR( x86MMXRegType to, x86MMXRegType from )
218 ModRM( 3, to, from );
222 void PSUBBRtoR( x86MMXRegType to, x86MMXRegType from )
226 ModRM( 3, to, from );
229 void PSUBWRtoR( x86MMXRegType to, x86MMXRegType from )
233 ModRM( 3, to, from );
236 void PSUBDRtoR( x86MMXRegType to, x86MMXRegType from )
240 ModRM( 3, to, from );
243 void PSUBDMtoR( x86MMXRegType to, uptr from )
245 MEMADDR_OP(0, VAROP2(0x0F, 0xFA), true, to, from, 0);
248 void PSUBUSBRtoR( x86MMXRegType to, x86MMXRegType from )
252 ModRM( 3, to, from );
255 void PSUBUSWRtoR( x86MMXRegType to, x86MMXRegType from )
259 ModRM( 3, to, from );
262 // psubq m64 to r64 (sse2 only?)
263 void PSUBQMtoR( x86MMXRegType to, uptr from )
265 MEMADDR_OP(0, VAROP2(0x0F, 0xFB), true, to, from, 0);
268 // psubq r64 to r64 (sse2 only?)
269 void PSUBQRtoR( x86MMXRegType to, x86MMXRegType from )
273 ModRM( 3, to, from );
276 // pmuludq m64 to r64 (sse2 only?)
277 void PMULUDQMtoR( x86MMXRegType to, uptr from )
279 MEMADDR_OP(0, VAROP2(0x0F, 0xF4), true, to, from, 0);
282 // pmuludq r64 to r64 (sse2 only?)
283 void PMULUDQRtoR( x86MMXRegType to, x86MMXRegType from )
287 ModRM( 3, to, from );
290 void PCMPEQBRtoR( x86MMXRegType to, x86MMXRegType from )
294 ModRM( 3, to, from );
297 void PCMPEQWRtoR( x86MMXRegType to, x86MMXRegType from )
301 ModRM( 3, to, from );
304 void PCMPEQDRtoR( x86MMXRegType to, x86MMXRegType from )
308 ModRM( 3, to, from );
311 void PCMPEQDMtoR( x86MMXRegType to, uptr from )
313 MEMADDR_OP(0, VAROP2(0x0F, 0x76), true, to, from, 0);
316 void PCMPGTBRtoR( x86MMXRegType to, x86MMXRegType from )
320 ModRM( 3, to, from );
323 void PCMPGTWRtoR( x86MMXRegType to, x86MMXRegType from )
327 ModRM( 3, to, from );
330 void PCMPGTDRtoR( x86MMXRegType to, x86MMXRegType from )
334 ModRM( 3, to, from );
337 void PCMPGTDMtoR( x86MMXRegType to, uptr from )
339 MEMADDR_OP(0, VAROP2(0x0F, 0x66), true, to, from, 0);
342 void PSRLWItoR( x86MMXRegType to, u8 from )
350 void PSRLDItoR( x86MMXRegType to, u8 from )
358 void PSRLDRtoR( x86MMXRegType to, x86MMXRegType from )
362 ModRM( 3, to, from );
365 void PSLLWItoR( x86MMXRegType to, u8 from )
373 void PSLLDItoR( x86MMXRegType to, u8 from )
381 void PSLLDRtoR( x86MMXRegType to, x86MMXRegType from )
385 ModRM( 3, to, from );
388 void PSRAWItoR( x86MMXRegType to, u8 from )
396 void PSRADItoR( x86MMXRegType to, u8 from )
404 void PSRADRtoR( x86MMXRegType to, x86MMXRegType from )
408 ModRM( 3, to, from );
412 void PORMtoR( x86MMXRegType to, uptr from )
414 MEMADDR_OP(0, VAROP2(0x0F, 0xEB), true, to, from, 0);
417 /* pxor m64 to r64 */
418 void PXORMtoR( x86MMXRegType to, uptr from )
420 MEMADDR_OP(0, VAROP2(0x0F, 0xEF), true, to, from, 0);
423 /* pand m64 to r64 */
424 void PANDMtoR( x86MMXRegType to, uptr from )
426 MEMADDR_OP(0, VAROP2(0x0F, 0xDB), true, to, from, 0);
429 void PANDNMtoR( x86MMXRegType to, uptr from )
431 MEMADDR_OP(0, VAROP2(0x0F, 0xDF), true, to, from, 0);
434 void PUNPCKHDQRtoR( x86MMXRegType to, x86MMXRegType from )
438 ModRM( 3, to, from );
441 void PUNPCKHDQMtoR( x86MMXRegType to, uptr from )
443 MEMADDR_OP(0, VAROP2(0x0F, 0x6A), true, to, from, 0);
446 void PUNPCKLDQRtoR( x86MMXRegType to, x86MMXRegType from )
450 ModRM( 3, to, from );
453 void PUNPCKLDQMtoR( x86MMXRegType to, uptr from )
455 MEMADDR_OP(0, VAROP2(0x0F, 0x62), true, to, from, 0);
458 void MOVQ64ItoR( x86MMXRegType reg, u64 i )
462 ModRM(0, reg, DISP32);
468 void MOVQRtoR( x86MMXRegType to, x86MMXRegType from )
472 ModRM( 3, to, from );
475 void MOVQRmtoROffset( x86MMXRegType to, x86IntRegType from, u32 offset )
481 ModRM( 1, to, from );
485 ModRM( 2, to, from );
490 void MOVQRtoRmOffset( x86IntRegType to, x86MMXRegType from, u32 offset )
496 ModRM( 1, from , to );
500 ModRM( 2, from, to );
505 /* movd m32 to r64 */
506 void MOVDMtoMMX( x86MMXRegType to, uptr from )
508 MEMADDR_OP(0, VAROP2(0x0F, 0x6E), true, to, from, 0);
511 /* movd r64 to m32 */
512 void MOVDMMXtoM( uptr to, x86MMXRegType from )
514 MEMADDR_OP(0, VAROP2(0x0F, 0x7E), true, from, to, 0);
517 void MOVD32RtoMMX( x86MMXRegType to, x86IntRegType from )
521 ModRM( 3, to, from );
524 void MOVD32RmtoMMX( x86MMXRegType to, x86IntRegType from )
528 ModRM( 0, to, from );
531 void MOVD32RmOffsettoMMX( x86MMXRegType to, x86IntRegType from, u32 offset )
537 ModRM( 1, to, from );
541 ModRM( 2, to, from );
546 void MOVD32MMXtoR( x86IntRegType to, x86MMXRegType from )
550 ModRM( 3, from, to );
553 void MOVD32MMXtoRm( x86IntRegType to, x86MMXRegType from )
557 ModRM( 0, from, to );
566 void MOVD32MMXtoRmOffset( x86IntRegType to, x86MMXRegType from, u32 offset )
572 ModRM( 1, from, to );
576 ModRM( 2, from, to );
581 ///* movd r32 to r64 */
582 //void MOVD32MMXtoMMX( x86MMXRegType to, x86MMXRegType from )
584 // write16( 0x6E0F );
585 // ModRM( 3, to, from );
588 ///* movq r64 to r32 */
589 //void MOVD64MMXtoMMX( x86MMXRegType to, x86MMXRegType from )
591 // write16( 0x7E0F );
592 // ModRM( 3, from, to );
596 void PACKSSWBMMXtoMMX(x86MMXRegType to, x86MMXRegType from)
600 ModRM( 3, to, from );
603 void PACKSSDWMMXtoMMX(x86MMXRegType to, x86MMXRegType from)
607 ModRM( 3, to, from );
610 void PMOVMSKBMMXtoR(x86IntRegType to, x86MMXRegType from)
614 ModRM( 3, to, from );
617 void PINSRWRtoMMX( x86MMXRegType to, x86SSERegType from, u8 imm8 )
621 ModRM( 3, to, from );
625 void PSHUFWRtoR(x86MMXRegType to, x86MMXRegType from, u8 imm8)
629 ModRM( 3, to, from );
633 void PSHUFWMtoR(x86MMXRegType to, uptr from, u8 imm8)
635 MEMADDR_OP(0, VAROP2(0x0F, 0x70), true, to, from, 1 /* XXX was 0? */);
639 void MASKMOVQRtoR(x86MMXRegType to, x86MMXRegType from)
643 ModRM( 3, to, from );