Lines Matching defs:modrm
343 /* Extract the reg field from a modRM byte. */
349 /* Figure out whether the mod and rm parts of a modRM byte refer to a
1485 /* Generate IR to calculate an address indicated by a ModRM and
1799 Is passed the a ptr to the modRM byte, the actual operation, and the
1919 Is passed the a ptr to the modRM byte, the actual operation, and the
2054 Is passed the a ptr to the modRM byte, and the data size. Returns
2098 Is passed the a ptr to the modRM byte, and the data size. Returns
2283 Int delta, UChar modrm,
2296 switch (gregOfRM(modrm)) {
2306 if (epartIsReg(modrm)) {
2309 assign(dst0, getIReg(sz,eregOfRM(modrm)));
2312 if (gregOfRM(modrm) == 2 /* ADC */) {
2316 if (gregOfRM(modrm) == 3 /* SBB */) {
2327 if (gregOfRM(modrm) < 7)
2328 putIReg(sz, eregOfRM(modrm), mkexpr(dst1));
2331 DIP("%s%c $0x%x, %s\n", nameGrp1(gregOfRM(modrm)), nameISize(sz), d32,
2332 nameIReg(sz,eregOfRM(modrm)));
2339 if (gregOfRM(modrm) == 2 /* ADC */) {
2350 if (gregOfRM(modrm) == 3 /* SBB */) {
2362 if (gregOfRM(modrm) < 7) {
2378 DIP("%s%c $0x%x, %s\n", nameGrp1(gregOfRM(modrm)), nameISize(sz),
2390 Int delta, UChar modrm,
2394 /* delta on entry points at the modrm byte. */
2408 if (epartIsReg(modrm)) {
2409 assign(dst0, getIReg(sz, eregOfRM(modrm)));
2418 switch (gregOfRM(modrm)) { case 4: case 5: case 6: case 7: isShift = True; }
2421 switch (gregOfRM(modrm)) { case 0: case 1: isRotate = True; }
2424 switch (gregOfRM(modrm)) { case 2: case 3: isRotateC = True; }
2434 Bool left = toBool(gregOfRM(modrm) == 2);
2467 switch (gregOfRM(modrm)) {
2516 Bool left = toBool(gregOfRM(modrm) == 0);
2598 if (epartIsReg(modrm)) {
2599 putIReg(sz, eregOfRM(modrm), mkexpr(dst1));
2602 nameGrp2(gregOfRM(modrm)), nameISize(sz) );
2607 vex_printf(", %s\n", nameIReg(sz,eregOfRM(modrm)));
2613 nameGrp2(gregOfRM(modrm)), nameISize(sz) );
2629 Int delta, UChar modrm,
2634 And delta on entry points at the modrm byte. */
2656 switch (gregOfRM(modrm)) {
2670 if (epartIsReg(modrm)) {
2672 assign( t2, widenUto32(getIReg(sz, eregOfRM(modrm))) );
2674 DIP("%s%c $0x%x, %s\n", nameGrp8(gregOfRM(modrm)), nameISize(sz),
2675 src_val, nameIReg(sz,eregOfRM(modrm)));
2681 DIP("%s%c $0x%x, %s\n", nameGrp8(gregOfRM(modrm)), nameISize(sz),
2686 switch (gregOfRM(modrm)) {
2706 if (gregOfRM(modrm) != 4 /* BT */) {
2707 if (epartIsReg(modrm)) {
2708 putIReg(sz, eregOfRM(modrm), narrowTo(ty, mkexpr(t2m)));
2805 UChar modrm;
2815 modrm = getIByte(delta);
2817 if (locked && (gregOfRM(modrm) != 2 && gregOfRM(modrm) != 3)) {
2823 if (epartIsReg(modrm)) {
2824 switch (gregOfRM(modrm)) {
2829 getIReg(sz,eregOfRM(modrm)),
2833 nameIReg(sz, eregOfRM(modrm)));
2845 putIReg(sz, eregOfRM(modrm),
2847 getIReg(sz, eregOfRM(modrm))));
2848 DIP("not%c %s\n", nameISize(sz), nameIReg(sz, eregOfRM(modrm)));
2856 assign(src, getIReg(sz,eregOfRM(modrm)));
2859 putIReg(sz, eregOfRM(modrm), mkexpr(dst1));
2860 DIP("neg%c %s\n", nameISize(sz), nameIReg(sz, eregOfRM(modrm)));
2865 assign(src, getIReg(sz,eregOfRM(modrm)));
2866 codegen_mulL_A_D ( sz, False, src, nameIReg(sz,eregOfRM(modrm)) );
2871 assign(src, getIReg(sz,eregOfRM(modrm)));
2872 codegen_mulL_A_D ( sz, True, src, nameIReg(sz,eregOfRM(modrm)) );
2876 assign( t1, getIReg(sz, eregOfRM(modrm)) );
2878 DIP("div%c %s\n", nameISize(sz), nameIReg(sz, eregOfRM(modrm)));
2882 assign( t1, getIReg(sz, eregOfRM(modrm)) );
2884 DIP("idiv%c %s\n", nameISize(sz), nameIReg(sz, eregOfRM(modrm)));
2895 switch (gregOfRM(modrm)) {
2965 UChar modrm;
2973 modrm = getIByte(delta);
2975 if (locked && (gregOfRM(modrm) != 0 && gregOfRM(modrm) != 1)) {
2981 if (epartIsReg(modrm)) {
2982 assign(t1, getIReg(1, eregOfRM(modrm)));
2983 switch (gregOfRM(modrm)) {
2986 putIReg(1, eregOfRM(modrm), mkexpr(t2));
2991 putIReg(1, eregOfRM(modrm), mkexpr(t2));
2999 DIP("%sb %s\n", nameGrp4(gregOfRM(modrm)),
3000 nameIReg(1, eregOfRM(modrm)));
3004 switch (gregOfRM(modrm)) {
3030 DIP("%sb %s\n", nameGrp4(gregOfRM(modrm)), dis_buf);
3042 UChar modrm;
3051 modrm = getIByte(delta);
3053 if (locked && (gregOfRM(modrm) != 0 && gregOfRM(modrm) != 1)) {
3059 if (epartIsReg(modrm)) {
3060 assign(t1, getIReg(sz,eregOfRM(modrm)));
3061 switch (gregOfRM(modrm)) {
3068 putIReg(sz,eregOfRM(modrm),mkexpr(t2));
3076 putIReg(sz,eregOfRM(modrm),mkexpr(t2));
3104 DIP("%s%c %s\n", nameGrp5(gregOfRM(modrm)),
3105 nameISize(sz), nameIReg(sz, eregOfRM(modrm)));
3109 switch (gregOfRM(modrm)) {
3160 DIP("%s%c %s\n", nameGrp5(gregOfRM(modrm)),
3853 /* On entry, delta points at the second byte of the insn (the modrm
3856 UChar modrm = getIByte(delta+0);
3861 if (modrm < 0xC0) {
3863 /* bits 5,4,3 are an opcode extension, and the modRM also
3868 switch (gregOfRM(modrm)) {
3926 vex_printf("unhandled opc_aux = 0x%2x\n", (UInt)gregOfRM(modrm));
3932 switch (modrm) {
3935 fp_do_op_ST_ST ( "add", Iop_AddF64, modrm - 0xC0, 0, False );
3939 fp_do_op_ST_ST ( "mul", Iop_MulF64, modrm - 0xC8, 0, False );
3944 r_dst = (UInt)modrm - 0xD0;
3958 r_dst = (UInt)modrm - 0xD8;
3972 fp_do_op_ST_ST ( "sub", Iop_SubF64, modrm - 0xE0, 0, False );
3976 fp_do_oprev_ST_ST ( "subr", Iop_SubF64, modrm - 0xE8, 0, False );
3980 fp_do_op_ST_ST ( "div", Iop_DivF64, modrm - 0xF0, 0, False );
3984 fp_do_oprev_ST_ST ( "divr", Iop_DivF64, modrm - 0xF8, 0, False );
3996 if (modrm < 0xC0) {
3998 /* bits 5,4,3 are an opcode extension, and the modRM also
4003 switch (gregOfRM(modrm)) {
4181 vex_printf("unhandled opc_aux = 0x%2x\n", (UInt)gregOfRM(modrm));
4188 switch (modrm) {
4191 r_src = (UInt)modrm - 0xC0;
4200 r_src = (UInt)modrm - 0xC8;
4507 Bool isSIN = modrm == 0xFE;
4538 if (modrm < 0xC0) {
4540 /* bits 5,4,3 are an opcode extension, and the modRM also
4545 switch (gregOfRM(modrm)) {
4627 vex_printf("unhandled opc_aux = 0x%2x\n", (UInt)gregOfRM(modrm));
4635 switch (modrm) {
4638 r_src = (UInt)modrm - 0xC0;
4647 r_src = (UInt)modrm - 0xC8;
4656 r_src = (UInt)modrm - 0xD0;
4665 r_src = (UInt)modrm - 0xD8;
4697 if (modrm < 0xC0) {
4699 /* bits 5,4,3 are an opcode extension, and the modRM also
4704 switch (gregOfRM(modrm)) {
4788 vex_printf("unhandled opc_aux = 0x%2x\n", (UInt)gregOfRM(modrm));
4796 switch (modrm) {
4799 r_src = (UInt)modrm - 0xC0;
4808 r_src = (UInt)modrm - 0xC8;
4817 r_src = (UInt)modrm - 0xD0;
4826 r_src = (UInt)modrm - 0xD8;
4879 fp_do_ucomi_ST0_STi( (UInt)modrm - 0xE8, False );
4883 fp_do_ucomi_ST0_STi( (UInt)modrm - 0xF0, False );
4895 if (modrm < 0xC0) {
4897 /* bits 5,4,3 are an opcode extension, and the modRM also
4902 switch (gregOfRM(modrm)) {
4958 vex_printf("unhandled opc_aux = 0x%2x\n", (UInt)gregOfRM(modrm));
4966 switch (modrm) {
4969 fp_do_op_ST_ST ( "add", Iop_AddF64, 0, modrm - 0xC0, False );
4973 fp_do_op_ST_ST ( "mul", Iop_MulF64, 0, modrm - 0xC8, False );
4977 fp_do_oprev_ST_ST ( "subr", Iop_SubF64, 0, modrm - 0xE0, False );
4981 fp_do_op_ST_ST ( "sub", Iop_SubF64, 0, modrm - 0xE8, False );
4985 fp_do_oprev_ST_ST ( "divr", Iop_DivF64, 0, modrm - 0xF0, False );
4989 fp_do_op_ST_ST ( "div", Iop_DivF64, 0, modrm - 0xF8, False );
5003 if (modrm < 0xC0) {
5005 /* bits 5,4,3 are an opcode extension, and the modRM also
5010 switch (gregOfRM(modrm)) {
5149 vex_printf("unhandled opc_aux = 0x%2x\n", (UInt)gregOfRM(modrm));
5155 switch (modrm) {
5158 r_dst = (UInt)modrm - 0xC0;
5164 r_dst = (UInt)modrm - 0xD0;
5173 r_dst = (UInt)modrm - 0xD8;
5183 r_dst = (UInt)modrm - 0xE0;
5196 r_dst = (UInt)modrm - 0xE8;
5219 if (modrm < 0xC0) {
5221 /* bits 5,4,3 are an opcode extension, and the modRM also
5227 switch (gregOfRM(modrm)) {
5313 vex_printf("unhandled opc_aux = 0x%2x\n", (UInt)gregOfRM(modrm));
5321 switch (modrm) {
5324 fp_do_op_ST_ST ( "add", Iop_AddF64, 0, modrm - 0xC0, True );
5328 fp_do_op_ST_ST ( "mul", Iop_MulF64, 0, modrm - 0xC8, True );
5346 fp_do_oprev_ST_ST ( "subr", Iop_SubF64, 0, modrm - 0xE0, True );
5350 fp_do_op_ST_ST ( "sub", Iop_SubF64, 0, modrm - 0xE8, True );
5354 fp_do_oprev_ST_ST ( "divr", Iop_DivF64, 0, modrm - 0xF0, True );
5358 fp_do_op_ST_ST ( "div", Iop_DivF64, 0, modrm - 0xF8, True );
5372 if (modrm < 0xC0) {
5374 /* bits 5,4,3 are an opcode extension, and the modRM also
5379 switch (gregOfRM(modrm)) {
5425 vex_printf("unhandled opc_aux = 0x%2x\n", (UInt)gregOfRM(modrm));
5433 switch (modrm) {
5466 fp_do_ucomi_ST0_STi( (UInt)modrm - 0xE8, True );
5471 fp_do_ucomi_ST0_STi( (UInt)modrm - 0xF0, True );
5561 UChar modrm = getIByte(delta);
5562 Bool isReg = epartIsReg(modrm);
5651 argG = getMMXReg(gregOfRM(modrm));
5657 argE = getMMXReg(eregOfRM(modrm));
5689 putMMXReg( gregOfRM(modrm), mkexpr(res) );
5693 ( isReg ? nameMMXReg(eregOfRM(modrm)) : dis_buf ),
5694 nameMMXReg(gregOfRM(modrm)) );
5839 UChar modrm;
5853 modrm = getIByte(delta);
5854 if (epartIsReg(modrm)) {
5857 gregOfRM(modrm),
5860 getIReg(4, eregOfRM(modrm)) ) );
5862 nameIReg(4,eregOfRM(modrm)), nameMMXReg(gregOfRM(modrm)));
5867 gregOfRM(modrm),
5871 DIP("movd %s, %s\n", dis_buf, nameMMXReg(gregOfRM(modrm)));
5878 modrm = getIByte(delta);
5879 if (epartIsReg(modrm)) {
5881 putIReg( 4, eregOfRM(modrm),
5882 unop(Iop_64to32, getMMXReg(gregOfRM(modrm)) ) );
5884 nameMMXReg(gregOfRM(modrm)), nameIReg(4,eregOfRM(modrm)));
5889 unop(Iop_64to32, getMMXReg(gregOfRM(modrm)) ) );
5890 DIP("movd %s, %s\n", nameMMXReg(gregOfRM(modrm)), dis_buf);
5898 modrm = getIByte(delta);
5899 if (epartIsReg(modrm)) {
5901 putMMXReg( gregOfRM(modrm), getMMXReg(eregOfRM(modrm)) );
5903 nameMMXReg(eregOfRM(modrm)), nameMMXReg(gregOfRM(modrm)));
5907 putMMXReg( gregOfRM(modrm), loadLE(Ity_I64, mkexpr(addr)) );
5909 dis_buf, nameMMXReg(gregOfRM(modrm)));
5917 modrm = getIByte(delta);
5918 if (epartIsReg(modrm)) {
5920 putMMXReg( eregOfRM(modrm), getMMXReg(gregOfRM(modrm)) );
5922 nameMMXReg(gregOfRM(modrm)), nameMMXReg(eregOfRM(modrm)));
5926 storeLE( mkexpr(addr), getMMXReg(gregOfRM(modrm)) );
5928 nameMMXReg(gregOfRM(modrm)), dis_buf);
6134 modrm = getIByte(delta);
6135 if (sz != 4 || (!epartIsReg(modrm)))
6140 assign( regM, getMMXReg( eregOfRM(modrm) ));
6141 assign( regD, getMMXReg( gregOfRM(modrm) ));
6153 DIP("maskmovq %s,%s\n", nameMMXReg( eregOfRM(modrm) ),
6154 nameMMXReg( gregOfRM(modrm) ) );
6179 Int delta, UChar modrm,
6187 for printing it. And eip on entry points at the modrm byte. */
6220 assign( gsrc, getIReg(sz, gregOfRM(modrm)) );
6222 if (epartIsReg(modrm)) {
6224 assign( esrc, getIReg(sz, eregOfRM(modrm)) );
6228 nameIReg(sz, gregOfRM(modrm)), nameIReg(sz, eregOfRM(modrm)));
6236 nameIReg(sz, gregOfRM(modrm)), dis_buf);
6284 if (epartIsReg(modrm)) {
6285 putIReg(sz, eregOfRM(modrm), mkexpr(tmpRes));
6317 UChar modrm;
6334 modrm = getIByte(delta);
6336 assign( t_bitno0, widenSto32(getIReg(sz, gregOfRM(modrm))) );
6338 if (epartIsReg(modrm)) {
6352 storeLE( mkexpr(t_esp), getIReg(sz, eregOfRM(modrm)) );
6415 if (locked && !epartIsReg(modrm)) {
6441 if (epartIsReg(modrm)) {
6443 putIReg(sz, eregOfRM(modrm), loadLE(szToITy(sz), mkexpr(t_esp)) );
6448 nameBtOp(op), nameISize(sz), nameIReg(sz, gregOfRM(modrm)),
6449 ( epartIsReg(modrm) ? nameIReg(sz, eregOfRM(modrm)) : dis_buf ) );
6461 UChar modrm;
6474 modrm = getIByte(delta);
6476 isReg = epartIsReg(modrm);
6479 assign( src, getIReg(sz, eregOfRM(modrm)) );
6489 ( isReg ? nameIReg(sz, eregOfRM(modrm)) : dis_buf ),
6490 nameIReg(sz, gregOfRM(modrm)));
6551 widenUto32( getIReg( sz, gregOfRM(modrm) ) )
6561 putIReg( sz, gregOfRM(modrm), mkexpr(dst) );
8085 UChar opc, modrm, abyte, pre;
8324 modrm = getIByte(delta+2);
8326 vassert(!epartIsReg(modrm));
8395 modrm = getIByte(delta+2);
8397 vassert(!epartIsReg(modrm));
8529 modrm = getIByte(delta+2);
8530 if (epartIsReg(modrm)) {
8531 assign( argR, getXMMRegLane32F( eregOfRM(modrm), 0/*lowest lane*/ ) );
8533 DIP("[u]comiss %s,%s\n", nameXMMReg(eregOfRM(modrm)),
8534 nameXMMReg(gregOfRM(modrm)) );
8540 nameXMMReg(gregOfRM(modrm)) );
8542 assign( argL, getXMMRegLane32F( gregOfRM(modrm), 0/*lowest lane*/ ) );
8567 modrm = getIByte(delta+2);
8569 if (epartIsReg(modrm)) {
8570 assign( arg64, getMMXReg(eregOfRM(modrm)) );
8572 DIP("cvtpi2ps %s,%s\n", nameMMXReg(eregOfRM(modrm)),
8573 nameXMMReg(gregOfRM(modrm)));
8579 nameXMMReg(gregOfRM(modrm)) );
8585 gregOfRM(modrm), 0,
8592 gregOfRM(modrm), 1,
8608 modrm = getIByte(delta+3);
8609 if (epartIsReg(modrm)) {
8610 assign( arg32, getIReg(4, eregOfRM(modrm)) );
8612 DIP("cvtsi2ss %s,%s\n", nameIReg(4, eregOfRM(modrm)),
8613 nameXMMReg(gregOfRM(modrm)));
8619 nameXMMReg(gregOfRM(modrm)) );
8625 gregOfRM(modrm), 0,
8645 modrm = getIByte(delta+2);
8647 if (epartIsReg(modrm)) {
8649 assign(f32lo, getXMMRegLane32F(eregOfRM(modrm), 0));
8650 assign(f32hi, getXMMRegLane32F(eregOfRM(modrm), 1));
8652 nameXMMReg(eregOfRM(modrm)),
8653 nameMMXReg(gregOfRM(modrm)));
8663 nameMMXReg(gregOfRM(modrm)));
8684 putMMXReg(gregOfRM(modrm), mkexpr(dst64));
8699 modrm = getIByte(delta+3);
8700 if (epartIsReg(modrm)) {
8702 assign(f32lo, getXMMRegLane32F(eregOfRM(modrm), 0));
8704 nameXMMReg(eregOfRM(modrm)),
8705 nameIReg(4, gregOfRM(modrm)));
8712 nameIReg(4, gregOfRM(modrm)));
8721 putIReg(4, gregOfRM(modrm),
8750 modrm = getIByte(delta+2);
8751 vassert(!epartIsReg(modrm));
8813 modrm = getIByte(delta+2);
8814 if (sz == 4 && !epartIsReg(modrm)) {
8817 storeLE( mkexpr(addr), getMMXReg(gregOfRM(modrm)) );
8819 nameMMXReg(gregOfRM(modrm)));
8848 modrm = insn[2];
8849 if (sz == 4 && epartIsReg(modrm)) {
8853 assign(sV, getMMXReg(eregOfRM(modrm)));
8862 putIReg(4, gregOfRM(modrm), unop(Iop_16Uto32, mkexpr(t5)));
8864 (Int)insn[3], nameMMXReg(eregOfRM(modrm)),
8865 nameIReg(4,gregOfRM(modrm)));
8883 modrm = insn[2];
8886 assign(t5, getMMXReg(gregOfRM(modrm)));
8889 if (epartIsReg(modrm)) {
8890 assign(t4, getIReg(2, eregOfRM(modrm)));
8894 nameIReg(2,eregOfRM(modrm)),
8895 nameMMXReg(gregOfRM(modrm)));
8903 nameMMXReg(gregOfRM(modrm)));
8913 putMMXReg(gregOfRM(modrm), mkexpr(t6));
8958 modrm = insn[2];
8959 if (epartIsReg(modrm)) {
8963 assign(t0, getMMXReg(eregOfRM(modrm)));
8965 putIReg(4, gregOfRM(modrm), mkexpr(t1));
8966 DIP("pmovmskb %s,%s\n", nameMMXReg(eregOfRM(modrm)),
8967 nameIReg(4,gregOfRM(modrm)));
8992 modrm = getIByte(delta+2);
8993 vassert(!epartIsReg(modrm));
8998 switch (gregOfRM(modrm)) {
9017 modrm = getIByte(delta+2);
9018 vassert(!epartIsReg(modrm));
9023 switch (gregOfRM(modrm)) {
9051 modrm = insn[2];
9052 if (epartIsReg(modrm)) {
9053 assign( sV, getMMXReg(eregOfRM(modrm)) );
9057 nameMMXReg(eregOfRM(modrm)),
9058 nameMMXReg(gregOfRM(modrm)));
9066 nameMMXReg(gregOfRM(modrm)));
9076 putMMXReg(gregOfRM(modrm), mkexpr(dV));
9127 modrm = getIByte(delta+2);
9128 if (epartIsReg(modrm)) {
9129 putXMMReg( gregOfRM(modrm),
9130 getXMMReg( eregOfRM(modrm) ));
9131 DIP("mov[ua]ps %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9132 nameXMMReg(gregOfRM(modrm)));
9138 putXMMReg( gregOfRM(modrm),
9141 nameXMMReg(gregOfRM(modrm)));
9151 modrm = getIByte(delta+2);
9152 if (epartIsReg(modrm)) {
9158 storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) );
9159 DIP("mov[ua]ps %s,%s\n", nameXMMReg(gregOfRM(modrm)),
9169 modrm = getIByte(delta+2);
9170 if (epartIsReg(modrm)) {
9172 putXMMRegLane64( gregOfRM(modrm), 1/*upper lane*/,
9173 getXMMRegLane64( eregOfRM(modrm), 0 ) );
9174 DIP("movhps %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9175 nameXMMReg(gregOfRM(modrm)));
9179 putXMMRegLane64( gregOfRM(modrm), 1/*upper lane*/,
9182 nameXMMReg( gregOfRM(modrm) ));
9206 modrm = getIByte(delta+2);
9207 if (epartIsReg(modrm)) {
9209 putXMMRegLane64( gregOfRM(modrm),
9211 getXMMRegLane64( eregOfRM(modrm), 1 ));
9212 DIP("movhlps %s, %s\n", nameXMMReg(eregOfRM(modrm)),
9213 nameXMMReg(gregOfRM(modrm)));
9217 putXMMRegLane64( gregOfRM(modrm), 0/*lower lane*/,
9220 dis_buf, nameXMMReg( gregOfRM(modrm) ));
9244 modrm = getIByte(delta+2);
9245 if (sz == 4 && epartIsReg(modrm)) {
9252 src = eregOfRM(modrm);
9265 putIReg(4, gregOfRM(modrm),
9272 modrm)));
9281 modrm = getIByte(delta+2);
9282 if (!epartIsReg(modrm)) {
9285 storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) );
9288 nameXMMReg(gregOfRM(modrm)));
9299 modrm = getIByte(delta+3);
9300 if (epartIsReg(modrm)) {
9301 putXMMRegLane32( gregOfRM(modrm), 0,
9302 getXMMRegLane32( eregOfRM(modrm), 0 ));
9303 DIP("movss %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9304 nameXMMReg(gregOfRM(modrm)));
9309 putXMMRegLane64( gregOfRM(modrm), 1, mkU64(0) );
9311 putXMMRegLane32( gregOfRM(modrm), 1, mkU32(0) );
9313 putXMMRegLane32( gregOfRM(modrm), 0,
9316 nameXMMReg(gregOfRM(modrm)));
9326 modrm = getIByte(delta+3);
9327 if (epartIsReg(modrm)) {
9332 getXMMRegLane32(gregOfRM(modrm), 0) );
9333 DIP("movss %s,%s\n", nameXMMReg(gregOfRM(modrm)),
9399 modrm = insn[2];
9400 assign( dV, getXMMReg(gregOfRM(modrm)) );
9402 if (epartIsReg(modrm)) {
9403 assign( sV, getXMMReg(eregOfRM(modrm)) );
9407 nameXMMReg(eregOfRM(modrm)),
9408 nameXMMReg(gregOfRM(modrm)));
9416 nameXMMReg(gregOfRM(modrm)));
9426 gregOfRM(modrm),
9455 modrm = getIByte(delta+2);
9457 vassert(!epartIsReg(modrm));
9500 modrm = insn[2];
9501 assign( dV, getXMMReg(gregOfRM(modrm)) );
9503 if (epartIsReg(modrm)) {
9504 assign( sV, getXMMReg(eregOfRM(modrm)) );
9507 nameXMMReg(eregOfRM(modrm)),
9508 nameXMMReg(gregOfRM(modrm)));
9515 nameXMMReg(gregOfRM(modrm)));
9522 putXMMReg( gregOfRM(modrm), mk128from32s( s3, d3, s2, d2 ) );
9524 putXMMReg( gregOfRM(modrm), mk128from32s( s1, d1, s0, d0 ) );
9594 modrm = getIByte(delta+2);
9595 if (epartIsReg(modrm)) {
9596 assign( argR, getXMMRegLane64F( eregOfRM(modrm), 0/*lowest lane*/ ) );
9598 DIP("[u]comisd %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9599 nameXMMReg(gregOfRM(modrm)) );
9605 nameXMMReg(gregOfRM(modrm)) );
9607 assign( argL, getXMMRegLane64F( gregOfRM(modrm), 0/*lowest lane*/ ) );
9629 modrm = getIByte(delta+3);
9630 if (epartIsReg(modrm)) {
9631 assign( arg64, getXMMRegLane64(eregOfRM(modrm), 0) );
9633 DIP("cvtdq2pd %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9634 nameXMMReg(gregOfRM(modrm)));
9640 nameXMMReg(gregOfRM(modrm)) );
9644 gregOfRM(modrm), 0,
9649 gregOfRM(modrm), 1,
9662 modrm = getIByte(delta+2);
9663 if (epartIsReg(modrm)) {
9664 assign( argV, getXMMReg(eregOfRM(modrm)) );
9666 DIP("cvtdq2ps %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9667 nameXMMReg(gregOfRM(modrm)));
9673 nameXMMReg(gregOfRM(modrm)) );
9683 putXMMRegLane32F( gregOfRM(modrm), 3, CVT(t3) );
9684 putXMMRegLane32F( gregOfRM(modrm), 2, CVT(t2) );
9685 putXMMRegLane32F( gregOfRM(modrm), 1, CVT(t1) );
9686 putXMMRegLane32F( gregOfRM(modrm), 0, CVT(t0) );
9700 modrm = getIByte(delta+3);
9701 if (epartIsReg(modrm)) {
9702 assign( argV, getXMMReg(eregOfRM(modrm)) );
9704 DIP("cvtpd2dq %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9705 nameXMMReg(gregOfRM(modrm)));
9711 nameXMMReg(gregOfRM(modrm)) );
9726 putXMMRegLane32( gregOfRM(modrm), 3, mkU32(0) );
9727 putXMMRegLane32( gregOfRM(modrm), 2, mkU32(0) );
9728 putXMMRegLane32( gregOfRM(modrm), 1, CVT(t1) );
9729 putXMMRegLane32( gregOfRM(modrm), 0, CVT(t0) );
9748 modrm = getIByte(delta+2);
9750 if (epartIsReg(modrm)) {
9752 assign(f64lo, getXMMRegLane64F(eregOfRM(modrm), 0));
9753 assign(f64hi, getXMMRegLane64F(eregOfRM(modrm), 1));
9755 nameXMMReg(eregOfRM(modrm)),
9756 nameMMXReg(gregOfRM(modrm)));
9766 nameMMXReg(gregOfRM(modrm)));
9783 putMMXReg(gregOfRM(modrm), mkexpr(dst64));
9796 modrm = getIByte(delta+2);
9797 if (epartIsReg(modrm)) {
9798 assign( argV, getXMMReg(eregOfRM(modrm)) );
9800 DIP("cvtpd2ps %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9801 nameXMMReg(gregOfRM(modrm)));
9807 nameXMMReg(gregOfRM(modrm)) );
9822 putXMMRegLane32( gregOfRM(modrm), 3, mkU32(0) );
9823 putXMMRegLane32( gregOfRM(modrm), 2, mkU32(0) );
9824 putXMMRegLane32F( gregOfRM(modrm), 1, CVT(t1) );
9825 putXMMRegLane32F( gregOfRM(modrm), 0, CVT(t0) );
9837 modrm = getIByte(delta+2);
9838 if (epartIsReg(modrm)) {
9846 assign( arg64, getMMXReg(eregOfRM(modrm)) );
9848 DIP("cvtpi2pd %s,%s\n", nameMMXReg(eregOfRM(modrm)),
9849 nameXMMReg(gregOfRM(modrm)));
9855 nameXMMReg(gregOfRM(modrm)) );
9859 gregOfRM(modrm), 0,
9864 gregOfRM(modrm), 1,
9877 modrm = getIByte(delta+2);
9878 if (epartIsReg(modrm)) {
9879 assign( argV, getXMMReg(eregOfRM(modrm)) );
9881 DIP("cvtps2dq %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9882 nameXMMReg(gregOfRM(modrm)));
9888 nameXMMReg(gregOfRM(modrm)) );
9902 putXMMRegLane32( gregOfRM(modrm), 3, CVT(t3) );
9903 putXMMRegLane32( gregOfRM(modrm), 2, CVT(t2) );
9904 putXMMRegLane32( gregOfRM(modrm), 1, CVT(t1) );
9905 putXMMRegLane32( gregOfRM(modrm), 0, CVT(t0) );
9918 modrm = getIByte(delta+2);
9919 if (epartIsReg(modrm)) {
9920 assign( f32lo, getXMMRegLane32F(eregOfRM(modrm), 0) );
9921 assign( f32hi, getXMMRegLane32F(eregOfRM(modrm), 1) );
9923 DIP("cvtps2pd %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9924 nameXMMReg(gregOfRM(modrm)));
9932 nameXMMReg(gregOfRM(modrm)) );
9935 putXMMRegLane64F( gregOfRM(modrm), 1,
9937 putXMMRegLane64F( gregOfRM(modrm), 0,
9954 modrm = getIByte(delta+3);
9955 if (epartIsReg(modrm)) {
9957 assign(f64lo, getXMMRegLane64F(eregOfRM(modrm), 0));
9959 nameXMMReg(eregOfRM(modrm)),
9960 nameIReg(4, gregOfRM(modrm)));
9967 nameIReg(4, gregOfRM(modrm)));
9976 putIReg(4, gregOfRM(modrm),
9989 modrm = getIByte(delta+3);
9990 if (epartIsReg(modrm)) {
9992 assign(f64lo, getXMMRegLane64F(eregOfRM(modrm), 0));
9993 DIP("cvtsd2ss %s,%s\n", nameXMMReg(eregOfRM(modrm)),
9994 nameXMMReg(gregOfRM(modrm)));
10000 nameXMMReg(gregOfRM(modrm)));
10005 gregOfRM(modrm), 0,
10018 modrm = getIByte(delta+3);
10019 if (epartIsReg(modrm)) {
10020 assign( arg32, getIReg(4, eregOfRM(modrm)) );
10022 DIP("cvtsi2sd %s,%s\n", nameIReg(4, eregOfRM(modrm)),
10023 nameXMMReg(gregOfRM(modrm)));
10029 nameXMMReg(gregOfRM(modrm)) );
10033 gregOfRM(modrm), 0,
10045 modrm = getIByte(delta+3);
10046 if (epartIsReg(modrm)) {
10048 assign(f32lo, getXMMRegLane32F(eregOfRM(modrm), 0));
10049 DIP("cvtss2sd %s,%s\n", nameXMMReg(eregOfRM(modrm)),
10050 nameXMMReg(gregOfRM(modrm)));
10056 nameXMMReg(gregOfRM(modrm)));
10059 putXMMRegLane64F( gregOfRM(modrm), 0,
10071 modrm = getIByte(delta+2);
10072 if (epartIsReg(modrm)) {
10073 assign( argV, getXMMReg(eregOfRM(modrm)) );
10075 DIP("cvttpd2dq %s,%s\n", nameXMMReg(eregOfRM(modrm)),
10076 nameXMMReg(gregOfRM(modrm)));
10082 nameXMMReg(gregOfRM(modrm)) );
10098 putXMMRegLane32( gregOfRM(modrm), 3, mkU32(0) );
10099 putXMMRegLane32( gregOfRM(modrm), 2, mkU32(0) );
10100 putXMMRegLane32( gregOfRM(modrm), 1, CVT(t1) );
10101 putXMMRegLane32( gregOfRM(modrm), 0, CVT(t0) );
10115 modrm = getIByte(delta+3);
10116 if (epartIsReg(modrm)) {
10117 assign( argV, getXMMReg(eregOfRM(modrm)) );
10119 DIP("cvttps2dq %s,%s\n", nameXMMReg(eregOfRM(modrm)),
10120 nameXMMReg(gregOfRM(modrm)));
10126 nameXMMReg(gregOfRM(modrm)) );
10140 putXMMRegLane32( gregOfRM(modrm), 3, CVT(t3) );
10141 putXMMRegLane32( gregOfRM(modrm), 2, CVT(t2) );
10142 putXMMRegLane32( gregOfRM(modrm), 1, CVT(t1) );
10143 putXMMRegLane32( gregOfRM(modrm), 0, CVT(t0) );
10210 modrm = getIByte(delta+2);
10211 if (epartIsReg(modrm)) {
10212 putXMMReg( gregOfRM(modrm),
10213 getXMMReg( eregOfRM(modrm) ));
10214 DIP("mov%s %s,%s\n", wot, nameXMMReg(eregOfRM(modrm)),
10215 nameXMMReg(gregOfRM(modrm)));
10221 putXMMReg( gregOfRM(modrm),
10224 nameXMMReg(gregOfRM(modrm)));
10235 modrm = getIByte(delta+2);
10236 if (epartIsReg(modrm)) {
10242 storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) );
10243 DIP("mov%s %s,%s\n", wot, nameXMMReg(gregOfRM(modrm)),
10252 modrm = getIByte(delta+2);
10253 if (epartIsReg(modrm)) {
10256 gregOfRM(modrm),
10257 unop( Iop_32UtoV128, getIReg(4, eregOfRM(modrm)) )
10260 nameIReg(4,eregOfRM(modrm)), nameXMMReg(gregOfRM(modrm)));
10265 gregOfRM(modrm),
10268 DIP("movd %s, %s\n", dis_buf, nameXMMReg(gregOfRM(modrm)));
10275 modrm = getIByte(delta+2);
10276 if (epartIsReg(modrm)) {
10278 putIReg( 4, eregOfRM(modrm),
10279 getXMMRegLane32(gregOfRM(modrm), 0) );
10281 nameXMMReg(gregOfRM(modrm)), nameIReg(4,eregOfRM(modrm)));
10286 getXMMRegLane32(gregOfRM(modrm), 0) );
10287 DIP("movd %s, %s\n", nameXMMReg(gregOfRM(modrm)), dis_buf);
10294 modrm = getIByte(delta+2);
10295 if (epartIsReg(modrm)) {
10297 putXMMReg( eregOfRM(modrm),
10298 getXMMReg(gregOfRM(modrm)) );
10299 DIP("movdqa %s, %s\n", nameXMMReg(gregOfRM(modrm)),
10300 nameXMMReg(eregOfRM(modrm)));
10305 storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) );
10306 DIP("movdqa %s, %s\n", nameXMMReg(gregOfRM(modrm)), dis_buf);
10316 modrm = getIByte(delta+3);
10317 if (epartIsReg(modrm)) {
10318 putXMMReg( gregOfRM(modrm),
10319 getXMMReg( eregOfRM(modrm) ));
10320 DIP("movdqu %s,%s\n", nameXMMReg(eregOfRM(modrm)),
10321 nameXMMReg(gregOfRM(modrm)));
10325 putXMMReg( gregOfRM(modrm),
10328 nameXMMReg(gregOfRM(modrm)));
10339 modrm = getIByte(delta+3);
10340 if (epartIsReg(modrm)) {
10342 putXMMReg( eregOfRM(modrm),
10343 getXMMReg(gregOfRM(modrm)) );
10344 DIP("movdqu %s, %s\n", nameXMMReg(gregOfRM(modrm)),
10345 nameXMMReg(eregOfRM(modrm)));
10349 storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) );
10350 DIP("movdqu %s, %s\n", nameXMMReg(gregOfRM(modrm)), dis_buf);
10358 modrm = getIByte(delta+3);
10359 if (epartIsReg(modrm)) {
10361 putMMXReg( gregOfRM(modrm),
10362 getXMMRegLane64( eregOfRM(modrm), 0 ));
10363 DIP("movdq2q %s,%s\n", nameXMMReg(eregOfRM(modrm)),
10364 nameMMXReg(gregOfRM(modrm)));
10376 modrm = getIByte(delta+2);
10377 if (epartIsReg(modrm)) {
10382 putXMMRegLane64( gregOfRM(modrm), 1/*upper lane*/,
10385 nameXMMReg( gregOfRM(modrm) ));
10410 modrm = getIByte(delta+2);
10411 if (epartIsReg(modrm)) {
10416 putXMMRegLane64( gregOfRM(modrm), 0/*lower lane*/,
10419 dis_buf, nameXMMReg( gregOfRM(modrm) ));
10444 modrm = getIByte(delta+2);
10445 if (sz == 2 && epartIsReg(modrm)) {
10450 src = eregOfRM(modrm);
10457 putIReg(4, gregOfRM(modrm),
10461 nameIReg(4, gregOfRM(modrm)));
10469 modrm = getIByte(delta+2);
10470 if (sz == 2 && epartIsReg(modrm)) {
10478 assign( regD, getXMMReg( gregOfRM(modrm) ));
10487 getXMMRegLane64( eregOfRM(modrm), 1 ),
10490 getXMMRegLane64( eregOfRM(modrm), 0 ),
10504 DIP("maskmovdqu %s,%s\n", nameXMMReg( eregOfRM(modrm) ),
10505 nameXMMReg( gregOfRM(modrm) ) );
10513 modrm = getIByte(delta+2);
10514 if (sz == 2 && !epartIsReg(modrm)) {
10517 storeLE( mkexpr(addr), getXMMReg(gregOfRM(modrm)) );
10519 nameXMMReg(gregOfRM(modrm)));
10529 modrm = getIByte(delta+2);
10530 if (!epartIsReg(modrm)) {
10532 storeLE( mkexpr(addr), getIReg(4, gregOfRM(modrm)) );
10534 nameIReg(4, gregOfRM(modrm)));
10544 modrm = getIByte(delta+2);
10545 if (epartIsReg(modrm)) {
10551 getXMMRegLane64( gregOfRM(modrm), 0 ));
10552 DIP("movq %s,%s\n", nameXMMReg(gregOfRM(modrm)), dis_buf );
10562 modrm = getIByte(delta+3);
10563 if (epartIsReg(modrm)) {
10565 putXMMReg( gregOfRM(modrm),
10566 unop(Iop_64UtoV128, getMMXReg( eregOfRM(modrm) )) );
10567 DIP("movq2dq %s,%s\n", nameMMXReg(eregOfRM(modrm)),
10568 nameXMMReg(gregOfRM(modrm)));
10584 modrm = getIByte(delta+3);
10585 if (epartIsReg(modrm)) {
10586 putXMMRegLane64( gregOfRM(modrm), 0,
10587 getXMMRegLane64( eregOfRM(modrm), 0 ));
10590 putXMMRegLane64( gregOfRM(modrm), 1, mkU64(0) );
10592 DIP("movsd %s,%s\n", nameXMMReg(eregOfRM(modrm)),
10593 nameXMMReg(gregOfRM(modrm)));
10598 putXMMRegLane64( gregOfRM(modrm), 1, mkU64(0) );
10600 putXMMRegLane64( gregOfRM(modrm), 0,
10603 nameXMMReg(gregOfRM(modrm)));
10613 modrm = getIByte(delta+3);
10614 if (epartIsReg(modrm)) {
10615 putXMMRegLane64( eregOfRM(modrm), 0,
10616 getXMMRegLane64( gregOfRM(modrm), 0 ));
10617 DIP("movsd %s,%s\n", nameXMMReg(gregOfRM(modrm)),
10618 nameXMMReg(eregOfRM(modrm)));
10623 getXMMRegLane64(gregOfRM(modrm), 0) );
10624 DIP("movsd %s,%s\n", nameXMMReg(gregOfRM(modrm)),
10660 modrm = insn[2];
10661 assign( dV, getXMMReg(gregOfRM(modrm)) );
10663 if (epartIsReg(modrm)) {
10664 assign( sV, getXMMReg(eregOfRM(modrm)) );
10668 nameXMMReg(eregOfRM(modrm)),
10669 nameXMMReg(gregOfRM(modrm)));
10677 nameXMMReg(gregOfRM(modrm)));
10689 gregOfRM(modrm),
10739 modrm = insn[2];
10740 assign( dV, getXMMReg(gregOfRM(modrm)) );
10742 if (epartIsReg(modrm)) {
10743 assign( sV, getXMMReg(eregOfRM(modrm)) );
10746 nameXMMReg(eregOfRM(modrm)),
10747 nameXMMReg(gregOfRM(modrm)));
10754 nameXMMReg(gregOfRM(modrm)));
10763 putXMMReg( gregOfRM(modrm),
10766 putXMMReg( gregOfRM(modrm),
10939 modrm = insn[2];
10940 if (sz == 2 && epartIsReg(modrm)) {
10943 assign(t5, getXMMReg(eregOfRM(modrm)));
10956 putIReg(4, gregOfRM(modrm), unop(Iop_16Uto32, mkexpr(t4)));
10958 (Int)insn[3], nameXMMReg(eregOfRM(modrm)),
10959 nameIReg(4,gregOfRM(modrm)));
10971 modrm = insn[2];
10973 if (epartIsReg(modrm)) {
10974 assign(t4, getIReg(2, eregOfRM(modrm)));
10978 nameIReg(2,eregOfRM(modrm)),
10979 nameXMMReg(gregOfRM(modrm)));
10987 nameXMMReg(gregOfRM(modrm)));
10990 putXMMRegLane16( gregOfRM(modrm), lane & 7, mkexpr(t4) );
11006 modrm = insn[2];
11007 if (epartIsReg(modrm)) {
11008 assign( s1V, getXMMReg(eregOfRM(modrm)) );
11010 DIP("pmaddwd %s,%s\n", nameXMMReg(eregOfRM(modrm)),
11011 nameXMMReg(gregOfRM(modrm)));
11017 nameXMMReg(gregOfRM(modrm)));
11019 assign( s2V, getXMMReg(gregOfRM(modrm)) );
11037 putXMMReg(gregOfRM(modrm), mkexpr(dV));
11073 modrm = insn[2];
11074 if (epartIsReg(modrm)) {
11077 assign(t0, getXMMRegLane64(eregOfRM(modrm), 0));
11078 assign(t1, getXMMRegLane64(eregOfRM(modrm), 1));
11085 putIReg(4, gregOfRM(modrm), mkexpr(t5));
11086 DIP("pmovmskb %s,%s\n", nameXMMReg(eregOfRM(modrm)),
11087 nameIReg(4,gregOfRM(modrm)));
11123 modrm = insn[2];
11126 assign( dV, getMMXReg(gregOfRM(modrm)) );
11128 if (epartIsReg(modrm)) {
11129 assign( sV, getMMXReg(eregOfRM(modrm)) );
11131 DIP("pmuludq %s,%s\n", nameMMXReg(eregOfRM(modrm)),
11132 nameMMXReg(gregOfRM(modrm)));
11138 nameMMXReg(gregOfRM(modrm)));
11143 putMMXReg( gregOfRM(modrm),
11161 modrm = insn[2];
11162 assign( dV, getXMMReg(gregOfRM(modrm)) );
11164 if (epartIsReg(modrm)) {
11165 assign( sV, getXMMReg(eregOfRM(modrm)) );
11167 DIP("pmuludq %s,%s\n", nameXMMReg(eregOfRM(modrm)),
11168 nameXMMReg(gregOfRM(modrm)));
11174 nameXMMReg(gregOfRM(modrm)));
11181 putXMMRegLane64( gregOfRM(modrm), 0, mkexpr(t0) );
11183 putXMMRegLane64( gregOfRM(modrm), 1, mkexpr(t1) );
11205 modrm = insn[2];
11206 if (epartIsReg(modrm)) {
11207 assign( s1V, getXMMReg(eregOfRM(modrm)) );
11209 DIP("psadbw %s,%s\n", nameXMMReg(eregOfRM(modrm)),
11210 nameXMMReg(gregOfRM(modrm)));
11216 nameXMMReg(gregOfRM(modrm)));
11218 assign( s2V, getXMMReg(gregOfRM(modrm)) );
11236 putXMMReg(gregOfRM(modrm), mkexpr(dV));
11247 modrm = insn[2];
11248 if (epartIsReg(modrm)) {
11249 assign( sV, getXMMReg(eregOfRM(modrm)) );
11253 nameXMMReg(eregOfRM(modrm)),
11254 nameXMMReg(gregOfRM(modrm)));
11262 nameXMMReg(gregOfRM(modrm)));
11272 putXMMReg(gregOfRM(modrm), mkexpr(dV));
11287 modrm = insn[3];
11288 if (epartIsReg(modrm)) {
11289 assign( sV, getXMMReg(eregOfRM(modrm)) );
11293 nameXMMReg(eregOfRM(modrm)),
11294 nameXMMReg(gregOfRM(modrm)));
11302 nameXMMReg(gregOfRM(modrm)));
11316 putXMMReg(gregOfRM(modrm), mkexpr(dV));
11331 modrm = insn[3];
11332 if (epartIsReg(modrm)) {
11333 assign( sV, getXMMReg(eregOfRM(modrm)) );
11337 nameXMMReg(eregOfRM(modrm)),
11338 nameXMMReg(gregOfRM(modrm)));
11346 nameXMMReg(gregOfRM(modrm)));
11360 putXMMReg(gregOfRM(modrm), mkexpr(dV));
11805 modrm = insn[3];
11806 if (epartIsReg(modrm)) {
11807 assign( sV, getXMMReg( eregOfRM(modrm)) );
11809 nameXMMReg(eregOfRM(modrm)),
11810 nameXMMReg(gregOfRM(modrm)));
11818 nameXMMReg(gregOfRM(modrm)));
11823 putXMMReg( gregOfRM(modrm),
11835 modrm = insn[3];
11836 if (epartIsReg(modrm)) {
11837 assign( sV, getXMMReg( eregOfRM(modrm)) );
11838 DIP("movddup %s,%s\n", nameXMMReg(eregOfRM(modrm)),
11839 nameXMMReg(gregOfRM(modrm)));
11846 nameXMMReg(gregOfRM(modrm)));
11850 putXMMReg( gregOfRM(modrm), binop(Iop_64HLtoV128,mkexpr(d0),mkexpr(d0)) );
11864 modrm = insn[3];
11865 if (epartIsReg(modrm)) {
11866 assign( eV, getXMMReg( eregOfRM(modrm)) );
11867 DIP("addsubps %s,%s\n", nameXMMReg(eregOfRM(modrm)),
11868 nameXMMReg(gregOfRM(modrm)));
11874 nameXMMReg(gregOfRM(modrm)));
11878 assign( gV, getXMMReg(gregOfRM(modrm)) );
11887 putXMMReg( gregOfRM(modrm), mk128from32s( a3, s2, a1, s0 ));
11901 modrm = insn[2];
11902 if (epartIsReg(modrm)) {
11903 assign( eV, getXMMReg( eregOfRM(modrm)) );
11904 DIP("addsubpd %s,%s\n", nameXMMReg(eregOfRM(modrm)),
11905 nameXMMReg(gregOfRM(modrm)));
11911 nameXMMReg(gregOfRM(modrm)));
11915 assign( gV, getXMMReg(gregOfRM(modrm)) );
11924 putXMMReg( gregOfRM(modrm),
11943 modrm = insn[3];
11944 if (epartIsReg(modrm)) {
11945 assign( eV, getXMMReg( eregOfRM(modrm)) );
11946 DIP("h%sps %s,%s\n", str, nameXMMReg(eregOfRM(modrm)),
11947 nameXMMReg(gregOfRM(modrm)));
11953 modrm)));
11957 assign( gV, getXMMReg(gregOfRM(modrm)) );
11966 putXMMReg( gregOfRM(modrm),
11987 modrm = insn[2];
11988 if (epartIsReg(modrm)) {
11989 assign( eV, getXMMReg( eregOfRM(modrm)) );
11990 DIP("h%spd %s,%s\n", str, nameXMMReg(eregOfRM(modrm)),
11991 nameXMMReg(gregOfRM(modrm)));
11997 nameXMMReg(gregOfRM(modrm)));
12001 assign( gV, getXMMReg(gregOfRM(modrm)) );
12012 putXMMReg( gregOfRM(modrm),
12020 modrm = getIByte(delta+3);
12021 if (epartIsReg(modrm)) {
12025 putXMMReg( gregOfRM(modrm),
12028 nameXMMReg(gregOfRM(modrm)));
12053 modrm = insn[3];
12055 assign( dV, getMMXReg(gregOfRM(modrm)) );
12057 if (epartIsReg(modrm)) {
12058 assign( sV, getMMXReg(eregOfRM(modrm)) );
12060 DIP("pmaddubsw %s,%s\n", nameMMXReg(eregOfRM(modrm)),
12061 nameMMXReg(gregOfRM(modrm)));
12067 nameMMXReg(gregOfRM(modrm)));
12085 gregOfRM(modrm),
12105 modrm = insn[3];
12106 assign( dV, getXMMReg(gregOfRM(modrm)) );
12108 if (epartIsReg(modrm)) {
12109 assign( sV, getXMMReg(eregOfRM(modrm)) );
12111 DIP("pmaddubsw %s,%s\n", nameXMMReg(eregOfRM(modrm)),
12112 nameXMMReg(gregOfRM(modrm)));
12119 nameXMMReg(gregOfRM(modrm)));
12137 gregOfRM(modrm),
12171 modrm = insn[3];
12188 assign( dV, getMMXReg(gregOfRM(modrm)) );
12190 if (epartIsReg(modrm)) {
12191 assign( sV, getMMXReg(eregOfRM(modrm)) );
12193 DIP("ph%s %s,%s\n", str, nameMMXReg(eregOfRM(modrm)),
12194 nameMMXReg(gregOfRM(modrm)));
12200 nameMMXReg(gregOfRM(modrm)));
12204 gregOfRM(modrm),
12241 modrm = insn[3];
12257 assign( dV, getXMMReg(gregOfRM(modrm)) );
12259 if (epartIsReg(modrm)) {
12260 assign( sV, getXMMReg( eregOfRM(modrm)) );
12261 DIP("ph%s %s,%s\n", str, nameXMMReg(eregOfRM(modrm)),
12262 nameXMMReg(gregOfRM(modrm)));
12269 nameXMMReg(gregOfRM(modrm)));
12282 gregOfRM(modrm),
12304 modrm = insn[3];
12306 assign( dV, getMMXReg(gregOfRM(modrm)) );
12308 if (epartIsReg(modrm)) {
12309 assign( sV, getMMXReg(eregOfRM(modrm)) );
12311 DIP("pmulhrsw %s,%s\n", nameMMXReg(eregOfRM(modrm)),
12312 nameMMXReg(gregOfRM(modrm)));
12318 nameMMXReg(gregOfRM(modrm)));
12322 gregOfRM(modrm),
12339 modrm = insn[3];
12340 assign( dV, getXMMReg(gregOfRM(modrm)) );
12342 if (epartIsReg(modrm)) {
12343 assign( sV, getXMMReg(eregOfRM(modrm)) );
12345 DIP("pmulhrsw %s,%s\n", nameXMMReg(eregOfRM(modrm)),
12346 nameXMMReg(gregOfRM(modrm)));
12353 nameXMMReg(gregOfRM(modrm)));
12362 gregOfRM(modrm),
12389 modrm = insn[3];
12391 assign( dV, getMMXReg(gregOfRM(modrm)) );
12393 if (epartIsReg(modrm)) {
12394 assign( sV, getMMXReg(eregOfRM(modrm)) );
12396 DIP("psign%s %s,%s\n", str, nameMMXReg(eregOfRM(modrm)),
12397 nameMMXReg(gregOfRM(modrm)));
12403 nameMMXReg(gregOfRM(modrm)));
12407 gregOfRM(modrm),
12435 modrm = insn[3];
12436 assign( dV, getXMMReg(gregOfRM(modrm)) );
12438 if (epartIsReg(modrm)) {
12439 assign( sV, getXMMReg(eregOfRM(modrm)) );
12441 DIP("psign%s %s,%s\n", str, nameXMMReg(eregOfRM(modrm)),
12442 nameXMMReg(gregOfRM(modrm)));
12449 nameXMMReg(gregOfRM(modrm)));
12458 gregOfRM(modrm),
12484 modrm = insn[3];
12487 if (epartIsReg(modrm)) {
12488 assign( sV, getMMXReg(eregOfRM(modrm)) );
12490 DIP("pabs%s %s,%s\n", str, nameMMXReg(eregOfRM(modrm)),
12491 nameMMXReg(gregOfRM(modrm)));
12497 nameMMXReg(gregOfRM(modrm)));
12501 gregOfRM(modrm),
12526 modrm = insn[3];
12528 if (epartIsReg(modrm)) {
12529 assign( sV, getXMMReg(eregOfRM(modrm)) );
12531 DIP("pabs%s %s,%s\n", str, nameXMMReg(eregOfRM(modrm)),
12532 nameXMMReg(gregOfRM(modrm)));
12539 nameXMMReg(gregOfRM(modrm)));
12546 gregOfRM(modrm),
12562 modrm = insn[3];
12564 assign( dV, getMMXReg(gregOfRM(modrm)) );
12566 if (epartIsReg(modrm)) {
12567 assign( sV, getMMXReg(eregOfRM(modrm)) );
12571 nameMMXReg(eregOfRM(modrm)),
12572 nameMMXReg(gregOfRM(modrm)));
12580 nameMMXReg(gregOfRM(modrm)));
12605 putMMXReg( gregOfRM(modrm), mkexpr(res) );
12621 modrm = insn[3];
12622 assign( dV, getXMMReg(gregOfRM(modrm)) );
12624 if (epartIsReg(modrm)) {
12625 assign( sV, getXMMReg(eregOfRM(modrm)) );
12629 nameXMMReg(eregOfRM(modrm)),
12630 nameXMMReg(gregOfRM(modrm)));
12639 nameXMMReg(gregOfRM(modrm)));
12687 gregOfRM(modrm),
12699 modrm = insn[3];
12701 assign( dV, getMMXReg(gregOfRM(modrm)) );
12703 if (epartIsReg(modrm)) {
12704 assign( sV, getMMXReg(eregOfRM(modrm)) );
12706 DIP("pshufb %s,%s\n", nameMMXReg(eregOfRM(modrm)),
12707 nameMMXReg(gregOfRM(modrm)));
12713 nameMMXReg(gregOfRM(modrm)));
12717 gregOfRM(modrm),
12754 modrm = insn[3];
12755 assign( dV, getXMMReg(gregOfRM(modrm)) );
12757 if (epartIsReg(modrm)) {
12758 assign( sV, getXMMReg(eregOfRM(modrm)) );
12760 DIP("pshufb %s,%s\n", nameXMMReg(eregOfRM(modrm)),
12761 nameXMMReg(gregOfRM(modrm)));
12768 nameXMMReg(gregOfRM(modrm)));
12839 gregOfRM(modrm),
12852 modrm = insn[3];
12861 putIReg(sz, gregOfRM(modrm), mkexpr(dst));
12862 DIP("movbe %s,%s\n", dis_buf, nameIReg(sz, gregOfRM(modrm)));
12864 assign(src, getIReg(sz, gregOfRM(modrm)));
12867 DIP("movbe %s,%s\n", nameIReg(sz, gregOfRM(modrm)), dis_buf);
12895 modrm = insn[3];
12897 if (epartIsReg(modrm)) {
12899 isD ? getXMMRegLane64F( eregOfRM(modrm), 0 )
12900 : getXMMRegLane32F( eregOfRM(modrm), 0 ) );
12906 imm, nameXMMReg( eregOfRM(modrm) ),
12907 nameXMMReg( gregOfRM(modrm) ) );
12915 imm, dis_buf, nameXMMReg( gregOfRM(modrm) ) );
12926 putXMMRegLane64F( gregOfRM(modrm), 0, mkexpr(res) );
12928 putXMMRegLane32F( gregOfRM(modrm), 0, mkexpr(res) );
12942 modrm = insn[3];
12943 if (epartIsReg(modrm)) {
12944 assign(src, getIReg(sz, eregOfRM(modrm)));
12947 nameIReg(sz, eregOfRM(modrm)),
12948 nameIReg(sz, gregOfRM(modrm)));
12954 nameIReg(sz, gregOfRM(modrm)));
12958 putIReg(sz, gregOfRM(modrm), mkexpr(res));
13589 modrm = getIByte(delta);
13590 if (epartIsReg(modrm))
13597 putIReg(sz, gregOfRM(modrm), mkexpr(addr));
13599 nameIReg(sz,gregOfRM(modrm)));
13669 modrm = getIByte(delta);
13670 if (gregOfRM(modrm) == 0) {
13671 if (epartIsReg(modrm)) {
13674 putIReg(sz, eregOfRM(modrm), mkU(szToITy(sz), d32));
13676 nameIReg(sz,eregOfRM(modrm)));
14355 modrm = getIByte(delta);
14358 if (epartIsReg(modrm)) {
14359 assign(t1, getIReg(sz, eregOfRM(modrm)));
14360 assign(t2, getIReg(sz, gregOfRM(modrm)));
14361 putIReg(sz, gregOfRM(modrm), mkexpr(t1));
14362 putIReg(sz, eregOfRM(modrm), mkexpr(t2));
14365 nameISize(sz), nameIReg(sz,gregOfRM(modrm)),
14366 nameIReg(sz,eregOfRM(modrm)));
14371 assign( t2, getIReg(sz,gregOfRM(modrm)) );
14374 putIReg( sz, gregOfRM(modrm), mkexpr(t1) );
14377 nameIReg(sz,gregOfRM(modrm)), dis_buf);
14513 modrm = getIByte(delta);
14518 delta = dis_Grp1 ( sorb, pfx_lock, delta, modrm, am_sz, d_sz, sz, d32 );
14522 modrm = getIByte(delta);
14526 delta = dis_Grp1 ( sorb, pfx_lock, delta, modrm, am_sz, d_sz, sz, d32 );
14530 modrm = getIByte(delta);
14534 delta = dis_Grp1 ( sorb, pfx_lock, delta, modrm, am_sz, d_sz, sz, d32 );
14541 modrm = getIByte(delta);
14546 delta = dis_Grp2 ( sorb, delta, modrm, am_sz, d_sz, sz,
14554 modrm = getIByte(delta);
14558 delta = dis_Grp2 ( sorb, delta, modrm, am_sz, d_sz, sz,
14566 modrm = getIByte(delta);
14571 delta = dis_Grp2 ( sorb, delta, modrm, am_sz, d_sz, sz,
14579 modrm = getUChar(delta);
14583 delta = dis_Grp2 ( sorb, delta, modrm, am_sz, d_sz, sz,
14591 modrm = getUChar(delta);
14595 delta = dis_Grp2 ( sorb, delta, modrm, am_sz, d_sz, sz,
14603 modrm = getIByte(delta);
14606 delta = dis_Grp2 ( sorb, delta, modrm, am_sz, d_sz, sz,
14660 modrm = getUChar(delta);
14663 delta = dis_Grp8_Imm ( sorb, pfx_lock, delta, modrm,
14764 modrm = getIByte(delta);
14765 if (epartIsReg(modrm)) goto decode_failure;
14766 if (gregOfRM(modrm) != 1) goto decode_failure;
14973 //-- modrm = getUChar(eip);
14974 //-- vg_assert(!epartIsReg(modrm));
14976 //-- uInstr2(cb, GET, 4, ArchReg, gregOfRM(modrm), TempReg, t1);
14981 //-- DIP("movnti %s,%s\n", nameIReg(4,gregOfRM(modrm)), dis_buf);
14993 modrm = getUChar(delta);
14994 if (epartIsReg(modrm)) goto decode_failure;
15124 modrm = getIByte(delta);
15125 if (epartIsReg(modrm)) {
15127 putIReg(1, eregOfRM(modrm), mkexpr(t1));
15129 nameIReg(1,eregOfRM(modrm)));
15141 modrm = getIByte(delta);
15145 sorb, delta, modrm, sz,
15150 modrm = getIByte(delta);
15152 sorb, delta, modrm, sz,
15158 modrm = getIByte(delta);
15162 sorb, delta, modrm, sz,
15167 modrm = getIByte(delta);
15169 sorb, delta, modrm, sz,
15318 modrm = getUChar(delta);
15321 if (epartIsReg(modrm)) goto decode_failure;
15322 if (gregOfRM(modrm) != 0 && gregOfRM(modrm) != 1)
15324 switch (gregOfRM(modrm)) {
15335 mkU32(gregOfRM(modrm)) )