Lines Matching refs:ot
341 static inline void gen_op_mov_reg_v(int ot, int reg, TCGv t0)
345 switch(ot) {
380 static inline void gen_op_mov_reg_T0(int ot, int reg)
382 gen_op_mov_reg_v(ot, reg, cpu_T[0]);
385 static inline void gen_op_mov_reg_T1(int ot, int reg)
387 gen_op_mov_reg_v(ot, reg, cpu_T[1]);
416 static inline void gen_op_mov_v_reg(int ot, TCGv t0, int reg)
418 switch(ot) {
434 static inline void gen_op_mov_TN_reg(int ot, int t_index, int reg)
436 gen_op_mov_v_reg(ot, cpu_T[t_index], reg);
846 static inline void gen_op_movl_T0_Dshift(int ot)
849 tcg_gen_shli_tl(cpu_T[0], cpu_T[0], ot);
852 static void gen_extu(int ot, TCGv reg)
854 switch(ot) {
869 static void gen_exts(int ot, TCGv reg)
871 switch(ot) {
900 static void gen_helper_in_func(int ot, TCGv v, TCGv_i32 n)
902 switch (ot) {
910 static void gen_helper_out_func(int ot, TCGv_i32 v, TCGv_i32 n)
912 switch (ot) {
920 static void gen_check_io(DisasContext *s, int ot, target_ulong cur_eip,
933 switch (ot) {
945 svm_flags |= (1 << (4 + ot));
953 static inline void gen_movs(DisasContext *s, int ot)
956 gen_op_ld_T0_A0(ot + s->mem_index);
958 gen_op_st_T0_A0(ot + s->mem_index);
959 gen_op_movl_T0_Dshift(ot);
1334 static inline void gen_stos(DisasContext *s, int ot)
1338 gen_op_st_T0_A0(ot + s->mem_index);
1339 gen_op_movl_T0_Dshift(ot);
1343 static inline void gen_lods(DisasContext *s, int ot)
1346 gen_op_ld_T0_A0(ot + s->mem_index);
1347 gen_op_mov_reg_T0(ot, R_EAX);
1348 gen_op_movl_T0_Dshift(ot);
1352 static inline void gen_scas(DisasContext *s, int ot)
1356 gen_op_ld_T1_A0(ot + s->mem_index);
1358 gen_op_movl_T0_Dshift(ot);
1362 static inline void gen_cmps(DisasContext *s, int ot)
1365 gen_op_ld_T0_A0(ot + s->mem_index);
1367 gen_op_ld_T1_A0(ot + s->mem_index);
1369 gen_op_movl_T0_Dshift(ot);
1374 static inline void gen_ins(DisasContext *s, int ot)
1382 gen_op_st_T0_A0(ot + s->mem_index);
1386 gen_helper_in_func(ot, cpu_T[0], cpu_tmp2_i32);
1387 gen_op_st_T0_A0(ot + s->mem_index);
1388 gen_op_movl_T0_Dshift(ot);
1394 static inline void gen_outs(DisasContext *s, int ot)
1399 gen_op_ld_T0_A0(ot + s->mem_index);
1405 gen_helper_out_func(ot, cpu_tmp2_i32, cpu_tmp3_i32);
1407 gen_op_movl_T0_Dshift(ot);
1416 static inline void gen_repz_ ## op(DisasContext *s, int ot, \
1422 gen_ ## op(s, ot); \
1432 static inline void gen_repz_ ## op(DisasContext *s, int ot, \
1440 gen_ ## op(s, ot); \
1442 gen_op_set_cc_op(CC_OP_SUBB + ot); \
1443 gen_jcc1(s, CC_OP_SUBB + ot, (JCC_Z << 1) | (nz ^ 1), l2); \
1486 static void gen_op(DisasContext *s1, int op, int ot, int d)
1489 gen_op_mov_TN_reg(ot, 0, d);
1491 gen_op_ld_T0_A0(ot + s1->mem_index);
1501 gen_op_mov_reg_T0(ot, d);
1503 gen_op_st_T0_A0(ot + s1->mem_index);
1508 tcg_gen_addi_i32(cpu_cc_op, cpu_tmp2_i32, CC_OP_ADDB + ot);
1518 gen_op_mov_reg_T0(ot, d);
1520 gen_op_st_T0_A0(ot + s1->mem_index);
1525 tcg_gen_addi_i32(cpu_cc_op, cpu_tmp2_i32, CC_OP_SUBB + ot);
1531 gen_op_mov_reg_T0(ot, d);
1533 gen_op_st_T0_A0(ot + s1->mem_index);
1535 s1->cc_op = CC_OP_ADDB + ot;
1540 gen_op_mov_reg_T0(ot, d);
1542 gen_op_st_T0_A0(ot + s1->mem_index);
1544 s1->cc_op = CC_OP_SUBB + ot;
1550 gen_op_mov_reg_T0(ot, d);
1552 gen_op_st_T0_A0(ot + s1->mem_index);
1554 s1->cc_op = CC_OP_LOGICB + ot;
1559 gen_op_mov_reg_T0(ot, d);
1561 gen_op_st_T0_A0(ot + s1->mem_index);
1563 s1->cc_op = CC_OP_LOGICB + ot;
1568 gen_op_mov_reg_T0(ot, d);
1570 gen_op_st_T0_A0(ot + s1->mem_index);
1572 s1->cc_op = CC_OP_LOGICB + ot;
1576 s1->cc_op = CC_OP_SUBB + ot;
1582 static void gen_inc(DisasContext *s1, int ot, int d, int c)
1585 gen_op_mov_TN_reg(ot, 0, d);
1587 gen_op_ld_T0_A0(ot + s1->mem_index);
1592 s1->cc_op = CC_OP_INCB + ot;
1595 s1->cc_op = CC_OP_DECB + ot;
1598 gen_op_mov_reg_T0(ot, d);
1600 gen_op_st_T0_A0(ot + s1->mem_index);
1605 static void gen_shift_rm_T1(DisasContext *s, int ot, int op1,
1612 if (ot == OT_QUAD)
1619 gen_op_ld_T0_A0(ot + s->mem_index);
1621 gen_op_mov_TN_reg(ot, 0, op1);
1629 gen_exts(ot, cpu_T[0]);
1633 gen_extu(ot, cpu_T[0]);
1644 gen_op_st_T0_A0(ot + s->mem_index);
1646 gen_op_mov_reg_T0(ot, op1);
1665 tcg_gen_movi_i32(cpu_cc_op, CC_OP_SARB + ot);
1667 tcg_gen_movi_i32(cpu_cc_op, CC_OP_SHLB + ot);
1676 static void gen_shift_rm_im(DisasContext *s, int ot, int op1, int op2,
1681 if (ot == OT_QUAD)
1688 gen_op_ld_T0_A0(ot + s->mem_index);
1690 gen_op_mov_TN_reg(ot, 0, op1);
1696 gen_exts(ot, cpu_T[0]);
1700 gen_extu(ot, cpu_T[0]);
1712 gen_op_st_T0_A0(ot + s->mem_index);
1714 gen_op_mov_reg_T0(ot, op1);
1721 s->cc_op = CC_OP_SARB + ot;
1723 s->cc_op = CC_OP_SHLB + ot;
1735 static void gen_rot_rm_T1(DisasContext *s, int ot, int op1,
1748 if (ot == OT_QUAD)
1756 gen_op_ld_v(ot + s->mem_index, t0, a0);
1758 gen_op_mov_v_reg(ot, t0, op1);
1770 if (ot <= OT_WORD)
1771 tcg_gen_andi_tl(cpu_tmp0, t1, (1 << (3 + ot)) - 1);
1775 gen_extu(ot, t0);
1778 data_bits = 8 << ot;
1795 gen_op_st_v(ot + s->mem_index, t0, a0);
1797 gen_op_mov_reg_v(ot, op1, t0);
1831 static void gen_rot_rm_im(DisasContext *s, int ot, int op1, int op2,
1843 if (ot == OT_QUAD)
1851 gen_op_ld_v(ot + s->mem_index, t0, a0);
1853 gen_op_mov_v_reg(ot, t0, op1);
1856 gen_extu(ot, t0);
1860 data_bits = 8 << ot;
1862 int shift = op2 & ((1 << (3 + ot)) - 1);
1876 gen_op_st_v(ot + s->mem_index, t0, a0);
1878 gen_op_mov_reg_v(ot, op1, t0);
1909 static void gen_rotc_rm_T1(DisasContext *s, int ot, int op1,
1919 gen_op_ld_T0_A0(ot + s->mem_index);
1921 gen_op_mov_TN_reg(ot, 0, op1);
1924 switch (ot) {
1933 switch (ot) {
1944 gen_op_st_T0_A0(ot + s->mem_index);
1946 gen_op_mov_reg_T0(ot, op1);
1961 static void gen_shiftd_rm_T1_T3(DisasContext *s, int ot, int op1,
1973 if (ot == OT_QUAD)
1981 gen_op_ld_v(ot + s->mem_index, t0, a0);
1983 gen_op_mov_v_reg(ot, t0, op1);
1997 if (ot == OT_WORD) {
2032 data_bits = 8 << ot;
2034 if (ot == OT_LONG)
2045 if (ot == OT_LONG)
2061 gen_op_st_v(ot + s->mem_index, t0, a0);
2063 gen_op_mov_reg_v(ot, op1, t0);
2076 tcg_gen_movi_i32(cpu_cc_op, CC_OP_SARB + ot);
2078 tcg_gen_movi_i32(cpu_cc_op, CC_OP_SHLB + ot);
2089 static void gen_shift(DisasContext *s1, int op, int ot, int d, int s)
2092 gen_op_mov_TN_reg(ot, 1, s);
2095 gen_rot_rm_T1(s1, ot, d, 0);
2098 gen_rot_rm_T1(s1, ot, d, 1);
2102 gen_shift_rm_T1(s1, ot, d, 0, 0);
2105 gen_shift_rm_T1(s1, ot, d, 1, 0);
2108 gen_shift_rm_T1(s1, ot, d, 1, 1);
2111 gen_rotc_rm_T1(s1, ot, d, 0);
2114 gen_rotc_rm_T1(s1, ot, d, 1);
2119 static void gen_shifti(DisasContext *s1, int op, int ot, int d, int c)
2123 gen_rot_rm_im(s1, ot, d, c, 0);
2126 gen_rot_rm_im(s1, ot, d, c, 1);
2130 gen_shift_rm_im(s1, ot, d, c, 0, 0);
2133 gen_shift_rm_im(s1, ot, d, c, 1, 0);
2136 gen_shift_rm_im(s1, ot, d, c, 1, 1);
2141 gen_shift(s1, op, ot, d, OR_TMP1);
2408 static void gen_ldst_modrm(DisasContext *s, int modrm, int ot, int reg, int is_store)
2417 gen_op_mov_TN_reg(ot, 0, reg);
2418 gen_op_mov_reg_T0(ot, rm);
2420 gen_op_mov_TN_reg(ot, 0, rm);
2422 gen_op_mov_reg_T0(ot, reg);
2428 gen_op_mov_TN_reg(ot, 0, reg);
2429 gen_op_st_T0_A0(ot + s->mem_index);
2431 gen_op_ld_T0_A0(ot + s->mem_index);
2433 gen_op_mov_reg_T0(ot, reg);
2438 static inline uint32_t insn_get(DisasContext *s, int ot)
2442 switch(ot) {
2460 static inline int insn_const_size(unsigned int ot)
2462 if (ot <= OT_LONG)
2463 return 1 << ot;
2799 int ot, opsize;
2804 ot = s->dflag ? OT_QUAD : OT_WORD;
2805 opsize = 1 << ot;
2813 gen_op_st_T0_A0(ot + s->mem_index);
2817 tcg_const_i32((ot == OT_QUAD)),
2820 gen_op_mov_reg_T1(ot, R_EBP);
2826 ot = s->dflag + OT_WORD;
2838 gen_op_st_T0_A0(ot + s->mem_index);
2845 gen_op_mov_reg_T1(ot, R_EBP);
3277 int b1, op1_offset, op2_offset, is_xmm, val, ot;
3732 ot = (s->dflag == 2) ? OT_QUAD : OT_LONG;
3733 gen_ldst_modrm(s, modrm, ot, OR_TMP0, 0);
3737 if (ot == OT_LONG) {
3779 ot = (s->dflag == 2) ? OT_QUAD : OT_LONG;
3796 if (ot == OT_LONG) {
3802 gen_op_mov_reg_T0(ot, reg);
3823 ot = (s->dflag == 2) ? OT_QUAD : OT_LONG;
3837 gen_op_mov_reg_T0(ot, reg);
3966 ot = OT_BYTE;
3969 ot = OT_WORD;
3971 ot = OT_LONG;
3973 ot = OT_QUAD;
3977 gen_ldst_modrm(s, modrm, ot, OR_TMP0, 0);
3979 cpu_T[0], tcg_const_i32(8 << ot));
3981 ot = (s->dflag == 2) ? OT_QUAD : OT_LONG;
3982 gen_op_mov_reg_T0(ot, reg);
4002 ot = (s->dflag == 2) ? OT_QUAD : OT_LONG;
4013 gen_op_mov_reg_T0(ot, rm);
4022 gen_op_mov_reg_T0(ot, rm);
4028 if (ot == OT_LONG) { /* pextrd */
4034 gen_op_mov_reg_v(ot, rm, cpu_T[0]);
4044 gen_op_mov_reg_v(ot, rm, cpu_tmp1_i64);
4057 gen_op_mov_reg_T0(ot, rm);
4102 if (ot == OT_LONG) { /* pinsrd */
4104 gen_op_mov_v_reg(ot, cpu_tmp0, rm);
4115 gen_op_mov_v_reg(ot, cpu_tmp1_i64, rm);
4420 int shift, ot;
4594 ot = OT_BYTE;
4596 ot = dflag + OT_WORD;
4611 s->cc_op = CC_OP_LOGICB + ot;
4612 gen_op_mov_reg_T0(ot, reg);
4618 gen_op_mov_TN_reg(ot, 1, reg);
4619 gen_op(s, op, ot, opreg);
4628 gen_op_ld_T1_A0(ot + s->mem_index);
4632 gen_op_mov_TN_reg(ot, 1, rm);
4634 gen_op(s, op, ot, reg);
4637 val = insn_get(s, ot);
4639 gen_op(s, op, ot, OR_EAX);
4655 ot = OT_BYTE;
4657 ot = dflag + OT_WORD;
4668 s->rip_offset = insn_const_size(ot);
4680 val = insn_get(s, ot);
4687 gen_op(s, op, ot, opreg);
4694 ot = dflag ? OT_LONG : OT_WORD;
4695 gen_inc(s, ot, OR_EAX + (b & 7), 1);
4698 ot = dflag ? OT_LONG : OT_WORD;
4699 gen_inc(s, ot, OR_EAX + (b & 7), -1);
4704 ot = OT_BYTE;
4706 ot = dflag + OT_WORD;
4714 s->rip_offset = insn_const_size(ot);
4716 gen_op_ld_T0_A0(ot + s->mem_index);
4718 gen_op_mov_TN_reg(ot, 0, rm);
4723 val = insn_get(s, ot);
4726 s->cc_op = CC_OP_LOGICB + ot;
4731 gen_op_st_T0_A0(ot + s->mem_index);
4733 gen_op_mov_reg_T0(ot, rm);
4739 gen_op_st_T0_A0(ot + s->mem_index);
4741 gen_op_mov_reg_T0(ot, rm);
4744 s->cc_op = CC_OP_SUBB + ot;
4747 switch(ot) {
4813 switch(ot) {
4883 switch(ot) {
4906 switch(ot) {
4936 ot = OT_BYTE;
4938 ot = dflag + OT_WORD;
4950 ot = OT_QUAD;
4952 ot = dflag ? OT_LONG + (rex_w == 1) : OT_WORD;
4955 ot = dflag ? OT_QUAD : OT_WORD;
4961 gen_op_ld_T0_A0(ot + s->mem_index);
4963 gen_op_mov_TN_reg(ot, 0, rm);
4972 gen_inc(s, ot, opreg, 1);
4979 gen_inc(s, ot, opreg, -1);
4996 gen_op_ld_T1_A0(ot + s->mem_index);
4997 gen_add_A0_im(s, 1 << (ot - OT_WORD + 1));
5023 gen_op_ld_T1_A0(ot + s->mem_index);
5024 gen_add_A0_im(s, 1 << (ot - OT_WORD + 1));
5052 ot = OT_BYTE;
5054 ot = dflag + OT_WORD;
5059 gen_ldst_modrm(s, modrm, ot, OR_TMP0, 0);
5060 gen_op_mov_TN_reg(ot, 1, reg);
5062 s->cc_op = CC_OP_LOGICB + ot;
5068 ot = OT_BYTE;
5070 ot = dflag + OT_WORD;
5071 val = insn_get(s, ot);
5073 gen_op_mov_TN_reg(ot, 0, OR_EAX);
5076 s->cc_op = CC_OP_LOGICB + ot;
5120 ot = dflag + OT_WORD;
5124 s->rip_offset = insn_const_size(ot);
5127 gen_ldst_modrm(s, modrm, ot, OR_TMP0, 0);
5129 val = insn_get(s, ot);
5135 gen_op_mov_TN_reg(ot, 1, reg);
5139 if (ot == OT_QUAD) {
5143 if (ot == OT_LONG) {
5176 gen_op_mov_reg_T0(ot, reg);
5177 s->cc_op = CC_OP_MULB + ot;
5182 ot = OT_BYTE;
5184 ot = dflag + OT_WORD;
5190 gen_op_mov_TN_reg(ot, 0, reg);
5191 gen_op_mov_TN_reg(ot, 1, rm);
5193 gen_op_mov_reg_T1(ot, reg);
5194 gen_op_mov_reg_T0(ot, rm);
5197 gen_op_mov_TN_reg(ot, 0, reg);
5198 gen_op_ld_T1_A0(ot + s->mem_index);
5200 gen_op_st_T0_A0(ot + s->mem_index);
5201 gen_op_mov_reg_T1(ot, reg);
5204 s->cc_op = CC_OP_ADDB + ot;
5213 ot = OT_BYTE;
5215 ot = dflag + OT_WORD;
5223 gen_op_mov_v_reg(ot, t1, reg);
5226 gen_op_mov_v_reg(ot, t0, rm);
5230 gen_op_ld_v(ot + s->mem_index, t0, a0);
5235 gen_extu(ot, t2);
5239 gen_op_mov_reg_v(ot, R_EAX, t0);
5242 gen_op_mov_reg_v(ot, rm, t1);
5246 gen_op_mov_reg_v(ot, R_EAX, t0);
5249 gen_op_st_v(ot + s->mem_index, t1, a0);
5253 s->cc_op = CC_OP_SUBB + ot;
5296 ot = dflag ? OT_QUAD : OT_WORD;
5298 ot = dflag + OT_WORD;
5303 gen_op_mov_reg_T0(ot, (b & 7) | REX_B(s));
5318 ot = dflag ? OT_QUAD : OT_WORD;
5320 ot = dflag + OT_WORD;
5323 val = insn_get(s, ot);
5331 ot = dflag ? OT_QUAD : OT_WORD;
5333 ot = dflag + OT_WORD;
5342 gen_op_mov_reg_T0(ot, rm);
5345 s->popl_esp_hack = 1 << ot;
5346 gen_ldst_modrm(s, modrm, ot, OR_TMP0, 1);
5374 ot = dflag ? OT_QUAD : OT_WORD;
5376 ot = dflag + OT_WORD;
5378 gen_op_mov_reg_T0(ot, R_EBP);
5433 ot = OT_BYTE;
5435 ot = dflag + OT_WORD;
5440 gen_ldst_modrm(s, modrm, ot, reg, 1);
5445 ot = OT_BYTE;
5447 ot = dflag + OT_WORD;
5451 s->rip_offset = insn_const_size(ot);
5454 val = insn_get(s, ot);
5457 gen_op_st_T0_A0(ot + s->mem_index);
5459 gen_op_mov_reg_T0(ot, (modrm & 7) | REX_B(s));
5468 ot = OT_BYTE;
5470 ot = OT_WORD + dflag;
5474 gen_ldst_modrm(s, modrm, ot, OR_TMP0, 0);
5475 gen_op_mov_reg_T0(ot, reg);
5505 ot = OT_WORD + dflag;
5507 ot = OT_WORD;
5508 gen_ldst_modrm(s, modrm, ot, OR_TMP0, 1);
5519 /* ot is the size of source */
5520 ot = (b & 1) + OT_BYTE;
5527 gen_op_mov_TN_reg(ot, 0, rm);
5528 switch(ot | (b & 8)) {
5547 gen_op_lds_T0_A0(ot + s->mem_index);
5549 gen_op_ldu_T0_A0(ot + s->mem_index);
5557 ot = dflag + OT_WORD;
5569 gen_op_mov_reg_A0(ot - OT_WORD, reg);
5580 ot = OT_BYTE;
5582 ot = dflag + OT_WORD;
5600 gen_op_ld_T0_A0(ot + s->mem_index);
5601 gen_op_mov_reg_T0(ot, R_EAX);
5603 gen_op_mov_TN_reg(ot, 0, R_EAX);
5604 gen_op_st_T0_A0(ot + s->mem_index);
5649 ot = dflag ? OT_LONG : OT_WORD;
5650 val = insn_get(s, ot);
5653 gen_op_mov_reg_T0(ot, reg);
5659 ot = dflag + OT_WORD;
5666 ot = OT_BYTE;
5668 ot = dflag + OT_WORD;
5675 gen_op_mov_TN_reg(ot, 0, reg);
5676 gen_op_mov_TN_reg(ot, 1, rm);
5677 gen_op_mov_reg_T0(ot, rm);
5678 gen_op_mov_reg_T1(ot, reg);
5681 gen_op_mov_TN_reg(ot, 0, reg);
5685 gen_op_ld_T1_A0(ot + s->mem_index);
5686 gen_op_st_T0_A0(ot + s->mem_index);
5689 gen_op_mov_reg_T1(ot, reg);
5711 ot = dflag ? OT_LONG : OT_WORD;
5718 gen_op_ld_T1_A0(ot + s->mem_index);
5719 gen_add_A0_im(s, 1 << (ot - OT_WORD + 1));
5724 gen_op_mov_reg_T1(ot, reg);
5740 ot = OT_BYTE;
5742 ot = dflag + OT_WORD;
5760 gen_shift(s, op, ot, opreg, OR_ECX);
5765 gen_shifti(s, op, ot, opreg, shift);
5796 ot = dflag + OT_WORD;
5807 gen_op_mov_TN_reg(ot, 1, reg);
5815 gen_shiftd_rm_T1_T3(s, ot, opreg, op);
6343 ot = OT_BYTE;
6345 ot = dflag + OT_WORD;
6348 gen_repz_movs(s, ot, pc_start - s->cs_base, s->pc - s->cs_base);
6350 gen_movs(s, ot);
6357 ot = OT_BYTE;
6359 ot = dflag + OT_WORD;
6362 gen_repz_stos(s, ot, pc_start - s->cs_base, s->pc - s->cs_base);
6364 gen_stos(s, ot);
6370 ot = OT_BYTE;
6372 ot = dflag + OT_WORD;
6374 gen_repz_lods(s, ot, pc_start - s->cs_base, s->pc - s->cs_base);
6376 gen_lods(s, ot);
6382 ot = OT_BYTE;
6384 ot = dflag + OT_WORD;
6386 gen_repz_scas(s, ot, pc_start - s->cs_base, s->pc - s->cs_base, 1);
6388 gen_repz_scas(s, ot, pc_start - s->cs_base, s->pc - s->cs_base, 0);
6390 gen_scas(s, ot);
6391 s->cc_op = CC_OP_SUBB + ot;
6398 ot = OT_BYTE;
6400 ot = dflag + OT_WORD;
6402 gen_repz_cmps(s, ot, pc_start - s->cs_base, s->pc - s->cs_base, 1);
6404 gen_repz_cmps(s, ot, pc_start - s->cs_base, s->pc - s->cs_base, 0);
6406 gen_cmps(s, ot);
6407 s->cc_op = CC_OP_SUBB + ot;
6413 ot = OT_BYTE;
6415 ot = dflag ? OT_LONG : OT_WORD;
6418 gen_check_io(s, ot, pc_start - s->cs_base,
6421 gen_repz_ins(s, ot, pc_start - s->cs_base, s->pc - s->cs_base);
6423 gen_ins(s, ot);
6432 ot = OT_BYTE;
6434 ot = dflag ? OT_LONG : OT_WORD;
6437 gen_check_io(s, ot, pc_start - s->cs_base,
6440 gen_repz_outs(s, ot, pc_start - s->cs_base, s->pc - s->cs_base);
6442 gen_outs(s, ot);
6455 ot = OT_BYTE;
6457 ot = dflag ? OT_LONG : OT_WORD;
6460 gen_check_io(s, ot, pc_start - s->cs_base,
6465 gen_helper_in_func(ot, cpu_T[1], cpu_tmp2_i32);
6466 gen_op_mov_reg_T1(ot, R_EAX);
6475 ot = OT_BYTE;
6477 ot = dflag ? OT_LONG : OT_WORD;
6480 gen_check_io(s, ot, pc_start - s->cs_base,
6482 gen_op_mov_TN_reg(ot, 1, R_EAX);
6489 gen_helper_out_func(ot, cpu_tmp2_i32, cpu_tmp3_i32);
6498 ot = OT_BYTE;
6500 ot = dflag ? OT_LONG : OT_WORD;
6503 gen_check_io(s, ot, pc_start - s->cs_base,
6508 gen_helper_in_func(ot, cpu_T[1], cpu_tmp2_i32);
6509 gen_op_mov_reg_T1(ot, R_EAX);
6518 ot = OT_BYTE;
6520 ot = dflag ? OT_LONG : OT_WORD;
6523 gen_check_io(s, ot, pc_start - s->cs_base,
6525 gen_op_mov_TN_reg(ot, 1, R_EAX);
6532 gen_helper_out_func(ot, cpu_tmp2_i32, cpu_tmp3_i32);
6642 ot = dflag ? OT_LONG : OT_WORD;
6643 offset = insn_get(s, ot);
6668 ot = dflag ? OT_LONG : OT_WORD;
6669 offset = insn_get(s, ot);
6710 ot = dflag + OT_WORD;
6717 gen_op_ld_v(ot + s->mem_index, t0, cpu_A0);
6720 gen_op_mov_v_reg(ot, t0, rm);
6723 if (ot == OT_LONG) {
6735 gen_op_mov_reg_v(ot, reg, t0);
6868 ot = dflag + OT_WORD;
6876 gen_op_ld_T0_A0(ot + s->mem_index);
6878 gen_op_mov_TN_reg(ot, 0, rm);
6899 ot = dflag + OT_WORD;
6908 gen_exts(ot, cpu_T[1]);
6909 tcg_gen_sari_tl(cpu_tmp0, cpu_T[1], 3 + ot);
6910 tcg_gen_shli_tl(cpu_tmp0, cpu_tmp0, ot);
6912 gen_op_ld_T0_A0(ot + s->mem_index);
6914 gen_op_mov_TN_reg(ot, 0, rm);
6917 tcg_gen_andi_tl(cpu_T[1], cpu_T[1], (1 << (3 + ot)) - 1);
6944 s->cc_op = CC_OP_SARB + ot;
6947 gen_op_st_T0_A0(ot + s->mem_index);
6949 gen_op_mov_reg_T0(ot, rm);
6960 ot = dflag + OT_WORD;
6963 gen_ldst_modrm(s,modrm, ot, OR_TMP0, 0);
6964 gen_extu(ot, cpu_T[0]);
6969 switch(ot) {
6977 gen_op_mov_reg_T0(ot, reg);
6987 gen_op_mov_reg_T0(ot, reg);
6991 s->cc_op = CC_OP_LOGICB + ot;
7167 ot = dflag ? OT_LONG : OT_WORD;
7173 gen_op_mov_TN_reg(ot, 0, reg);
7177 if (ot == OT_WORD)
7379 ot = OT_WORD;
7381 ot += s->dflag;
7382 gen_ldst_modrm(s, modrm, ot, OR_TMP0, 1);
7402 ot = OT_WORD;
7404 ot += s->dflag;
7405 gen_ldst_modrm(s, modrm, ot, OR_TMP0, 1);
7736 ot = OT_WORD;
7743 gen_op_ld_v(ot + s->mem_index, t0, cpu_A0);
7747 gen_op_mov_v_reg(ot, t0, rm);
7750 gen_op_mov_v_reg(ot, t1, reg);
7761 gen_op_st_v(ot + s->mem_index, t0, a0);
7764 gen_op_mov_reg_v(ot, rm, t0);
7784 ot = dflag ? OT_LONG : OT_WORD;
7798 gen_op_mov_reg_v(ot, reg, t0);
7840 ot = OT_QUAD;
7842 ot = OT_LONG;
7857 gen_op_mov_TN_reg(ot, 0, rm);
7863 gen_op_mov_reg_T0(ot, rm);
7884 ot = OT_QUAD;
7886 ot = OT_LONG;
7892 gen_op_mov_TN_reg(ot, 0, rm);
7899 gen_op_mov_reg_T0(ot, rm);
7918 ot = s->dflag == 2 ? OT_QUAD : OT_LONG;
7925 gen_ldst_modrm(s, modrm, ot, reg, 1);
8028 ot = OT_WORD;
8030 ot = OT_LONG;
8032 ot = OT_QUAD;
8034 gen_ldst_modrm(s, modrm, ot, OR_TMP0, 0);
8035 gen_helper_popcnt(cpu_T[0], cpu_T[0], tcg_const_i32(ot));
8036 gen_op_mov_reg_T0(ot, reg);