Home | History | Annotate | Download | only in priv

Lines Matching refs:modrm

346 /* Extract the reg field from a modRM byte. */
352 /* Figure out whether the mod and rm parts of a modRM byte refer to a
1483 /* Generate IR to calculate an address indicated by a ModRM and
1797 Is passed the a ptr to the modRM byte, the actual operation, and the
1917 Is passed the a ptr to the modRM byte, the actual operation, and the
2052 Is passed the a ptr to the modRM byte, and the data size. Returns
2096 Is passed the a ptr to the modRM byte, and the data size. Returns
2281 Int delta, UChar modrm,
2294 switch (gregOfRM(modrm)) {
2304 if (epartIsReg(modrm)) {
2307 assign(dst0, getIReg(sz,eregOfRM(modrm)));
2310 if (gregOfRM(modrm) == 2 /* ADC */) {
2314 if (gregOfRM(modrm) == 3 /* SBB */) {
2325 if (gregOfRM(modrm) < 7)
2326 putIReg(sz, eregOfRM(modrm), mkexpr(dst1));
2329 DIP("%s%c $0x%x, %s\n", nameGrp1(gregOfRM(modrm)), nameISize(sz), d32,
2330 nameIReg(sz,eregOfRM(modrm)));
2337 if (gregOfRM(modrm) == 2 /* ADC */) {
2348 if (gregOfRM(modrm) == 3 /* SBB */) {
2360 if (gregOfRM(modrm) < 7) {
2376 DIP("%s%c $0x%x, %s\n", nameGrp1(gregOfRM(modrm)), nameISize(sz),
2388 Int delta, UChar modrm,
2392 /* delta on entry points at the modrm byte. */
2406 if (epartIsReg(modrm)) {
2407 assign(dst0, getIReg(sz, eregOfRM(modrm)));
2416 switch (gregOfRM(modrm)) { case 4: case 5: case 6: case 7: isShift = True; }
2419 switch (gregOfRM(modrm)) { case 0: case 1: isRotate = True; }
2422 switch (gregOfRM(modrm)) { case 2: case 3: isRotateC = True; }
2432 Bool left = toBool(gregOfRM(modrm) == 2);
2465 switch (gregOfRM(modrm)) {
2514 Bool left = toBool(gregOfRM(modrm) == 0);
2592 if (epartIsReg(modrm)) {
2593 putIReg(sz, eregOfRM(modrm), mkexpr(dst1));
2596 nameGrp2(gregOfRM(modrm)), nameISize(sz) );
2601 vex_printf(", %s\n", nameIReg(sz,eregOfRM(modrm)));
2607 nameGrp2(gregOfRM(modrm)), nameISize(sz) );
2623 Int delta, UChar modrm,
2628 And delta on entry points at the modrm byte. */
2650 switch (gregOfRM(modrm)) {
2664 if (epartIsReg(modrm)) {
2666 assign( t2, widenUto32(getIReg(sz, eregOfRM(modrm))) );
2668 DIP("%s%c $0x%x, %s\n", nameGrp8(gregOfRM(modrm)), nameISize(sz),
2669 src_val, nameIReg(sz,eregOfRM(modrm)));
2675 DIP("%s%c $0x%x, %s\n", nameGrp8(gregOfRM(modrm)), nameISize(sz),
2680 switch (gregOfRM(modrm)) {
2700 if (gregOfRM(modrm) != 4 /* BT */) {
2701 if (epartIsReg(modrm)) {
2702 putIReg(sz, eregOfRM(modrm), narrowTo(ty, mkexpr(t2m)));
2799 UChar modrm;
2809 modrm = getIByte(delta);
2811 if (locked && (gregOfRM(modrm) != 2 && gregOfRM(modrm) != 3)) {
2817 if (epartIsReg(modrm)) {
2818 switch (gregOfRM(modrm)) {
2823 getIReg(sz,eregOfRM(modrm)),
2827 nameIReg(sz, eregOfRM(modrm)));
2839 putIReg(sz, eregOfRM(modrm),
2841 getIReg(sz, eregOfRM(modrm))));
2842 DIP("not%c %s\n", nameISize(sz), nameIReg(sz, eregOfRM(modrm)));
2850 assign(src, getIReg(sz,eregOfRM(modrm)));
2853 putIReg(sz, eregOfRM(modrm), mkexpr(dst1));
2854 DIP("neg%c %s\n", nameISize(sz), nameIReg(sz, eregOfRM(modrm)));
2859 assign(src, getIReg(sz,eregOfRM(modrm)));
2860 codegen_mulL_A_D ( sz, False, src, nameIReg(sz,eregOfRM(modrm)) );
2865 assign(src, getIReg(sz,eregOfRM(modrm)));
2866 codegen_mulL_A_D ( sz, True, src, nameIReg(sz,eregOfRM(modrm)) );
2870 assign( t1, getIReg(sz, eregOfRM(modrm)) );
2872 DIP("div%c %s\n", nameISize(sz), nameIReg(sz, eregOfRM(modrm)));
2876 assign( t1, getIReg(sz, eregOfRM(modrm)) );
2878 DIP("idiv%c %s\n", nameISize(sz), nameIReg(sz, eregOfRM(modrm)));
2889 switch (gregOfRM(modrm)) {
2959 UChar modrm;
2967 modrm = getIByte(delta);
2969 if (locked && (gregOfRM(modrm) != 0 && gregOfRM(modrm) != 1)) {
2975 if (epartIsReg(modrm)) {
2976 assign(t1, getIReg(1, eregOfRM(modrm)));
2977 switch (gregOfRM(modrm)) {
2980 putIReg(1, eregOfRM(modrm), mkexpr(t2));
2985 putIReg(1, eregOfRM(modrm), mkexpr(t2));
2993 DIP("%sb %s\n", nameGrp4(gregOfRM(modrm)),
2994 nameIReg(1, eregOfRM(modrm)));
2998 switch (gregOfRM(modrm)) {
3024 DIP("%sb %s\n", nameGrp4(gregOfRM(modrm)), dis_buf);
3036 UChar modrm;
3045 modrm = getIByte(delta);
3047 if (locked && (gregOfRM(modrm) != 0 && gregOfRM(modrm) != 1)) {
3053 if (epartIsReg(modrm)) {
3054 assign(t1, getIReg(sz,eregOfRM(modrm)));
3055 switch (gregOfRM(modrm)) {
3062 putIReg(sz,eregOfRM(modrm),mkexpr(t2));
3070 putIReg(sz,eregOfRM(modrm),mkexpr(t2));
3098 DIP("%s%c %s\n", nameGrp5(gregOfRM(modrm)),
3099 nameISize(sz), nameIReg(sz, eregOfRM(modrm)));
3103 switch (gregOfRM(modrm)) {
3154 DIP("%s%c %s\n", nameGrp5(gregOfRM(modrm)),
3766 /* On entry, delta points at the second byte of the insn (the modrm
3769 UChar modrm = getIByte(delta+0);
3774 if (modrm < 0xC0) {
3776 /* bits 5,4,3 are an opcode extension, and the modRM also
3781 switch (gregOfRM(modrm)) {
3839 vex_printf("unhandled opc_aux = 0x%2x\n", gregOfRM(modrm));
3845 switch (modrm) {
3848 fp_do_op_ST_ST ( "add", Iop_AddF64, modrm - 0xC0, 0, False );
3852 fp_do_op_ST_ST ( "mul", Iop_MulF64, modrm - 0xC8, 0, False );
3857 r_dst = (UInt)modrm - 0xD0;
3871 r_dst = (UInt)modrm - 0xD8;
3885 fp_do_op_ST_ST ( "sub", Iop_SubF64, modrm - 0xE0, 0, False );
3889 fp_do_oprev_ST_ST ( "subr", Iop_SubF64, modrm - 0xE8, 0, False );
3893 fp_do_op_ST_ST ( "div", Iop_DivF64, modrm - 0xF0, 0, False );
3897 fp_do_oprev_ST_ST ( "divr", Iop_DivF64, modrm - 0xF8, 0, False );
3909 if (modrm < 0xC0) {
3911 /* bits 5,4,3 are an opcode extension, and the modRM also
3916 switch (gregOfRM(modrm)) {
4096 vex_printf("unhandled opc_aux = 0x%2x\n", gregOfRM(modrm));
4103 switch (modrm) {
4106 r_src = (UInt)modrm - 0xC0;
4115 r_src = (UInt)modrm - 0xC8;
4422 if (modrm < 0xC0) {
4424 /* bits 5,4,3 are an opcode extension, and the modRM also
4429 switch (gregOfRM(modrm)) {
4511 vex_printf("unhandled opc_aux = 0x%2x\n", gregOfRM(modrm));
4519 switch (modrm) {
4522 r_src = (UInt)modrm - 0xC0;
4532 r_src = (UInt)modrm - 0xC8;
4542 r_src = (UInt)modrm - 0xD0;
4552 r_src = (UInt)modrm - 0xD8;
4585 if (modrm < 0xC0) {
4587 /* bits 5,4,3 are an opcode extension, and the modRM also
4592 switch (gregOfRM(modrm)) {
4676 vex_printf("unhandled opc_aux = 0x%2x\n", gregOfRM(modrm));
4684 switch (modrm) {
4687 r_src = (UInt)modrm - 0xC0;
4697 r_src = (UInt)modrm - 0xC8;
4707 r_src = (UInt)modrm - 0xD0;
4717 r_src = (UInt)modrm - 0xD8;
4772 fp_do_ucomi_ST0_STi( (UInt)modrm - 0xE8, False );
4776 fp_do_ucomi_ST0_STi( (UInt)modrm - 0xF0, False );
4788 if (modrm < 0xC0) {
4790 /* bits 5,4,3 are an opcode extension, and the modRM also
4795 switch (gregOfRM(modrm)) {
4851 vex_printf("unhandled opc_aux = 0x%2x\n", gregOfRM(modrm));
4859 switch (modrm) {
4862 fp_do_op_ST_ST ( "add", Iop_AddF64, 0, modrm - 0xC0, False );
4866 fp_do_op_ST_ST ( "mul", Iop_MulF64, 0, modrm - 0xC8, False );
4870 fp_do_oprev_ST_ST ( "subr", Iop_SubF64, 0, modrm - 0xE0, False );
4874 fp_do_op_ST_ST ( "sub", Iop_SubF64, 0, modrm - 0xE8, False );
4878 fp_do_oprev_ST_ST ( "divr", Iop_DivF64, 0, modrm - 0xF0, False );
4882 fp_do_op_ST_ST ( "div", Iop_DivF64, 0, modrm - 0xF8, False );
4896 if (modrm < 0xC0) {
4898 /* bits 5,4,3 are an opcode extension, and the modRM also
4903 switch (gregOfRM(modrm)) {
5044 vex_printf("unhandled opc_aux = 0x%2x\n", gregOfRM(modrm));
5050 switch (modrm) {
5053 r_dst = (UInt)modrm - 0xC0;
5059 r_dst = (UInt)modrm - 0xD0;
5068 r_dst = (UInt)modrm - 0xD8;
5078 r_dst = (UInt)modrm - 0xE0;
5091 r_dst = (UInt)modrm - 0xE8;
5114 if (modrm < 0xC0) {
5116 /* bits 5,4,3 are an opcode extension, and the modRM also
5122 switch (gregOfRM(modrm)) {
5208 vex_printf("unhandled opc_aux = 0x%2x\n", gregOfRM(modrm));
5216 switch (modrm) {
5219 fp_do_op_ST_ST ( "add", Iop_AddF64, 0, modrm - 0xC0, True );
5223 fp_do_op_ST_ST ( "mul", Iop_MulF64, 0, modrm - 0xC8, True );
5241 fp_do_oprev_ST_ST ( "subr", Iop_SubF64, 0, modrm - 0xE0, True );
5245 fp_do_op_ST_ST ( "sub", Iop_SubF64, 0, modrm - 0xE8, True );
5249 fp_do_oprev_ST_ST ( "divr", Iop_DivF64, 0, modrm - 0xF0, True );
5253 fp_do_op_ST_ST ( "div", Iop_DivF64, 0, modrm - 0xF8, True );
5267 if (modrm < 0xC0) {
5269 /* bits 5,4,3 are an opcode extension, and the modRM also
5274 switch (gregOfRM(modrm)) {
5320 vex_printf("unhandled opc_aux = 0x%2x\n", gregOfRM(modrm));
5328 switch (modrm) {
5361 fp_do_ucomi_ST0_STi( (UInt)modrm - 0xE8, True );
5366 fp_do_ucomi_ST0_STi( (UInt)modrm - 0xF0, True );
5456 UChar modrm = getIByte(delta);
5457 Bool isReg = epartIsReg(modrm);
5546 argG = getMMXReg(gregOfRM(modrm));
5552 argE = getMMXReg(eregOfRM(modrm));
5584 putMMXReg( gregOfRM(modrm), mkexpr(res) );
5588 ( isReg ? nameMMXReg(eregOfRM(modrm)) : dis_buf ),
5589 nameMMXReg(gregOfRM(modrm)) );
5734 UChar modrm;
5748 modrm = getIByte(delta);
5749 if (epartIsReg(modrm)) {
5752 gregOfRM(modrm),
5755 getIReg(4, eregOfRM(modrm)) ) );
5757 nameIReg(4,eregOfRM(modrm)), nameMMXReg(gregOfRM(modrm)));
5762 gregOfRM(modrm),
5766 DIP("movd %s, %s\n", dis_buf, nameMMXReg(gregOfRM(modrm)));
5773 modrm = getIByte(delta);
5774 if (epartIsReg(modrm)) {
5776 putIReg( 4, eregOfRM(modrm),
5777 unop(Iop_64to32, getMMXReg(gregOfRM(modrm)) ) );
5779 nameMMXReg(gregOfRM(modrm)), nameIReg(4,eregOfRM(modrm)));
5784 unop(Iop_64to32, getMMXReg(gregOfRM(modrm)) ) );
5785 DIP("movd %s, %s\n", nameMMXReg(gregOfRM(modrm)), dis_buf);
5793 modrm = getIByte(delta);
5794 if (epartIsReg(modrm)) {
5796 putMMXReg( gregOfRM(modrm), getMMXReg(eregOfRM(modrm)) );
5798 nameMMXReg(eregOfRM(modrm)), nameMMXReg(gregOfRM(modrm)));
5802 putMMXReg( gregOfRM(modrm), loadLE(Ity_I64, mkexpr(addr)) );
5804 dis_buf, nameMMXReg(gregOfRM(modrm)));
5812 modrm = getIByte(delta);
5813 if (epartIsReg(modrm)) {
5815 putMMXReg( eregOfRM(modrm), getMMXReg(gregOfRM(modrm)) );
5817 nameMMXReg(gregOfRM(modrm)), nameMMXReg(eregOfRM(modrm)));
5821 storeLE( mkexpr(addr), getMMXReg(gregOfRM(modrm)) );
5823 nameMMXReg(gregOfRM(modrm)), dis_buf);
6029 modrm = getIByte(delta);
6030 if (sz != 4 || (!epartIsReg(modrm)))
6035 assign( regM, getMMXReg( eregOfRM(modrm) ));
6036 assign( regD, getMMXReg( gregOfRM(modrm) ));
6048 DIP("maskmovq %s,%s\n", nameMMXReg( eregOfRM(modrm) ),
6049 nameMMXReg( gregOfRM(modrm) ) );
6074 Int delta, UChar modrm,
6082 for printing it. And eip on entry points at the modrm byte. */
6115 assign( gsrc, getIReg(sz, gregOfRM(modrm)) );
6117 if (epartIsReg(modrm)) {
6119 assign( esrc, getIReg(sz, eregOfRM(modrm)) );
6123 nameIReg(sz, gregOfRM(modrm)), nameIReg(sz, eregOfRM(modrm)));
6131 nameIReg(sz, gregOfRM(modrm)), dis_buf);
6179 if (epartIsReg(modrm)) {
6180 putIReg(sz, eregOfRM(modrm), mkexpr(tmpRes));
6212 UChar modrm;
6229 modrm = getIByte(delta);
6231 assign( t_bitno0, widenSto32(getIReg(sz, gregOfRM(modrm))) );
6233 if (epartIsReg(modrm)) {
6247 storeLE( mkexpr(t_esp), getIReg(sz, eregOfRM(modrm)) );
6310 if (locked && !epartIsReg(modrm)) {
6336 if (epartIsReg(modrm)) {
6338 putIReg(sz, eregOfRM(modrm), loadLE(szToITy(sz), mkexpr(t_esp)) );
6343 modrm)),
6344 ( epartIsReg(modrm) ? nameIReg(sz, eregOfRM(modrm)) : dis_buf ) );
6356 UChar modrm;
6369 modrm = getIByte(delta);
6371 isReg = epartIsReg(modrm);
6374 assign( src, getIReg(sz, eregOfRM(modrm)) );
6384 ( isReg ? nameIReg(sz, eregOfRM(modrm)) : dis_buf ),
6385 nameIReg(sz, gregOfRM(modrm)));
6438 widenUto32( getIReg( sz, gregOfRM(modrm) ) ),
6453 putIReg( sz, gregOfRM(modrm), mkexpr(dst) );
7936 UChar opc, modrm, abyte, pre;
8155 modrm = getIByte(delta+2);
8157 vassert(!epartIsReg(modrm));
8227 modrm = getIByte(delta+2);
8229 vassert(!epartIsReg(modrm));
8351 modrm = getIByte(delta+2);
8352 if (epartIsReg(modrm)) {
8353 assign( argR, getXMMRegLane32F( eregOfRM(modrm), 0/*lowest lane*/ ) );
8355 DIP("[u]comiss %s,%s\n", nameXMMReg(eregOfRM(modrm)),
8356 nameXMMReg(gregOfRM(modrm)) );
8362 nameXMMReg(gregOfRM(modrm)) );
8364 assign( argL, getXMMRegLane32F( gregOfRM(modrm), 0/*lowest lane*/ ) );
8389 modrm = getIByte(delta+2);
8391 if (epartIsReg(modrm)) {
8392 assign( arg64, getMMXReg(eregOfRM(modrm)) );
8394 DIP("cvtpi2ps %s,%s\n", nameMMXReg(eregOfRM(modrm)),
8395 nameXMMReg(gregOfRM(modrm)));
8401 nameXMMReg(gregOfRM(modrm)) );
8407 gregOfRM(modrm), 0,
8414 gregOfRM(modrm), 1,
8430 modrm = getIByte(delta+3);
8431 if (epartIsReg(modrm)) {
8432 assign( arg32, getIReg(4, eregOfRM(modrm)) );
8434 DIP("cvtsi2ss %s,%s\n", nameIReg(4, eregOfRM(modrm)),
8435 nameXMMReg(gregOfRM(modrm)));
8441 nameXMMReg(gregOfRM(modrm)) );
8447 gregOfRM(modrm), 0,
8467 modrm = getIByte(delta+2);
8469 if (epartIsReg(modrm)) {
8471 assign(f32lo, getXMMRegLane32F(eregOfRM(modrm), 0));
8472 assign(f32hi, getXMMRegLane32F(eregOfRM(modrm), 1));
8474 nameXMMReg(eregOfRM(modrm)),
8475 nameMMXReg(gregOfRM(modrm)));
8485 nameMMXReg(gregOfRM(modrm)));
8506 putMMXReg(gregOfRM(modrm), mkexpr(dst64));
8521 modrm = getIByte(delta+3);
8522 if (epartIsReg(modrm)) {
8524 assign(f32lo, getXMMRegLane32F(eregOfRM(modrm), 0));
8526 nameXMMReg(eregOfRM(modrm)),
8527 nameIReg(4, gregOfRM(modrm)));
8534 nameIReg(4, gregOfRM(modrm)));
8543 putIReg(4, gregOfRM(modrm),
8572 modrm = getIByte(delta+2);
8573 vassert(!epartIsReg(modrm));
8652 modrm = getIByte(delta+2);
8653 if (epartIsReg(modrm)) {
8654 putXMMReg( gregOfRM(modrm),
8655 getXMMReg( eregOfRM(modrm) ));
8656 DIP("mov[ua]ps %s,%s\n", nameXMMReg(eregOfRM(modrm)),
8657 nameXMMReg(gregOfRM(modrm)));
8663 putXMMReg( gregOfRM(modrm),
8666 nameXMMReg(gregOfRM(modrm)));
8676 modrm = getIByte(delta+2);
8677 if (epartIsReg(modrm)) {
8683 storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) );
8684 DIP("mov[ua]ps %s,%s\n", nameXMMReg(gregOfRM(modrm)),
8694 modrm = getIByte(delta+2);
8695 if (epartIsReg(modrm)) {
8697 putXMMRegLane64( gregOfRM(modrm), 1/*upper lane*/,
8698 getXMMRegLane64( eregOfRM(modrm), 0 ) );
8699 DIP("movhps %s,%s\n", nameXMMReg(eregOfRM(modrm)),
8700 nameXMMReg(gregOfRM(modrm)));
8704 putXMMRegLane64( gregOfRM(modrm), 1/*upper lane*/,
8707 nameXMMReg( gregOfRM(modrm) ));
8731 modrm = getIByte(delta+2);
8732 if (epartIsReg(modrm)) {
8734 putXMMRegLane64( gregOfRM(modrm),
8736 getXMMRegLane64( eregOfRM(modrm), 1 ));
8737 DIP("movhlps %s, %s\n", nameXMMReg(eregOfRM(modrm)),
8738 nameXMMReg(gregOfRM(modrm)));
8742 putXMMRegLane64( gregOfRM(modrm), 0/*lower lane*/,
8745 dis_buf, nameXMMReg( gregOfRM(modrm) ));
8769 modrm = getIByte(delta+2);
8770 if (sz == 4 && epartIsReg(modrm)) {
8777 src = eregOfRM(modrm);
8790 putIReg(4, gregOfRM(modrm),
8797 nameIReg(4, gregOfRM(modrm)));
8806 modrm = getIByte(delta+2);
8807 if (!epartIsReg(modrm)) {
8810 storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) );
8813 nameXMMReg(gregOfRM(modrm)));
8827 modrm = getIByte(delta+2);
8828 if (sz == 4 && !epartIsReg(modrm)) {
8831 storeLE( mkexpr(addr), getMMXReg(gregOfRM(modrm)) );
8833 nameMMXReg(gregOfRM(modrm)));
8844 modrm = getIByte(delta+3);
8845 if (epartIsReg(modrm)) {
8846 putXMMRegLane32( gregOfRM(modrm), 0,
8847 getXMMRegLane32( eregOfRM(modrm), 0 ));
8848 DIP("movss %s,%s\n", nameXMMReg(eregOfRM(modrm)),
8849 nameXMMReg(gregOfRM(modrm)));
8854 putXMMRegLane64( gregOfRM(modrm), 1, mkU64(0) );
8856 putXMMRegLane32( gregOfRM(modrm), 1, mkU32(0) );
8858 putXMMRegLane32( gregOfRM(modrm), 0,
8861 nameXMMReg(gregOfRM(modrm)));
8871 modrm = getIByte(delta+3);
8872 if (epartIsReg(modrm)) {
8877 getXMMRegLane32(gregOfRM(modrm), 0) );
8878 DIP("movss %s,%s\n", nameXMMReg(gregOfRM(modrm)),
8926 modrm = insn[2];
8927 if (sz == 4 && epartIsReg(modrm)) {
8931 assign(sV, getMMXReg(eregOfRM(modrm)));
8940 putIReg(4, gregOfRM(modrm), unop(Iop_16Uto32, mkexpr(t5)));
8942 (Int)insn[3], nameMMXReg(eregOfRM(modrm)),
8943 nameIReg(4,gregOfRM(modrm)));
8961 modrm = insn[2];
8964 assign(t5, getMMXReg(gregOfRM(modrm)));
8967 if (epartIsReg(modrm)) {
8968 assign(t4, getIReg(2, eregOfRM(modrm)));
8972 nameIReg(2,eregOfRM(modrm)),
8973 nameMMXReg(gregOfRM(modrm)));
8981 nameMMXReg(gregOfRM(modrm)));
8991 putMMXReg(gregOfRM(modrm), mkexpr(t6));
9036 modrm = insn[2];
9037 if (epartIsReg(modrm)) {
9041 assign(t0, getMMXReg(eregOfRM(modrm)));
9047 putIReg(4, gregOfRM(modrm), mkexpr(t1));
9048 DIP("pmovmskb %s,%s\n", nameMMXReg(eregOfRM(modrm)),
9049 nameIReg(4,gregOfRM(modrm)));
9074 modrm = getIByte(delta+2);
9075 vassert(!epartIsReg(modrm));
9080 switch (gregOfRM(modrm)) {
9099 modrm = getIByte(delta+2);
9100 vassert(!epartIsReg(modrm));
9105 switch (gregOfRM(modrm)) {
9133 modrm = insn[2];
9134 if (epartIsReg(modrm)) {
9135 assign( sV, getMMXReg(eregOfRM(modrm)) );
9139 nameMMXReg(eregOfRM(modrm)),
9140 nameMMXReg(gregOfRM(modrm)));
9148 nameMMXReg(gregOfRM(modrm)));
9158 putMMXReg(gregOfRM(modrm), mkexpr(dV));
9215 modrm = insn[2];
9216 assign( dV, getXMMReg(gregOfRM(modrm)) );
9218 if (epartIsReg(modrm)) {
9219 assign( sV, getXMMReg(eregOfRM(modrm)) );
9223 nameXMMReg(eregOfRM(modrm)),
9224 nameXMMReg(gregOfRM(modrm)));
9232 nameXMMReg(gregOfRM(modrm)));
9242 gregOfRM(modrm),
9271 modrm = getIByte(delta+2);
9273 vassert(!epartIsReg(modrm));
9316 modrm = insn[2];
9317 assign( dV, getXMMReg(gregOfRM(modrm)) );
9319 if (epartIsReg(modrm)) {
9320 assign( sV, getXMMReg(eregOfRM(modrm)) );
9323 nameXMMReg(eregOfRM(modrm)),
9324 nameXMMReg(gregOfRM(modrm)));
9331 nameXMMReg(gregOfRM(modrm)));
9338 putXMMReg( gregOfRM(modrm), mk128from32s( s3, d3, s2, d2 ) );
9340 putXMMReg( gregOfRM(modrm), mk128from32s( s1, d1, s0, d0 ) );
9410 modrm = getIByte(delta+2);
9411 if (epartIsReg(modrm)) {
9412 assign( argR, getXMMRegLane64F( eregOfRM(modrm), 0/*lowest lane*/ ) );
9414 DIP("[u]comisd %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9415 nameXMMReg(gregOfRM(modrm)) );
9421 nameXMMReg(gregOfRM(modrm)) );
9423 assign( argL, getXMMRegLane64F( gregOfRM(modrm), 0/*lowest lane*/ ) );
9445 modrm = getIByte(delta+3);
9446 if (epartIsReg(modrm)) {
9447 assign( arg64, getXMMRegLane64(eregOfRM(modrm), 0) );
9449 DIP("cvtdq2pd %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9450 nameXMMReg(gregOfRM(modrm)));
9456 nameXMMReg(gregOfRM(modrm)) );
9460 gregOfRM(modrm), 0,
9465 gregOfRM(modrm), 1,
9478 modrm = getIByte(delta+2);
9479 if (epartIsReg(modrm)) {
9480 assign( argV, getXMMReg(eregOfRM(modrm)) );
9482 DIP("cvtdq2ps %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9483 nameXMMReg(gregOfRM(modrm)));
9489 nameXMMReg(gregOfRM(modrm)) );
9499 putXMMRegLane32F( gregOfRM(modrm), 3, CVT(t3) );
9500 putXMMRegLane32F( gregOfRM(modrm), 2, CVT(t2) );
9501 putXMMRegLane32F( gregOfRM(modrm), 1, CVT(t1) );
9502 putXMMRegLane32F( gregOfRM(modrm), 0, CVT(t0) );
9516 modrm = getIByte(delta+3);
9517 if (epartIsReg(modrm)) {
9518 assign( argV, getXMMReg(eregOfRM(modrm)) );
9520 DIP("cvtpd2dq %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9521 nameXMMReg(gregOfRM(modrm)));
9527 nameXMMReg(gregOfRM(modrm)) );
9542 putXMMRegLane32( gregOfRM(modrm), 3, mkU32(0) );
9543 putXMMRegLane32( gregOfRM(modrm), 2, mkU32(0) );
9544 putXMMRegLane32( gregOfRM(modrm), 1, CVT(t1) );
9545 putXMMRegLane32( gregOfRM(modrm), 0, CVT(t0) );
9564 modrm = getIByte(delta+2);
9566 if (epartIsReg(modrm)) {
9568 assign(f64lo, getXMMRegLane64F(eregOfRM(modrm), 0));
9569 assign(f64hi, getXMMRegLane64F(eregOfRM(modrm), 1));
9571 nameXMMReg(eregOfRM(modrm)),
9572 nameMMXReg(gregOfRM(modrm)));
9582 nameMMXReg(gregOfRM(modrm)));
9599 putMMXReg(gregOfRM(modrm), mkexpr(dst64));
9612 modrm = getIByte(delta+2);
9613 if (epartIsReg(modrm)) {
9614 assign( argV, getXMMReg(eregOfRM(modrm)) );
9616 DIP("cvtpd2ps %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9617 nameXMMReg(gregOfRM(modrm)));
9623 nameXMMReg(gregOfRM(modrm)) );
9638 putXMMRegLane32( gregOfRM(modrm), 3, mkU32(0) );
9639 putXMMRegLane32( gregOfRM(modrm), 2, mkU32(0) );
9640 putXMMRegLane32F( gregOfRM(modrm), 1, CVT(t1) );
9641 putXMMRegLane32F( gregOfRM(modrm), 0, CVT(t0) );
9653 modrm = getIByte(delta+2);
9654 if (epartIsReg(modrm)) {
9662 assign( arg64, getMMXReg(eregOfRM(modrm)) );
9664 DIP("cvtpi2pd %s,%s\n", nameMMXReg(eregOfRM(modrm)),
9665 nameXMMReg(gregOfRM(modrm)));
9671 nameXMMReg(gregOfRM(modrm)) );
9675 gregOfRM(modrm), 0,
9680 gregOfRM(modrm), 1,
9693 modrm = getIByte(delta+2);
9694 if (epartIsReg(modrm)) {
9695 assign( argV, getXMMReg(eregOfRM(modrm)) );
9697 DIP("cvtps2dq %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9698 nameXMMReg(gregOfRM(modrm)));
9704 nameXMMReg(gregOfRM(modrm)) );
9718 putXMMRegLane32( gregOfRM(modrm), 3, CVT(t3) );
9719 putXMMRegLane32( gregOfRM(modrm), 2, CVT(t2) );
9720 putXMMRegLane32( gregOfRM(modrm), 1, CVT(t1) );
9721 putXMMRegLane32( gregOfRM(modrm), 0, CVT(t0) );
9734 modrm = getIByte(delta+2);
9735 if (epartIsReg(modrm)) {
9736 assign( f32lo, getXMMRegLane32F(eregOfRM(modrm), 0) );
9737 assign( f32hi, getXMMRegLane32F(eregOfRM(modrm), 1) );
9739 DIP("cvtps2pd %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9740 nameXMMReg(gregOfRM(modrm)));
9748 nameXMMReg(gregOfRM(modrm)) );
9751 putXMMRegLane64F( gregOfRM(modrm), 1,
9753 putXMMRegLane64F( gregOfRM(modrm), 0,
9770 modrm = getIByte(delta+3);
9771 if (epartIsReg(modrm)) {
9773 assign(f64lo, getXMMRegLane64F(eregOfRM(modrm), 0));
9775 nameXMMReg(eregOfRM(modrm)),
9776 nameIReg(4, gregOfRM(modrm)));
9783 nameIReg(4, gregOfRM(modrm)));
9792 putIReg(4, gregOfRM(modrm),
9805 modrm = getIByte(delta+3);
9806 if (epartIsReg(modrm)) {
9808 assign(f64lo, getXMMRegLane64F(eregOfRM(modrm), 0));
9809 DIP("cvtsd2ss %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9810 nameXMMReg(gregOfRM(modrm)));
9816 nameXMMReg(gregOfRM(modrm)));
9821 gregOfRM(modrm), 0,
9834 modrm = getIByte(delta+3);
9835 if (epartIsReg(modrm)) {
9836 assign( arg32, getIReg(4, eregOfRM(modrm)) );
9838 DIP("cvtsi2sd %s,%s\n", nameIReg(4, eregOfRM(modrm)),
9839 nameXMMReg(gregOfRM(modrm)));
9845 nameXMMReg(gregOfRM(modrm)) );
9849 gregOfRM(modrm), 0,
9861 modrm = getIByte(delta+3);
9862 if (epartIsReg(modrm)) {
9864 assign(f32lo, getXMMRegLane32F(eregOfRM(modrm), 0));
9865 DIP("cvtss2sd %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9866 nameXMMReg(gregOfRM(modrm)));
9872 nameXMMReg(gregOfRM(modrm)));
9875 putXMMRegLane64F( gregOfRM(modrm), 0,
9887 modrm = getIByte(delta+2);
9888 if (epartIsReg(modrm)) {
9889 assign( argV, getXMMReg(eregOfRM(modrm)) );
9891 DIP("cvttpd2dq %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9892 nameXMMReg(gregOfRM(modrm)));
9898 nameXMMReg(gregOfRM(modrm)) );
9914 putXMMRegLane32( gregOfRM(modrm), 3, mkU32(0) );
9915 putXMMRegLane32( gregOfRM(modrm), 2, mkU32(0) );
9916 putXMMRegLane32( gregOfRM(modrm), 1, CVT(t1) );
9917 putXMMRegLane32( gregOfRM(modrm), 0, CVT(t0) );
9931 modrm = getIByte(delta+3);
9932 if (epartIsReg(modrm)) {
9933 assign( argV, getXMMReg(eregOfRM(modrm)) );
9935 DIP("cvttps2dq %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9936 nameXMMReg(gregOfRM(modrm)));
9942 nameXMMReg(gregOfRM(modrm)) );
9956 putXMMRegLane32( gregOfRM(modrm), 3, CVT(t3) );
9957 putXMMRegLane32( gregOfRM(modrm), 2, CVT(t2) );
9958 putXMMRegLane32( gregOfRM(modrm), 1, CVT(t1) );
9959 putXMMRegLane32( gregOfRM(modrm), 0, CVT(t0) );
10026 modrm = getIByte(delta+2);
10027 if (epartIsReg(modrm)) {
10028 putXMMReg( gregOfRM(modrm),
10029 getXMMReg( eregOfRM(modrm) ));
10030 DIP("mov%s %s,%s\n", wot, nameXMMReg(eregOfRM(modrm)),
10031 nameXMMReg(gregOfRM(modrm)));
10037 putXMMReg( gregOfRM(modrm),
10040 nameXMMReg(gregOfRM(modrm)));
10051 modrm = getIByte(delta+2);
10052 if (epartIsReg(modrm)) {
10058 storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) );
10059 DIP("mov%s %s,%s\n", wot, nameXMMReg(gregOfRM(modrm)),
10068 modrm = getIByte(delta+2);
10069 if (epartIsReg(modrm)) {
10072 gregOfRM(modrm),
10073 unop( Iop_32UtoV128, getIReg(4, eregOfRM(modrm)) )
10076 nameIReg(4,eregOfRM(modrm)), nameXMMReg(gregOfRM(modrm)));
10081 gregOfRM(modrm),
10084 DIP("movd %s, %s\n", dis_buf, nameXMMReg(gregOfRM(modrm)));
10091 modrm = getIByte(delta+2);
10092 if (epartIsReg(modrm)) {
10094 putIReg( 4, eregOfRM(modrm),
10095 getXMMRegLane32(gregOfRM(modrm), 0) );
10097 nameXMMReg(gregOfRM(modrm)), nameIReg(4,eregOfRM(modrm)));
10102 getXMMRegLane32(gregOfRM(modrm), 0) );
10103 DIP("movd %s, %s\n", nameXMMReg(gregOfRM(modrm)), dis_buf);
10110 modrm = getIByte(delta+2);
10111 if (epartIsReg(modrm)) {
10113 putXMMReg( eregOfRM(modrm),
10114 getXMMReg(gregOfRM(modrm)) );
10115 DIP("movdqa %s, %s\n", nameXMMReg(gregOfRM(modrm)),
10116 nameXMMReg(eregOfRM(modrm)));
10121 storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) );
10122 DIP("movdqa %s, %s\n", nameXMMReg(gregOfRM(modrm)), dis_buf);
10132 modrm = getIByte(delta+3);
10133 if (epartIsReg(modrm)) {
10134 putXMMReg( gregOfRM(modrm),
10135 getXMMReg( eregOfRM(modrm) ));
10136 DIP("movdqu %s,%s\n", nameXMMReg(eregOfRM(modrm)),
10137 nameXMMReg(gregOfRM(modrm)));
10141 putXMMReg( gregOfRM(modrm),
10144 nameXMMReg(gregOfRM(modrm)));
10155 modrm = getIByte(delta+3);
10156 if (epartIsReg(modrm)) {
10158 putXMMReg( eregOfRM(modrm),
10159 getXMMReg(gregOfRM(modrm)) );
10160 DIP("movdqu %s, %s\n", nameXMMReg(gregOfRM(modrm)),
10161 nameXMMReg(eregOfRM(modrm)));
10165 storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) );
10166 DIP("movdqu %s, %s\n", nameXMMReg(gregOfRM(modrm)), dis_buf);
10174 modrm = getIByte(delta+3);
10175 if (epartIsReg(modrm)) {
10177 putMMXReg( gregOfRM(modrm),
10178 getXMMRegLane64( eregOfRM(modrm), 0 ));
10179 modrm)),
10180 nameMMXReg(gregOfRM(modrm)));
10192 modrm = getIByte(delta+2);
10193 if (epartIsReg(modrm)) {
10198 putXMMRegLane64( gregOfRM(modrm), 1/*upper lane*/,
10201 nameXMMReg( gregOfRM(modrm) ));
10226 modrm = getIByte(delta+2);
10227 if (epartIsReg(modrm)) {
10232 putXMMRegLane64( gregOfRM(modrm), 0/*lower lane*/,
10235 dis_buf, nameXMMReg( gregOfRM(modrm) ));
10260 modrm = getIByte(delta+2);
10261 if (sz == 2 && epartIsReg(modrm)) {
10266 src = eregOfRM(modrm);
10273 putIReg(4, gregOfRM(modrm),
10277 nameIReg(4, gregOfRM(modrm)));
10285 modrm = getIByte(delta+2);
10286 if (sz == 2 && epartIsReg(modrm)) {
10294 assign( regD, getXMMReg( gregOfRM(modrm) ));
10303 getXMMRegLane64( eregOfRM(modrm), 1 ),
10306 getXMMRegLane64( eregOfRM(modrm), 0 ),
10320 DIP("maskmovdqu %s,%s\n", nameXMMReg( eregOfRM(modrm) ),
10321 nameXMMReg( gregOfRM(modrm) ) );
10329 modrm = getIByte(delta+2);
10330 if (sz == 2 && !epartIsReg(modrm)) {
10333 storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) );
10335 nameXMMReg(gregOfRM(modrm)));
10345 modrm = getIByte(delta+2);
10346 if (!epartIsReg(modrm)) {
10348 storeLE( mkexpr(addr), getIReg(4, gregOfRM(modrm)) );
10350 nameIReg(4, gregOfRM(modrm)));
10360 modrm = getIByte(delta+2);
10361 if (epartIsReg(modrm)) {
10367 getXMMRegLane64( gregOfRM(modrm), 0 ));
10368 DIP("movq %s,%s\n", nameXMMReg(gregOfRM(modrm)), dis_buf );
10378 modrm = getIByte(delta+3);
10379 if (epartIsReg(modrm)) {
10381 putXMMReg( gregOfRM(modrm),
10382 unop(Iop_64UtoV128, getMMXReg( eregOfRM(modrm) )) );
10383 DIP("movq2dq %s,%s\n", nameMMXReg(eregOfRM(modrm)),
10384 nameXMMReg(gregOfRM(modrm)));
10400 modrm = getIByte(delta+3);
10401 if (epartIsReg(modrm)) {
10402 putXMMRegLane64( gregOfRM(modrm), 0,
10403 getXMMRegLane64( eregOfRM(modrm), 0 ));
10406 putXMMRegLane64( gregOfRM(modrm), 1, mkU64(0) );
10408 DIP("movsd %s,%s\n", nameXMMReg(eregOfRM(modrm)),
10409 nameXMMReg(gregOfRM(modrm)));
10414 putXMMRegLane64( gregOfRM(modrm), 1, mkU64(0) );
10416 putXMMRegLane64( gregOfRM(modrm), 0,
10419 nameXMMReg(gregOfRM(modrm)));
10429 modrm = getIByte(delta+3);
10430 if (epartIsReg(modrm)) {
10431 putXMMRegLane64( eregOfRM(modrm), 0,
10432 getXMMRegLane64( gregOfRM(modrm), 0 ));
10433 DIP("movsd %s,%s\n", nameXMMReg(gregOfRM(modrm)),
10434 nameXMMReg(eregOfRM(modrm)));
10439 getXMMRegLane64(gregOfRM(modrm), 0) );
10440 DIP("movsd %s,%s\n", nameXMMReg(gregOfRM(modrm)),
10476 modrm = insn[2];
10477 assign( dV, getXMMReg(gregOfRM(modrm)) );
10479 if (epartIsReg(modrm)) {
10480 assign( sV, getXMMReg(eregOfRM(modrm)) );
10484 nameXMMReg(eregOfRM(modrm)),
10485 nameXMMReg(gregOfRM(modrm)));
10493 nameXMMReg(gregOfRM(modrm)));
10505 gregOfRM(modrm),
10555 modrm = insn[2];
10556 assign( dV, getXMMReg(gregOfRM(modrm)) );
10558 if (epartIsReg(modrm)) {
10559 assign( sV, getXMMReg(eregOfRM(modrm)) );
10562 nameXMMReg(eregOfRM(modrm)),
10563 nameXMMReg(gregOfRM(modrm)));
10570 nameXMMReg(gregOfRM(modrm)));
10579 putXMMReg( gregOfRM(modrm),
10582 putXMMReg( gregOfRM(modrm),
10755 modrm = insn[2];
10756 if (sz == 2 && epartIsReg(modrm)) {
10759 assign(t5, getXMMReg(eregOfRM(modrm)));
10772 putIReg(4, gregOfRM(modrm), unop(Iop_16Uto32, mkexpr(t4)));
10774 (Int)insn[3], nameXMMReg(eregOfRM(modrm)),
10775 nameIReg(4,gregOfRM(modrm)));
10787 modrm = insn[2];
10789 if (epartIsReg(modrm)) {
10790 assign(t4, getIReg(2, eregOfRM(modrm)));
10794 nameIReg(2,eregOfRM(modrm)),
10795 nameXMMReg(gregOfRM(modrm)));
10803 nameXMMReg(gregOfRM(modrm)));
10806 putXMMRegLane16( gregOfRM(modrm), lane & 7, mkexpr(t4) );
10822 modrm = insn[2];
10823 if (epartIsReg(modrm)) {
10824 assign( s1V, getXMMReg(eregOfRM(modrm)) );
10826 DIP("pmaddwd %s,%s\n", nameXMMReg(eregOfRM(modrm)),
10827 nameXMMReg(gregOfRM(modrm)));
10833 nameXMMReg(gregOfRM(modrm)));
10835 assign( s2V, getXMMReg(gregOfRM(modrm)) );
10853 putXMMReg(gregOfRM(modrm), mkexpr(dV));
10891 modrm = insn[2];
10892 if (epartIsReg(modrm)) {
10895 assign(t0, getXMMRegLane64(eregOfRM(modrm), 0));
10896 assign(t1, getXMMRegLane64(eregOfRM(modrm), 1));
10903 putIReg(4, gregOfRM(modrm), mkexpr(t5));
10904 DIP("pmovmskb %s,%s\n", nameXMMReg(eregOfRM(modrm)),
10905 nameIReg(4,gregOfRM(modrm)));
10941 modrm = insn[2];
10944 assign( dV, getMMXReg(gregOfRM(modrm)) );
10946 if (epartIsReg(modrm)) {
10947 assign( sV, getMMXReg(eregOfRM(modrm)) );
10949 DIP("pmuludq %s,%s\n", nameMMXReg(eregOfRM(modrm)),
10950 nameMMXReg(gregOfRM(modrm)));
10956 nameMMXReg(gregOfRM(modrm)));
10961 putMMXReg( gregOfRM(modrm),
10979 modrm = insn[2];
10980 assign( dV, getXMMReg(gregOfRM(modrm)) );
10982 if (epartIsReg(modrm)) {
10983 assign( sV, getXMMReg(eregOfRM(modrm)) );
10985 DIP("pmuludq %s,%s\n", nameXMMReg(eregOfRM(modrm)),
10986 nameXMMReg(gregOfRM(modrm)));
10992 nameXMMReg(gregOfRM(modrm)));
10999 putXMMRegLane64( gregOfRM(modrm), 0, mkexpr(t0) );
11001 putXMMRegLane64( gregOfRM(modrm), 1, mkexpr(t1) );
11023 modrm = insn[2];
11024 if (epartIsReg(modrm)) {
11025 assign( s1V, getXMMReg(eregOfRM(modrm)) );
11027 DIP("psadbw %s,%s\n", nameXMMReg(eregOfRM(modrm)),
11028 nameXMMReg(gregOfRM(modrm)));
11034 nameXMMReg(gregOfRM(modrm)));
11036 assign( s2V, getXMMReg(gregOfRM(modrm)) );
11054 putXMMReg(gregOfRM(modrm), mkexpr(dV));
11065 modrm = insn[2];
11066 if (epartIsReg(modrm)) {
11067 assign( sV, getXMMReg(eregOfRM(modrm)) );
11071 nameXMMReg(eregOfRM(modrm)),
11072 nameXMMReg(gregOfRM(modrm)));
11080 nameXMMReg(gregOfRM(modrm)));
11090 putXMMReg(gregOfRM(modrm), mkexpr(dV));
11105 modrm = insn[3];
11106 if (epartIsReg(modrm)) {
11107 assign( sV, getXMMReg(eregOfRM(modrm)) );
11111 nameXMMReg(eregOfRM(modrm)),
11112 nameXMMReg(gregOfRM(modrm)));
11120 nameXMMReg(gregOfRM(modrm)));
11134 putXMMReg(gregOfRM(modrm), mkexpr(dV));
11149 modrm = insn[3];
11150 if (epartIsReg(modrm)) {
11151 assign( sV, getXMMReg(eregOfRM(modrm)) );
11155 nameXMMReg(eregOfRM(modrm)),
11156 nameXMMReg(gregOfRM(modrm)));
11164 nameXMMReg(gregOfRM(modrm)));
11178 putXMMReg(gregOfRM(modrm), mkexpr(dV));
11627 modrm = insn[3];
11628 if (epartIsReg(modrm)) {
11629 assign( sV, getXMMReg( eregOfRM(modrm)) );
11631 nameXMMReg(eregOfRM(modrm)),
11632 nameXMMReg(gregOfRM(modrm)));
11640 nameXMMReg(gregOfRM(modrm)));
11645 putXMMReg( gregOfRM(modrm),
11657 modrm = insn[3];
11658 if (epartIsReg(modrm)) {
11659 assign( sV, getXMMReg( eregOfRM(modrm)) );
11660 DIP("movddup %s,%s\n", nameXMMReg(eregOfRM(modrm)),
11661 nameXMMReg(gregOfRM(modrm)));
11668 nameXMMReg(gregOfRM(modrm)));
11672 putXMMReg( gregOfRM(modrm), binop(Iop_64HLtoV128,mkexpr(d0),mkexpr(d0)) );
11685 modrm = insn[3];
11686 if (epartIsReg(modrm)) {
11687 assign( eV, getXMMReg( eregOfRM(modrm)) );
11688 DIP("addsubps %s,%s\n", nameXMMReg(eregOfRM(modrm)),
11689 nameXMMReg(gregOfRM(modrm)));
11695 nameXMMReg(gregOfRM(modrm)));
11699 assign( gV, getXMMReg(gregOfRM(modrm)) );
11707 putXMMReg( gregOfRM(modrm), mk128from32s( a3, s2, a1, s0 ));
11720 modrm = insn[2];
11721 if (epartIsReg(modrm)) {
11722 assign( eV, getXMMReg( eregOfRM(modrm)) );
11723 DIP("addsubpd %s,%s\n", nameXMMReg(eregOfRM(modrm)),
11724 nameXMMReg(gregOfRM(modrm)));
11730 nameXMMReg(gregOfRM(modrm)));
11734 assign( gV, getXMMReg(gregOfRM(modrm)) );
11742 putXMMReg( gregOfRM(modrm),
11760 modrm = insn[3];
11761 if (epartIsReg(modrm)) {
11762 assign( eV, getXMMReg( eregOfRM(modrm)) );
11763 DIP("h%sps %s,%s\n", str, nameXMMReg(eregOfRM(modrm)),
11764 nameXMMReg(gregOfRM(modrm)));
11770 nameXMMReg(gregOfRM(modrm)));
11774 assign( gV, getXMMReg(gregOfRM(modrm)) );
11782 putXMMReg( gregOfRM(modrm),
11802 modrm = insn[2];
11803 if (epartIsReg(modrm)) {
11804 assign( eV, getXMMReg( eregOfRM(modrm)) );
11805 DIP("h%spd %s,%s\n", str, nameXMMReg(eregOfRM(modrm)),
11806 nameXMMReg(gregOfRM(modrm)));
11812 nameXMMReg(gregOfRM(modrm)));
11816 assign( gV, getXMMReg(gregOfRM(modrm)) );
11826 putXMMReg( gregOfRM(modrm),
11834 modrm = getIByte(delta+3);
11835 if (epartIsReg(modrm)) {
11839 putXMMReg( gregOfRM(modrm),
11842 nameXMMReg(gregOfRM(modrm)));
11867 modrm = insn[3];
11869 assign( dV, getMMXReg(gregOfRM(modrm)) );
11871 if (epartIsReg(modrm)) {
11872 assign( sV, getMMXReg(eregOfRM(modrm)) );
11874 DIP("pmaddubsw %s,%s\n", nameMMXReg(eregOfRM(modrm)),
11875 nameMMXReg(gregOfRM(modrm)));
11881 nameMMXReg(gregOfRM(modrm)));
11899 gregOfRM(modrm),
11919 modrm = insn[3];
11920 assign( dV, getXMMReg(gregOfRM(modrm)) );
11922 if (epartIsReg(modrm)) {
11923 assign( sV, getXMMReg(eregOfRM(modrm)) );
11925 DIP("pmaddubsw %s,%s\n", nameXMMReg(eregOfRM(modrm)),
11926 nameXMMReg(gregOfRM(modrm)));
11933 nameXMMReg(gregOfRM(modrm)));
11951 gregOfRM(modrm),
11985 modrm = insn[3];
12002 assign( dV, getMMXReg(gregOfRM(modrm)) );
12004 if (epartIsReg(modrm)) {
12005 assign( sV, getMMXReg(eregOfRM(modrm)) );
12007 DIP("ph%s %s,%s\n", str, nameMMXReg(eregOfRM(modrm)),
12008 nameMMXReg(gregOfRM(modrm)));
12014 nameMMXReg(gregOfRM(modrm)));
12018 gregOfRM(modrm),
12055 modrm = insn[3];
12071 assign( dV, getXMMReg(gregOfRM(modrm)) );
12073 if (epartIsReg(modrm)) {
12074 assign( sV, getXMMReg( eregOfRM(modrm)) );
12075 DIP("ph%s %s,%s\n", str, nameXMMReg(eregOfRM(modrm)),
12076 nameXMMReg(gregOfRM(modrm)));
12083 nameXMMReg(gregOfRM(modrm)));
12096 gregOfRM(modrm),
12118 modrm = insn[3];
12120 assign( dV, getMMXReg(gregOfRM(modrm)) );
12122 if (epartIsReg(modrm)) {
12123 assign( sV, getMMXReg(eregOfRM(modrm)) );
12125 DIP("pmulhrsw %s,%s\n", nameMMXReg(eregOfRM(modrm)),
12126 nameMMXReg(gregOfRM(modrm)));
12132 nameMMXReg(gregOfRM(modrm)));
12136 gregOfRM(modrm),
12153 modrm = insn[3];
12154 assign( dV, getXMMReg(gregOfRM(modrm)) );
12156 if (epartIsReg(modrm)) {
12157 assign( sV, getXMMReg(eregOfRM(modrm)) );
12159 DIP("pmulhrsw %s,%s\n", nameXMMReg(eregOfRM(modrm)),
12160 nameXMMReg(gregOfRM(modrm)));
12167 nameXMMReg(gregOfRM(modrm)));
12176 gregOfRM(modrm),
12203 modrm = insn[3];
12205 assign( dV, getMMXReg(gregOfRM(modrm)) );
12207 if (epartIsReg(modrm)) {
12208 assign( sV, getMMXReg(eregOfRM(modrm)) );
12210 DIP("psign%s %s,%s\n", str, nameMMXReg(eregOfRM(modrm)),
12211 nameMMXReg(gregOfRM(modrm)));
12217 nameMMXReg(gregOfRM(modrm)));
12221 gregOfRM(modrm),
12249 modrm = insn[3];
12250 assign( dV, getXMMReg(gregOfRM(modrm)) );
12252 if (epartIsReg(modrm)) {
12253 assign( sV, getXMMReg(eregOfRM(modrm)) );
12255 DIP("psign%s %s,%s\n", str, nameXMMReg(eregOfRM(modrm)),
12256 nameXMMReg(gregOfRM(modrm)));
12263 nameXMMReg(gregOfRM(modrm)));
12272 gregOfRM(modrm),
12298 modrm = insn[3];
12301 if (epartIsReg(modrm)) {
12302 assign( sV, getMMXReg(eregOfRM(modrm)) );
12304 DIP("pabs%s %s,%s\n", str, nameMMXReg(eregOfRM(modrm)),
12305 nameMMXReg(gregOfRM(modrm)));
12311 nameMMXReg(gregOfRM(modrm)));
12315 gregOfRM(modrm),
12340 modrm = insn[3];
12342 if (epartIsReg(modrm)) {
12343 assign( sV, getXMMReg(eregOfRM(modrm)) );
12345 DIP("pabs%s %s,%s\n", str, nameXMMReg(eregOfRM(modrm)),
12346 nameXMMReg(gregOfRM(modrm)));
12353 nameXMMReg(gregOfRM(modrm)));
12360 gregOfRM(modrm),
12376 modrm = insn[3];
12378 assign( dV, getMMXReg(gregOfRM(modrm)) );
12380 if (epartIsReg(modrm)) {
12381 assign( sV, getMMXReg(eregOfRM(modrm)) );
12385 nameMMXReg(eregOfRM(modrm)),
12386 nameMMXReg(gregOfRM(modrm)));
12394 nameMMXReg(gregOfRM(modrm)));
12419 putMMXReg( gregOfRM(modrm), mkexpr(res) );
12435 modrm = insn[3];
12436 assign( dV, getXMMReg(gregOfRM(modrm)) );
12438 if (epartIsReg(modrm)) {
12439 assign( sV, getXMMReg(eregOfRM(modrm)) );
12443 nameXMMReg(eregOfRM(modrm)),
12444 nameXMMReg(gregOfRM(modrm)));
12453 nameXMMReg(gregOfRM(modrm)));
12501 gregOfRM(modrm),
12513 modrm = insn[3];
12515 assign( dV, getMMXReg(gregOfRM(modrm)) );
12517 if (epartIsReg(modrm)) {
12518 assign( sV, getMMXReg(eregOfRM(modrm)) );
12520 DIP("pshufb %s,%s\n", nameMMXReg(eregOfRM(modrm)),
12521 nameMMXReg(gregOfRM(modrm)));
12527 nameMMXReg(gregOfRM(modrm)));
12531 gregOfRM(modrm),
12568 modrm = insn[3];
12569 assign( dV, getXMMReg(gregOfRM(modrm)) );
12571 if (epartIsReg(modrm)) {
12572 assign( sV, getXMMReg(eregOfRM(modrm)) );
12574 DIP("pshufb %s,%s\n", nameXMMReg(eregOfRM(modrm)),
12575 nameXMMReg(gregOfRM(modrm)));
12582 nameXMMReg(gregOfRM(modrm)));
12653 gregOfRM(modrm),
12666 modrm = insn[3];
12675 putIReg(sz, gregOfRM(modrm), mkexpr(dst));
12676 DIP("movbe %s,%s\n", dis_buf, nameIReg(sz, gregOfRM(modrm)));
12678 assign(src, getIReg(sz, gregOfRM(modrm)));
12681 DIP("movbe %s,%s\n", nameIReg(sz, gregOfRM(modrm)), dis_buf);
12709 modrm = insn[3];
12711 if (epartIsReg(modrm)) {
12713 isD ? getXMMRegLane64F( eregOfRM(modrm), 0 )
12714 : getXMMRegLane32F( eregOfRM(modrm), 0 ) );
12720 imm, nameXMMReg( eregOfRM(modrm) ),
12721 nameXMMReg( gregOfRM(modrm) ) );
12729 imm, dis_buf, nameXMMReg( gregOfRM(modrm) ) );
12740 putXMMRegLane64F( gregOfRM(modrm), 0, mkexpr(res) );
12742 putXMMRegLane32F( gregOfRM(modrm), 0, mkexpr(res) );
12756 modrm = insn[3];
12757 if (epartIsReg(modrm)) {
12758 assign(src, getIReg(sz, eregOfRM(modrm)));
12761 nameIReg(sz, eregOfRM(modrm)),
12762 nameIReg(sz, gregOfRM(modrm)));
12768 nameIReg(sz, gregOfRM(modrm)));
12772 putIReg(sz, gregOfRM(modrm), mkexpr(res));
13401 modrm = getIByte(delta);
13402 if (epartIsReg(modrm))
13409 putIReg(sz, gregOfRM(modrm), mkexpr(addr));
13411 nameIReg(sz,gregOfRM(modrm)));
13481 modrm = getIByte(delta);
13482 if (epartIsReg(modrm)) {
13485 putIReg(sz, eregOfRM(modrm), mkU(szToITy(sz), d32));
13487 nameIReg(sz,eregOfRM(modrm)));
14164 modrm = getIByte(delta);
14167 if (epartIsReg(modrm)) {
14168 assign(t1, getIReg(sz, eregOfRM(modrm)));
14169 assign(t2, getIReg(sz, gregOfRM(modrm)));
14170 putIReg(sz, gregOfRM(modrm), mkexpr(t1));
14171 putIReg(sz, eregOfRM(modrm), mkexpr(t2));
14174 nameISize(sz), nameIReg(sz,gregOfRM(modrm)),
14175 nameIReg(sz,eregOfRM(modrm)));
14180 assign( t2, getIReg(sz,gregOfRM(modrm)) );
14183 putIReg( sz, gregOfRM(modrm), mkexpr(t1) );
14186 nameIReg(sz,gregOfRM(modrm)), dis_buf);
14322 modrm = getIByte(delta);
14327 delta = dis_Grp1 ( sorb, pfx_lock, delta, modrm, am_sz, d_sz, sz, d32 );
14331 modrm = getIByte(delta);
14335 delta = dis_Grp1 ( sorb, pfx_lock, delta, modrm, am_sz, d_sz, sz, d32 );
14339 modrm = getIByte(delta);
14343 delta = dis_Grp1 ( sorb, pfx_lock, delta, modrm, am_sz, d_sz, sz, d32 );
14350 modrm = getIByte(delta);
14355 delta = dis_Grp2 ( sorb, delta, modrm, am_sz, d_sz, sz,
14363 modrm = getIByte(delta);
14367 delta = dis_Grp2 ( sorb, delta, modrm, am_sz, d_sz, sz,
14375 modrm = getIByte(delta);
14380 delta = dis_Grp2 ( sorb, delta, modrm, am_sz, d_sz, sz,
14388 modrm = getUChar(delta);
14392 delta = dis_Grp2 ( sorb, delta, modrm, am_sz, d_sz, sz,
14400 modrm = getUChar(delta);
14404 delta = dis_Grp2 ( sorb, delta, modrm, am_sz, d_sz, sz,
14412 modrm = getIByte(delta);
14415 delta = dis_Grp2 ( sorb, delta, modrm, am_sz, d_sz, sz,
14469 modrm = getUChar(delta);
14472 delta = dis_Grp8_Imm ( sorb, pfx_lock, delta, modrm,
14573 modrm = getIByte(delta);
14574 if (epartIsReg(modrm)) goto decode_failure;
14575 if (gregOfRM(modrm) != 1) goto decode_failure;
14775 //-- modrm = getUChar(eip);
14776 //-- vg_assert(!epartIsReg(modrm));
14778 modrm), TempReg, t1);
14783 //-- DIP("movnti %s,%s\n", nameIReg(4,gregOfRM(modrm)), dis_buf);
14795 modrm = getUChar(delta);
14796 if (epartIsReg(modrm)) goto decode_failure;
14926 modrm = getIByte(delta);
14927 if (epartIsReg(modrm)) {
14929 putIReg(1, eregOfRM(modrm), mkexpr(t1));
14931 nameIReg(1,eregOfRM(modrm)));
14943 modrm = getIByte(delta);
14947 sorb, delta, modrm, sz,
14952 modrm = getIByte(delta);
14954 sorb, delta, modrm, sz,
14960 modrm = getIByte(delta);
14964 sorb, delta, modrm, sz,
14969 modrm = getIByte(delta);
14971 sorb, delta, modrm, sz,
15120 modrm = getUChar(delta);
15123 if (epartIsReg(modrm)) goto decode_failure;
15124 if (gregOfRM(modrm) != 0 && gregOfRM(modrm) != 1)
15126 switch (gregOfRM(modrm)) {
15137 mkU32(gregOfRM(modrm)) )