Lines Matching refs:M

181     if (M.x86.R_SP != 0) {  in x86emuOp_illegal_op()
185 M.x86.R_CS, M.x86.R_IP-1,op1)); in x86emuOp_illegal_op()
258 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_genop_word_RM_R()
282 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_genop_word_RM_R()
361 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_genop_word_R_RM()
377 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_genop_word_R_RM()
415 M.x86.R_AL = genop_byte_operation[op1](M.x86.R_AL, srcval); in x86emuOp_genop_byte_AL_IMM()
431 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_genop_word_AX_IMM()
442 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_genop_word_AX_IMM()
443 M.x86.R_EAX = genop_long_operation[op1](M.x86.R_EAX, srcval); in x86emuOp_genop_word_AX_IMM()
445 M.x86.R_AX = genop_word_operation[op1](M.x86.R_AX, (u16)srcval); in x86emuOp_genop_word_AX_IMM()
460 push_word(M.x86.R_ES); in x86emuOp_push_ES()
474 M.x86.R_ES = pop_word(); in x86emuOp_pop_ES()
488 push_word(M.x86.R_CS); in x86emuOp_push_CS()
499 u8 op2 = (*sys_rdb)(((u32)M.x86.R_CS << 4) + (M.x86.R_IP++)); in x86emuOp_two_byte()
513 push_word(M.x86.R_SS); in x86emuOp_push_SS()
527 M.x86.R_SS = pop_word(); in x86emuOp_pop_SS()
541 push_word(M.x86.R_DS); in x86emuOp_push_DS()
555 M.x86.R_DS = pop_word(); in x86emuOp_pop_DS()
569 M.x86.mode |= SYSMODE_SEGOVR_ES; in x86emuOp_segovr_ES()
586 M.x86.R_AL = daa_byte(M.x86.R_AL); in x86emuOp_daa()
600 M.x86.mode |= SYSMODE_SEGOVR_CS; in x86emuOp_segovr_CS()
614 M.x86.R_AL = das_byte(M.x86.R_AL); in x86emuOp_das()
628 M.x86.mode |= SYSMODE_SEGOVR_SS; in x86emuOp_segovr_SS()
642 M.x86.R_AX = aaa_word(M.x86.R_AX); in x86emuOp_aaa()
656 M.x86.mode |= SYSMODE_SEGOVR_DS; in x86emuOp_segovr_DS()
670 M.x86.R_AX = aas_word(M.x86.R_AX); in x86emuOp_aas()
684 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_inc_register()
710 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_dec_register()
736 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_push_register()
762 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_pop_register()
786 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_push_all()
792 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_push_all()
793 u32 old_sp = M.x86.R_ESP; in x86emuOp_push_all()
795 push_long(M.x86.R_EAX); in x86emuOp_push_all()
796 push_long(M.x86.R_ECX); in x86emuOp_push_all()
797 push_long(M.x86.R_EDX); in x86emuOp_push_all()
798 push_long(M.x86.R_EBX); in x86emuOp_push_all()
800 push_long(M.x86.R_EBP); in x86emuOp_push_all()
801 push_long(M.x86.R_ESI); in x86emuOp_push_all()
802 push_long(M.x86.R_EDI); in x86emuOp_push_all()
804 u16 old_sp = M.x86.R_SP; in x86emuOp_push_all()
806 push_word(M.x86.R_AX); in x86emuOp_push_all()
807 push_word(M.x86.R_CX); in x86emuOp_push_all()
808 push_word(M.x86.R_DX); in x86emuOp_push_all()
809 push_word(M.x86.R_BX); in x86emuOp_push_all()
811 push_word(M.x86.R_BP); in x86emuOp_push_all()
812 push_word(M.x86.R_SI); in x86emuOp_push_all()
813 push_word(M.x86.R_DI); in x86emuOp_push_all()
826 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_pop_all()
832 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_pop_all()
833 M.x86.R_EDI = pop_long(); in x86emuOp_pop_all()
834 M.x86.R_ESI = pop_long(); in x86emuOp_pop_all()
835 M.x86.R_EBP = pop_long(); in x86emuOp_pop_all()
836 M.x86.R_ESP += 4; /* skip ESP */ in x86emuOp_pop_all()
837 M.x86.R_EBX = pop_long(); in x86emuOp_pop_all()
838 M.x86.R_EDX = pop_long(); in x86emuOp_pop_all()
839 M.x86.R_ECX = pop_long(); in x86emuOp_pop_all()
840 M.x86.R_EAX = pop_long(); in x86emuOp_pop_all()
842 M.x86.R_DI = pop_word(); in x86emuOp_pop_all()
843 M.x86.R_SI = pop_word(); in x86emuOp_pop_all()
844 M.x86.R_BP = pop_word(); in x86emuOp_pop_all()
845 M.x86.R_SP += 2; /* skip SP */ in x86emuOp_pop_all()
846 M.x86.R_BX = pop_word(); in x86emuOp_pop_all()
847 M.x86.R_DX = pop_word(); in x86emuOp_pop_all()
848 M.x86.R_CX = pop_word(); in x86emuOp_pop_all()
849 M.x86.R_AX = pop_word(); in x86emuOp_pop_all()
867 M.x86.mode |= SYSMODE_SEGOVR_FS; in x86emuOp_segovr_FS()
884 M.x86.mode |= SYSMODE_SEGOVR_GS; in x86emuOp_segovr_GS()
901 M.x86.mode |= SYSMODE_PREFIX_DATA; in x86emuOp_prefix_data()
915 M.x86.mode |= SYSMODE_PREFIX_ADDR; in x86emuOp_prefix_addr()
929 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_push_word_IMM()
936 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_push_word_IMM()
959 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_imul_word_IMM()
1005 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_imul_word_IMM()
1084 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_imul_byte_IMM()
1128 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_imul_byte_IMM()
1195 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_ins_word()
1228 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_outs_word()
1256 target = (u16)(M.x86.R_IP + (s16)offset); in x86emuOp_jump_near_cond()
1260 M.x86.R_IP = target; in x86emuOp_jump_near_cond()
1404 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opc81_word_RM_IMM()
1428 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opc81_word_RM_IMM()
1594 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opc83_word_RM_IMM()
1616 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opc83_word_RM_IMM()
1692 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_test_word_RM_R()
1714 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_test_word_RM_R()
1793 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_xchg_word_RM_R()
1819 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_xchg_word_RM_R()
1895 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_mov_word_RM_R()
1913 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_mov_word_RM_R()
1984 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_mov_word_R_RM()
2008 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_mov_word_R_RM()
2156 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_pop_RM()
2172 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_pop_RM()
2217 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_xchg_word_AX_register()
2223 tmp = M.x86.R_EAX; in x86emuOp_xchg_word_AX_register()
2224 M.x86.R_EAX = *reg32; in x86emuOp_xchg_word_AX_register()
2232 tmp = M.x86.R_AX; in x86emuOp_xchg_word_AX_register()
2233 M.x86.R_EAX = *reg16; in x86emuOp_xchg_word_AX_register()
2247 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_cbw()
2253 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_cbw()
2254 if (M.x86.R_AX & 0x8000) { in x86emuOp_cbw()
2255 M.x86.R_EAX |= 0xffff0000; in x86emuOp_cbw()
2257 M.x86.R_EAX &= 0x0000ffff; in x86emuOp_cbw()
2260 if (M.x86.R_AL & 0x80) { in x86emuOp_cbw()
2261 M.x86.R_AH = 0xff; in x86emuOp_cbw()
2263 M.x86.R_AH = 0x0; in x86emuOp_cbw()
2277 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_cwd()
2284 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_cwd()
2285 if (M.x86.R_EAX & 0x80000000) { in x86emuOp_cwd()
2286 M.x86.R_EDX = 0xffffffff; in x86emuOp_cwd()
2288 M.x86.R_EDX = 0x0; in x86emuOp_cwd()
2291 if (M.x86.R_AX & 0x8000) { in x86emuOp_cwd()
2292 M.x86.R_DX = 0xffff; in x86emuOp_cwd()
2294 M.x86.R_DX = 0x0; in x86emuOp_cwd()
2315 CALL_TRACE(M.x86.saved_cs, M.x86.saved_ip, farseg, faroff, "FAR "); in x86emuOp_call_far_IMM()
2324 push_word(M.x86.R_CS); in x86emuOp_call_far_IMM()
2325 M.x86.R_CS = farseg; in x86emuOp_call_far_IMM()
2326 push_word(M.x86.R_IP); in x86emuOp_call_far_IMM()
2327 M.x86.R_IP = faroff; in x86emuOp_call_far_IMM()
2355 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_pushf_word()
2363 flags = (M.x86.R_EFLG & F_MSK) | F_ALWAYS_ON; in x86emuOp_pushf_word()
2364 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_pushf_word()
2380 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_popf_word()
2386 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_popf_word()
2387 M.x86.R_EFLG = pop_long(); in x86emuOp_popf_word()
2389 M.x86.R_FLG = pop_word(); in x86emuOp_popf_word()
2405 M.x86.R_FLG &= 0xffffff00; in x86emuOp_sahf()
2407 M.x86.R_FLG |= M.x86.R_AH; in x86emuOp_sahf()
2421 M.x86.R_AH = (u8)(M.x86.R_FLG & 0xff); in x86emuOp_lahf()
2424 M.x86.R_AH |= 0x2; in x86emuOp_lahf()
2442 M.x86.R_AL = fetch_data_byte(offset); in x86emuOp_mov_AL_M_IMM()
2457 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_mov_AX_M_IMM()
2463 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_mov_AX_M_IMM()
2464 M.x86.R_EAX = fetch_data_long(offset); in x86emuOp_mov_AX_M_IMM()
2466 M.x86.R_AX = fetch_data_word(offset); in x86emuOp_mov_AX_M_IMM()
2485 store_data_byte(offset, M.x86.R_AL); in x86emuOp_mov_M_AL_IMM()
2500 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_mov_M_AX_IMM()
2506 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_mov_M_AX_IMM()
2507 store_data_long(offset, M.x86.R_EAX); in x86emuOp_mov_M_AX_IMM()
2509 store_data_word(offset, M.x86.R_AX); in x86emuOp_mov_M_AX_IMM()
2533 if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { in x86emuOp_movs_byte()
2536 count = M.x86.R_CX; in x86emuOp_movs_byte()
2537 M.x86.R_CX = 0; in x86emuOp_movs_byte()
2538 M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); in x86emuOp_movs_byte()
2541 val = fetch_data_byte(M.x86.R_SI); in x86emuOp_movs_byte()
2542 store_data_byte_abs(M.x86.R_ES, M.x86.R_DI, val); in x86emuOp_movs_byte()
2543 M.x86.R_SI += inc; in x86emuOp_movs_byte()
2544 M.x86.R_DI += inc; in x86emuOp_movs_byte()
2561 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_movs_word()
2576 if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { in x86emuOp_movs_word()
2579 count = M.x86.R_CX; in x86emuOp_movs_word()
2580 M.x86.R_CX = 0; in x86emuOp_movs_word()
2581 M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); in x86emuOp_movs_word()
2584 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_movs_word()
2585 val = fetch_data_long(M.x86.R_SI); in x86emuOp_movs_word()
2586 store_data_long_abs(M.x86.R_ES, M.x86.R_DI, val); in x86emuOp_movs_word()
2588 val = fetch_data_word(M.x86.R_SI); in x86emuOp_movs_word()
2589 store_data_word_abs(M.x86.R_ES, M.x86.R_DI, (u16)val); in x86emuOp_movs_word()
2591 M.x86.R_SI += inc; in x86emuOp_movs_word()
2592 M.x86.R_DI += inc; in x86emuOp_movs_word()
2615 if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { in x86emuOp_cmps_byte()
2618 while (M.x86.R_CX != 0) { in x86emuOp_cmps_byte()
2619 val1 = fetch_data_byte(M.x86.R_SI); in x86emuOp_cmps_byte()
2620 val2 = fetch_data_byte_abs(M.x86.R_ES, M.x86.R_DI); in x86emuOp_cmps_byte()
2622 M.x86.R_CX -= 1; in x86emuOp_cmps_byte()
2623 M.x86.R_SI += inc; in x86emuOp_cmps_byte()
2624 M.x86.R_DI += inc; in x86emuOp_cmps_byte()
2625 if ( (M.x86.mode & SYSMODE_PREFIX_REPE) && (ACCESS_FLAG(F_ZF) == 0) ) break; in x86emuOp_cmps_byte()
2626 if ( (M.x86.mode & SYSMODE_PREFIX_REPNE) && ACCESS_FLAG(F_ZF) ) break; in x86emuOp_cmps_byte()
2628 M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); in x86emuOp_cmps_byte()
2630 val1 = fetch_data_byte(M.x86.R_SI); in x86emuOp_cmps_byte()
2631 val2 = fetch_data_byte_abs(M.x86.R_ES, M.x86.R_DI); in x86emuOp_cmps_byte()
2633 M.x86.R_SI += inc; in x86emuOp_cmps_byte()
2634 M.x86.R_DI += inc; in x86emuOp_cmps_byte()
2650 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_cmps_word()
2661 if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { in x86emuOp_cmps_word()
2664 while (M.x86.R_CX != 0) { in x86emuOp_cmps_word()
2665 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_cmps_word()
2666 val1 = fetch_data_long(M.x86.R_SI); in x86emuOp_cmps_word()
2667 val2 = fetch_data_long_abs(M.x86.R_ES, M.x86.R_DI); in x86emuOp_cmps_word()
2670 val1 = fetch_data_word(M.x86.R_SI); in x86emuOp_cmps_word()
2671 val2 = fetch_data_word_abs(M.x86.R_ES, M.x86.R_DI); in x86emuOp_cmps_word()
2674 M.x86.R_CX -= 1; in x86emuOp_cmps_word()
2675 M.x86.R_SI += inc; in x86emuOp_cmps_word()
2676 M.x86.R_DI += inc; in x86emuOp_cmps_word()
2677 if ( (M.x86.mode & SYSMODE_PREFIX_REPE) && ACCESS_FLAG(F_ZF) == 0 ) break; in x86emuOp_cmps_word()
2678 if ( (M.x86.mode & SYSMODE_PREFIX_REPNE) && ACCESS_FLAG(F_ZF) ) break; in x86emuOp_cmps_word()
2680 M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); in x86emuOp_cmps_word()
2682 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_cmps_word()
2683 val1 = fetch_data_long(M.x86.R_SI); in x86emuOp_cmps_word()
2684 val2 = fetch_data_long_abs(M.x86.R_ES, M.x86.R_DI); in x86emuOp_cmps_word()
2687 val1 = fetch_data_word(M.x86.R_SI); in x86emuOp_cmps_word()
2688 val2 = fetch_data_word_abs(M.x86.R_ES, M.x86.R_DI); in x86emuOp_cmps_word()
2691 M.x86.R_SI += inc; in x86emuOp_cmps_word()
2692 M.x86.R_DI += inc; in x86emuOp_cmps_word()
2711 test_byte(M.x86.R_AL, (u8)imm); in x86emuOp_test_AL_IMM()
2725 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_test_AX_IMM()
2734 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_test_AX_IMM()
2735 test_long(M.x86.R_EAX, srcval); in x86emuOp_test_AX_IMM()
2737 test_word(M.x86.R_AX, (u16)srcval); in x86emuOp_test_AX_IMM()
2758 if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { in x86emuOp_stos_byte()
2761 while (M.x86.R_CX != 0) { in x86emuOp_stos_byte()
2762 store_data_byte_abs(M.x86.R_ES, M.x86.R_DI, M.x86.R_AL); in x86emuOp_stos_byte()
2763 M.x86.R_CX -= 1; in x86emuOp_stos_byte()
2764 M.x86.R_DI += inc; in x86emuOp_stos_byte()
2766 M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); in x86emuOp_stos_byte()
2768 store_data_byte_abs(M.x86.R_ES, M.x86.R_DI, M.x86.R_AL); in x86emuOp_stos_byte()
2769 M.x86.R_DI += inc; in x86emuOp_stos_byte()
2785 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_stos_word()
2800 if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { in x86emuOp_stos_word()
2803 count = M.x86.R_CX; in x86emuOp_stos_word()
2804 M.x86.R_CX = 0; in x86emuOp_stos_word()
2805 M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); in x86emuOp_stos_word()
2808 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_stos_word()
2809 store_data_long_abs(M.x86.R_ES, M.x86.R_DI, M.x86.R_EAX); in x86emuOp_stos_word()
2811 store_data_word_abs(M.x86.R_ES, M.x86.R_DI, M.x86.R_AX); in x86emuOp_stos_word()
2813 M.x86.R_DI += inc; in x86emuOp_stos_word()
2834 if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { in x86emuOp_lods_byte()
2837 while (M.x86.R_CX != 0) { in x86emuOp_lods_byte()
2838 M.x86.R_AL = fetch_data_byte(M.x86.R_SI); in x86emuOp_lods_byte()
2839 M.x86.R_CX -= 1; in x86emuOp_lods_byte()
2840 M.x86.R_SI += inc; in x86emuOp_lods_byte()
2842 M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); in x86emuOp_lods_byte()
2844 M.x86.R_AL = fetch_data_byte(M.x86.R_SI); in x86emuOp_lods_byte()
2845 M.x86.R_SI += inc; in x86emuOp_lods_byte()
2861 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_lods_word()
2876 if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { in x86emuOp_lods_word()
2879 count = M.x86.R_CX; in x86emuOp_lods_word()
2880 M.x86.R_CX = 0; in x86emuOp_lods_word()
2881 M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); in x86emuOp_lods_word()
2884 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_lods_word()
2885 M.x86.R_EAX = fetch_data_long(M.x86.R_SI); in x86emuOp_lods_word()
2887 M.x86.R_AX = fetch_data_word(M.x86.R_SI); in x86emuOp_lods_word()
2889 M.x86.R_SI += inc; in x86emuOp_lods_word()
2911 if (M.x86.mode & SYSMODE_PREFIX_REPE) { in x86emuOp_scas_byte()
2914 while (M.x86.R_CX != 0) { in x86emuOp_scas_byte()
2915 val2 = fetch_data_byte_abs(M.x86.R_ES, M.x86.R_DI); in x86emuOp_scas_byte()
2916 cmp_byte(M.x86.R_AL, val2); in x86emuOp_scas_byte()
2917 M.x86.R_CX -= 1; in x86emuOp_scas_byte()
2918 M.x86.R_DI += inc; in x86emuOp_scas_byte()
2922 M.x86.mode &= ~SYSMODE_PREFIX_REPE; in x86emuOp_scas_byte()
2923 } else if (M.x86.mode & SYSMODE_PREFIX_REPNE) { in x86emuOp_scas_byte()
2926 while (M.x86.R_CX != 0) { in x86emuOp_scas_byte()
2927 val2 = fetch_data_byte_abs(M.x86.R_ES, M.x86.R_DI); in x86emuOp_scas_byte()
2928 cmp_byte(M.x86.R_AL, val2); in x86emuOp_scas_byte()
2929 M.x86.R_CX -= 1; in x86emuOp_scas_byte()
2930 M.x86.R_DI += inc; in x86emuOp_scas_byte()
2934 M.x86.mode &= ~SYSMODE_PREFIX_REPNE; in x86emuOp_scas_byte()
2936 val2 = fetch_data_byte_abs(M.x86.R_ES, M.x86.R_DI); in x86emuOp_scas_byte()
2937 cmp_byte(M.x86.R_AL, val2); in x86emuOp_scas_byte()
2938 M.x86.R_DI += inc; in x86emuOp_scas_byte()
2954 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_scas_word()
2968 if (M.x86.mode & SYSMODE_PREFIX_REPE) { in x86emuOp_scas_word()
2971 while (M.x86.R_CX != 0) { in x86emuOp_scas_word()
2972 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_scas_word()
2973 val = fetch_data_long_abs(M.x86.R_ES, M.x86.R_DI); in x86emuOp_scas_word()
2974 cmp_long(M.x86.R_EAX, val); in x86emuOp_scas_word()
2976 val = fetch_data_word_abs(M.x86.R_ES, M.x86.R_DI); in x86emuOp_scas_word()
2977 cmp_word(M.x86.R_AX, (u16)val); in x86emuOp_scas_word()
2979 M.x86.R_CX -= 1; in x86emuOp_scas_word()
2980 M.x86.R_DI += inc; in x86emuOp_scas_word()
2984 M.x86.mode &= ~SYSMODE_PREFIX_REPE; in x86emuOp_scas_word()
2985 } else if (M.x86.mode & SYSMODE_PREFIX_REPNE) { in x86emuOp_scas_word()
2988 while (M.x86.R_CX != 0) { in x86emuOp_scas_word()
2989 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_scas_word()
2990 val = fetch_data_long_abs(M.x86.R_ES, M.x86.R_DI); in x86emuOp_scas_word()
2991 cmp_long(M.x86.R_EAX, val); in x86emuOp_scas_word()
2993 val = fetch_data_word_abs(M.x86.R_ES, M.x86.R_DI); in x86emuOp_scas_word()
2994 cmp_word(M.x86.R_AX, (u16)val); in x86emuOp_scas_word()
2996 M.x86.R_CX -= 1; in x86emuOp_scas_word()
2997 M.x86.R_DI += inc; in x86emuOp_scas_word()
3001 M.x86.mode &= ~SYSMODE_PREFIX_REPNE; in x86emuOp_scas_word()
3003 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_scas_word()
3004 val = fetch_data_long_abs(M.x86.R_ES, M.x86.R_DI); in x86emuOp_scas_word()
3005 cmp_long(M.x86.R_EAX, val); in x86emuOp_scas_word()
3007 val = fetch_data_word_abs(M.x86.R_ES, M.x86.R_DI); in x86emuOp_scas_word()
3008 cmp_word(M.x86.R_AX, (u16)val); in x86emuOp_scas_word()
3010 M.x86.R_DI += inc; in x86emuOp_scas_word()
3048 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_mov_word_register_IMM()
3199 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcC1_word_RM_MEM()
3223 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcC1_word_RM_MEM()
3257 RETURN_TRACE("RET",M.x86.saved_cs,M.x86.saved_ip); in x86emuOp_ret_near_IMM()
3259 M.x86.R_IP = pop_word(); in x86emuOp_ret_near_IMM()
3260 M.x86.R_SP += imm; in x86emuOp_ret_near_IMM()
3273 RETURN_TRACE("RET",M.x86.saved_cs,M.x86.saved_ip); in x86emuOp_ret_near()
3275 M.x86.R_IP = pop_word(); in x86emuOp_ret_near()
3300 M.x86.R_ES = fetch_data_word(srcoffset + 2); in x86emuOp_les_R_IMM()
3328 M.x86.R_DS = fetch_data_word(srcoffset + 2); in x86emuOp_lds_R_IMM()
3388 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_mov_word_RM_IMM()
3408 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_mov_word_RM_IMM()
3448 push_word(M.x86.R_BP); in x86emuOp_enter()
3449 frame_pointer = M.x86.R_SP; in x86emuOp_enter()
3452 M.x86.R_BP -= 2; in x86emuOp_enter()
3453 push_word(fetch_data_word_abs(M.x86.R_SS, M.x86.R_BP)); in x86emuOp_enter()
3457 M.x86.R_BP = frame_pointer; in x86emuOp_enter()
3458 M.x86.R_SP = (u16)(M.x86.R_SP - local); in x86emuOp_enter()
3472 M.x86.R_SP = M.x86.R_BP; in x86emuOp_leave()
3473 M.x86.R_BP = pop_word(); in x86emuOp_leave()
3490 RETURN_TRACE("RETF",M.x86.saved_cs,M.x86.saved_ip); in x86emuOp_ret_far_IMM()
3492 M.x86.R_IP = pop_word(); in x86emuOp_ret_far_IMM()
3493 M.x86.R_CS = pop_word(); in x86emuOp_ret_far_IMM()
3494 M.x86.R_SP += imm; in x86emuOp_ret_far_IMM()
3507 RETURN_TRACE("RETF",M.x86.saved_cs,M.x86.saved_ip); in x86emuOp_ret_far()
3509 M.x86.R_IP = pop_word(); in x86emuOp_ret_far()
3510 M.x86.R_CS = pop_word(); in x86emuOp_ret_far()
3529 push_word((u16)M.x86.R_FLG); in x86emuOp_int3()
3532 push_word(M.x86.R_CS); in x86emuOp_int3()
3533 M.x86.R_CS = mem_access_word(3 * 4 + 2); in x86emuOp_int3()
3534 push_word(M.x86.R_IP); in x86emuOp_int3()
3535 M.x86.R_IP = mem_access_word(3 * 4); in x86emuOp_int3()
3558 push_word((u16)M.x86.R_FLG); in x86emuOp_int_IMM()
3561 push_word(M.x86.R_CS); in x86emuOp_int_IMM()
3562 M.x86.R_CS = mem_access_word(intnum * 4 + 2); in x86emuOp_int_IMM()
3563 push_word(M.x86.R_IP); in x86emuOp_int_IMM()
3564 M.x86.R_IP = mem_access_word(intnum * 4); in x86emuOp_int_IMM()
3584 push_word((u16)M.x86.R_FLG); in x86emuOp_into()
3587 push_word(M.x86.R_CS); in x86emuOp_into()
3588 M.x86.R_CS = mem_access_word(4 * 4 + 2); in x86emuOp_into()
3589 push_word(M.x86.R_IP); in x86emuOp_into()
3590 M.x86.R_IP = mem_access_word(4 * 4); in x86emuOp_into()
3608 M.x86.R_IP = pop_word(); in x86emuOp_iret()
3609 M.x86.R_CS = pop_word(); in x86emuOp_iret()
3610 M.x86.R_FLG = pop_word(); in x86emuOp_iret()
3741 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcD1_word_RM_1()
3763 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcD1_word_RM_1()
3842 amt = M.x86.R_CL; in x86emuOp_opcD2_byte_RM_CL()
3915 amt = M.x86.R_CL; in x86emuOp_opcD3_word_RM_CL()
3917 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcD3_word_RM_CL()
3939 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcD3_word_RM_CL()
3977 M.x86.R_AX = aam_word(M.x86.R_AL); in x86emuOp_aam()
3992 M.x86.R_AX = aad_word(M.x86.R_AX); in x86emuOp_aad()
4010 addr = (u16)(M.x86.R_BX + (u8)M.x86.R_AL); in x86emuOp_xlat()
4011 M.x86.R_AL = fetch_data_byte(addr); in x86emuOp_xlat()
4029 ip += (s16) M.x86.R_IP; in x86emuOp_loopne()
4032 M.x86.R_CX -= 1; in x86emuOp_loopne()
4033 if (M.x86.R_CX != 0 && !ACCESS_FLAG(F_ZF)) /* CX != 0 and !ZF */ in x86emuOp_loopne()
4034 M.x86.R_IP = ip; in x86emuOp_loopne()
4050 ip += (s16) M.x86.R_IP; in x86emuOp_loope()
4053 M.x86.R_CX -= 1; in x86emuOp_loope()
4054 if (M.x86.R_CX != 0 && ACCESS_FLAG(F_ZF)) /* CX != 0 and ZF */ in x86emuOp_loope()
4055 M.x86.R_IP = ip; in x86emuOp_loope()
4071 ip += (s16) M.x86.R_IP; in x86emuOp_loop()
4074 M.x86.R_CX -= 1; in x86emuOp_loop()
4075 if (M.x86.R_CX != 0) in x86emuOp_loop()
4076 M.x86.R_IP = ip; in x86emuOp_loop()
4094 target = (u16)(M.x86.R_IP + offset); in x86emuOp_jcxz()
4097 if (M.x86.R_CX == 0) in x86emuOp_jcxz()
4098 M.x86.R_IP = target; in x86emuOp_jcxz()
4116 M.x86.R_AL = (*sys_inb)(port); in x86emuOp_in_byte_AL_IMM()
4132 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_in_word_AX_IMM()
4138 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_in_word_AX_IMM()
4139 M.x86.R_EAX = (*sys_inl)(port); in x86emuOp_in_word_AX_IMM()
4141 M.x86.R_AX = (*sys_inw)(port); in x86emuOp_in_word_AX_IMM()
4160 (*sys_outb)(port, M.x86.R_AL); in x86emuOp_out_byte_IMM_AL()
4176 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_out_word_IMM_AX()
4182 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_out_word_IMM_AX()
4183 (*sys_outl)(port, M.x86.R_EAX); in x86emuOp_out_word_IMM_AX()
4185 (*sys_outw)(port, M.x86.R_AX); in x86emuOp_out_word_IMM_AX()
4202 ip += (s16) M.x86.R_IP; /* CHECK SIGN */ in x86emuOp_call_near_IMM()
4204 CALL_TRACE(M.x86.saved_cs, M.x86.saved_ip, M.x86.R_CS, ip, ""); in x86emuOp_call_near_IMM()
4206 push_word(M.x86.R_IP); in x86emuOp_call_near_IMM()
4207 M.x86.R_IP = ip; in x86emuOp_call_near_IMM()
4223 ip += (s16)M.x86.R_IP; in x86emuOp_jump_near_IMM()
4226 M.x86.R_IP = (u16)ip; in x86emuOp_jump_near_IMM()
4246 M.x86.R_IP = ip; in x86emuOp_jump_far_IMM()
4247 M.x86.R_CS = cs; in x86emuOp_jump_far_IMM()
4264 target = (u16)(M.x86.R_IP + offset); in x86emuOp_jump_byte_IMM()
4267 M.x86.R_IP = target; in x86emuOp_jump_byte_IMM()
4281 M.x86.R_AL = (*sys_inb)(M.x86.R_DX); in x86emuOp_in_byte_AL_DX()
4293 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_in_word_AX_DX()
4299 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_in_word_AX_DX()
4300 M.x86.R_EAX = (*sys_inl)(M.x86.R_DX); in x86emuOp_in_word_AX_DX()
4302 M.x86.R_AX = (*sys_inw)(M.x86.R_DX); in x86emuOp_in_word_AX_DX()
4317 (*sys_outb)(M.x86.R_DX, M.x86.R_AL); in x86emuOp_out_byte_DX_AL()
4329 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_out_word_DX_AX()
4335 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_out_word_DX_AX()
4336 (*sys_outl)(M.x86.R_DX, M.x86.R_EAX); in x86emuOp_out_word_DX_AX()
4338 (*sys_outw)(M.x86.R_DX, M.x86.R_AX); in x86emuOp_out_word_DX_AX()
4368 M.x86.mode |= SYSMODE_PREFIX_REPNE; in x86emuOp_repne()
4382 M.x86.mode |= SYSMODE_PREFIX_REPE; in x86emuOp_repe()
4546 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcF7_word_RM()
4654 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcF7_word_RM()
4935 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcFF_word_RM()
4942 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcFF_word_RM()
4975 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcFF_word_RM()
4992 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcFF_word_RM()
5011 push_word(M.x86.R_IP); in x86emuOp_opcFF_word_RM()
5012 M.x86.R_IP = destval; in x86emuOp_opcFF_word_RM()
5018 push_word(M.x86.R_CS); in x86emuOp_opcFF_word_RM()
5019 M.x86.R_CS = destval2; in x86emuOp_opcFF_word_RM()
5020 push_word(M.x86.R_IP); in x86emuOp_opcFF_word_RM()
5021 M.x86.R_IP = destval; in x86emuOp_opcFF_word_RM()
5026 M.x86.R_IP = destval; in x86emuOp_opcFF_word_RM()
5032 M.x86.R_IP = destval; in x86emuOp_opcFF_word_RM()
5033 M.x86.R_CS = destval2; in x86emuOp_opcFF_word_RM()
5036 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcFF_word_RM()
5054 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcFF_word_RM()
5071 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcFF_word_RM()
5091 push_word(M.x86.R_IP); in x86emuOp_opcFF_word_RM()
5092 M.x86.R_IP = *destreg; in x86emuOp_opcFF_word_RM()
5104 M.x86.R_IP = (u16) (*destreg); in x86emuOp_opcFF_word_RM()
5112 if (M.x86.mode & SYSMODE_PREFIX_DATA) { in x86emuOp_opcFF_word_RM()