Lines Matching refs:M

64     if (M.x86.intr & INTR_SYNCH) {  in x86emu_intr_handle()
65 intno = M.x86.intno; in x86emu_intr_handle()
70 push_word((u16) M.x86.R_FLG); in x86emu_intr_handle()
73 push_word(M.x86.R_CS); in x86emu_intr_handle()
74 M.x86.R_CS = mem_access_word(intno * 4 + 2); in x86emu_intr_handle()
75 push_word(M.x86.R_IP); in x86emu_intr_handle()
76 M.x86.R_IP = mem_access_word(intno * 4); in x86emu_intr_handle()
77 M.x86.intr = 0; in x86emu_intr_handle()
93 M.x86.intno = intrnum; in x86emu_intr_raise()
94 M.x86.intr |= INTR_SYNCH; in x86emu_intr_raise()
108 M.x86.intr = 0; in X86EMU_exec()
116 SAVE_IP_CS(M.x86.R_CS, M.x86.R_IP); in X86EMU_exec()
118 if (M.x86.intr) { in X86EMU_exec()
119 if (M.x86.intr & INTR_HALTED) { in X86EMU_exec()
120 DB(if (M.x86.R_SP != 0) { in X86EMU_exec()
123 if (M.x86.debug) in X86EMU_exec()
128 if (((M.x86.intr & INTR_SYNCH) && in X86EMU_exec()
129 (M.x86.intno == 0 || M.x86.intno == 2)) || in X86EMU_exec()
134 op1 = (*sys_rdb) (((u32) M.x86.R_CS << 4) + (M.x86.R_IP++)); in X86EMU_exec()
136 if (M.x86.debug & DEBUG_EXIT) { in X86EMU_exec()
137 M.x86.debug &= ~DEBUG_EXIT; in X86EMU_exec()
150 M.x86.intr |= INTR_HALTED; in X86EMU_halt_sys()
172 fetched = (*sys_rdb) (((u32) M.x86.R_CS << 4) + (M.x86.R_IP++)); in fetch_decode_modrm()
196 fetched = (*sys_rdb) (((u32) M.x86.R_CS << 4) + (M.x86.R_IP++)); in fetch_byte_imm()
218 fetched = (*sys_rdw) (((u32) M.x86.R_CS << 4) + (M.x86.R_IP)); in fetch_word_imm()
219 M.x86.R_IP += 2; in fetch_word_imm()
241 fetched = (*sys_rdl) (((u32) M.x86.R_CS << 4) + (M.x86.R_IP)); in fetch_long_imm()
242 M.x86.R_IP += 4; in fetch_long_imm()
280 switch (M.x86.mode & SYSMODE_SEGMASK) { in get_data_segment()
284 return M.x86.R_DS; in get_data_segment()
286 return M.x86.R_SS; in get_data_segment()
289 return M.x86.R_CS; in get_data_segment()
292 return M.x86.R_ES; in get_data_segment()
295 return M.x86.R_FS; in get_data_segment()
298 return M.x86.R_GS; in get_data_segment()
301 return M.x86.R_SS; in get_data_segment()
571 return &M.x86.R_AL; in decode_rm_byte_register()
574 return &M.x86.R_CL; in decode_rm_byte_register()
577 return &M.x86.R_DL; in decode_rm_byte_register()
580 return &M.x86.R_BL; in decode_rm_byte_register()
583 return &M.x86.R_AH; in decode_rm_byte_register()
586 return &M.x86.R_CH; in decode_rm_byte_register()
589 return &M.x86.R_DH; in decode_rm_byte_register()
592 return &M.x86.R_BH; in decode_rm_byte_register()
615 return &M.x86.R_AX; in decode_rm_word_register()
618 return &M.x86.R_CX; in decode_rm_word_register()
621 return &M.x86.R_DX; in decode_rm_word_register()
624 return &M.x86.R_BX; in decode_rm_word_register()
627 return &M.x86.R_SP; in decode_rm_word_register()
630 return &M.x86.R_BP; in decode_rm_word_register()
633 return &M.x86.R_SI; in decode_rm_word_register()
636 return &M.x86.R_DI; in decode_rm_word_register()
659 return &M.x86.R_EAX; in decode_rm_long_register()
662 return &M.x86.R_ECX; in decode_rm_long_register()
665 return &M.x86.R_EDX; in decode_rm_long_register()
668 return &M.x86.R_EBX; in decode_rm_long_register()
671 return &M.x86.R_ESP; in decode_rm_long_register()
674 return &M.x86.R_EBP; in decode_rm_long_register()
677 return &M.x86.R_ESI; in decode_rm_long_register()
680 return &M.x86.R_EDI; in decode_rm_long_register()
704 return &M.x86.R_ES; in decode_rm_seg_register()
707 return &M.x86.R_CS; in decode_rm_seg_register()
710 return &M.x86.R_SS; in decode_rm_seg_register()
713 return &M.x86.R_DS; in decode_rm_seg_register()
716 return &M.x86.R_FS; in decode_rm_seg_register()
719 return &M.x86.R_GS; in decode_rm_seg_register()
741 base = M.x86.R_EAX; in decode_sib_address()
745 base = M.x86.R_ECX; in decode_sib_address()
749 base = M.x86.R_EDX; in decode_sib_address()
753 base = M.x86.R_EBX; in decode_sib_address()
757 base = M.x86.R_ESP; in decode_sib_address()
758 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_sib_address()
767 base = M.x86.R_ESP; in decode_sib_address()
768 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_sib_address()
773 base = M.x86.R_ESI; in decode_sib_address()
777 base = M.x86.R_EDI; in decode_sib_address()
783 i = M.x86.R_EAX; in decode_sib_address()
787 i = M.x86.R_ECX; in decode_sib_address()
791 i = M.x86.R_EDX; in decode_sib_address()
795 i = M.x86.R_EBX; in decode_sib_address()
802 i = M.x86.R_EBP; in decode_sib_address()
806 i = M.x86.R_ESI; in decode_sib_address()
810 i = M.x86.R_EDI; in decode_sib_address()
851 if (M.x86.mode & SYSMODE_PREFIX_ADDR) { in decode_rm00_address()
856 return M.x86.R_EAX; in decode_rm00_address()
859 return M.x86.R_ECX; in decode_rm00_address()
862 return M.x86.R_EDX; in decode_rm00_address()
865 return M.x86.R_EBX; in decode_rm00_address()
875 return M.x86.R_ESI; in decode_rm00_address()
878 return M.x86.R_EDI; in decode_rm00_address()
887 return (M.x86.R_BX + M.x86.R_SI) & 0xffff; in decode_rm00_address()
890 return (M.x86.R_BX + M.x86.R_DI) & 0xffff; in decode_rm00_address()
893 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm00_address()
894 return (M.x86.R_BP + M.x86.R_SI) & 0xffff; in decode_rm00_address()
897 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm00_address()
898 return (M.x86.R_BP + M.x86.R_DI) & 0xffff; in decode_rm00_address()
901 return M.x86.R_SI; in decode_rm00_address()
904 return M.x86.R_DI; in decode_rm00_address()
911 return M.x86.R_BX; in decode_rm00_address()
936 if (!((M.x86.mode & SYSMODE_PREFIX_ADDR) && (rm == 4))) in decode_rm01_address()
939 if (M.x86.mode & SYSMODE_PREFIX_ADDR) { in decode_rm01_address()
944 return M.x86.R_EAX + displacement; in decode_rm01_address()
947 return M.x86.R_ECX + displacement; in decode_rm01_address()
950 return M.x86.R_EDX + displacement; in decode_rm01_address()
953 return M.x86.R_EBX + displacement; in decode_rm01_address()
961 return M.x86.R_EBP + displacement; in decode_rm01_address()
964 return M.x86.R_ESI + displacement; in decode_rm01_address()
967 return M.x86.R_EDI + displacement; in decode_rm01_address()
976 return (M.x86.R_BX + M.x86.R_SI + displacement) & 0xffff; in decode_rm01_address()
979 return (M.x86.R_BX + M.x86.R_DI + displacement) & 0xffff; in decode_rm01_address()
982 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm01_address()
983 return (M.x86.R_BP + M.x86.R_SI + displacement) & 0xffff; in decode_rm01_address()
986 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm01_address()
987 return (M.x86.R_BP + M.x86.R_DI + displacement) & 0xffff; in decode_rm01_address()
990 return (M.x86.R_SI + displacement) & 0xffff; in decode_rm01_address()
993 return (M.x86.R_DI + displacement) & 0xffff; in decode_rm01_address()
996 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm01_address()
997 return (M.x86.R_BP + displacement) & 0xffff; in decode_rm01_address()
1000 return (M.x86.R_BX + displacement) & 0xffff; in decode_rm01_address()
1025 if (!(M.x86.mode & SYSMODE_PREFIX_ADDR)) in decode_rm10_address()
1033 if (M.x86.mode & SYSMODE_PREFIX_ADDR) { in decode_rm10_address()
1038 return M.x86.R_EAX + displacement; in decode_rm10_address()
1041 return M.x86.R_ECX + displacement; in decode_rm10_address()
1044 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm10_address()
1045 return M.x86.R_EDX + displacement; in decode_rm10_address()
1048 return M.x86.R_EBX + displacement; in decode_rm10_address()
1057 return M.x86.R_EBP + displacement; in decode_rm10_address()
1060 return M.x86.R_ESI + displacement; in decode_rm10_address()
1063 return M.x86.R_EDI + displacement; in decode_rm10_address()
1072 return (M.x86.R_BX + M.x86.R_SI + displacement) & 0xffff; in decode_rm10_address()
1075 return (M.x86.R_BX + M.x86.R_DI + displacement) & 0xffff; in decode_rm10_address()
1078 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm10_address()
1079 return (M.x86.R_BP + M.x86.R_SI + displacement) & 0xffff; in decode_rm10_address()
1082 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm10_address()
1083 return (M.x86.R_BP + M.x86.R_DI + displacement) & 0xffff; in decode_rm10_address()
1086 return (M.x86.R_SI + displacement) & 0xffff; in decode_rm10_address()
1089 return (M.x86.R_DI + displacement) & 0xffff; in decode_rm10_address()
1092 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm10_address()
1093 return (M.x86.R_BP + displacement) & 0xffff; in decode_rm10_address()
1096 return (M.x86.R_BX + displacement) & 0xffff; in decode_rm10_address()