Lines Matching refs:x86
52 if (M.x86.intr & INTR_SYNCH) { in x86emu_intr_handle()
53 intno = M.x86.intno; in x86emu_intr_handle()
57 push_word((u16)M.x86.R_FLG); in x86emu_intr_handle()
60 push_word(M.x86.R_CS); in x86emu_intr_handle()
61 M.x86.R_CS = mem_access_word(intno * 4 + 2); in x86emu_intr_handle()
62 push_word(M.x86.R_IP); in x86emu_intr_handle()
63 M.x86.R_IP = mem_access_word(intno * 4); in x86emu_intr_handle()
64 M.x86.intr = 0; in x86emu_intr_handle()
80 M.x86.intno = intrnum; in x86emu_intr_raise()
81 M.x86.intr |= INTR_SYNCH; in x86emu_intr_raise()
94 M.x86.intr = 0; in X86EMU_exec()
101 SAVE_IP_CS(M.x86.R_CS, M.x86.R_IP); in X86EMU_exec()
103 if (M.x86.intr) { in X86EMU_exec()
104 if (M.x86.intr & INTR_HALTED) { in X86EMU_exec()
105 DB( if (M.x86.R_SP != 0) { in X86EMU_exec()
110 if (M.x86.debug) in X86EMU_exec()
115 if (((M.x86.intr & INTR_SYNCH) && (M.x86.intno == 0 || M.x86.intno == 2)) || in X86EMU_exec()
120 op1 = (*sys_rdb)(((u32)M.x86.R_CS << 4) + (M.x86.R_IP++)); in X86EMU_exec()
122 if (M.x86.debug & DEBUG_EXIT) { in X86EMU_exec()
123 M.x86.debug &= ~DEBUG_EXIT; in X86EMU_exec()
135 M.x86.intr |= INTR_HALTED; in X86EMU_halt_sys()
159 fetched = (*sys_rdb)(((u32)M.x86.R_CS << 4) + (M.x86.R_IP++)); in fetch_decode_modrm()
182 fetched = (*sys_rdb)(((u32)M.x86.R_CS << 4) + (M.x86.R_IP++)); in fetch_byte_imm()
203 fetched = (*sys_rdw)(((u32)M.x86.R_CS << 4) + (M.x86.R_IP)); in fetch_word_imm()
204 M.x86.R_IP += 2; in fetch_word_imm()
225 fetched = (*sys_rdl)(((u32)M.x86.R_CS << 4) + (M.x86.R_IP)); in fetch_long_imm()
226 M.x86.R_IP += 4; in fetch_long_imm()
263 switch (M.x86.mode & SYSMODE_SEGMASK) { in get_data_segment()
267 return M.x86.R_DS; in get_data_segment()
269 return M.x86.R_SS; in get_data_segment()
272 return M.x86.R_CS; in get_data_segment()
275 return M.x86.R_ES; in get_data_segment()
278 return M.x86.R_FS; in get_data_segment()
281 return M.x86.R_GS; in get_data_segment()
284 return M.x86.R_SS; in get_data_segment()
566 return &M.x86.R_AL; in decode_rm_byte_register()
569 return &M.x86.R_CL; in decode_rm_byte_register()
572 return &M.x86.R_DL; in decode_rm_byte_register()
575 return &M.x86.R_BL; in decode_rm_byte_register()
578 return &M.x86.R_AH; in decode_rm_byte_register()
581 return &M.x86.R_CH; in decode_rm_byte_register()
584 return &M.x86.R_DH; in decode_rm_byte_register()
587 return &M.x86.R_BH; in decode_rm_byte_register()
610 return &M.x86.R_AX; in decode_rm_word_register()
613 return &M.x86.R_CX; in decode_rm_word_register()
616 return &M.x86.R_DX; in decode_rm_word_register()
619 return &M.x86.R_BX; in decode_rm_word_register()
622 return &M.x86.R_SP; in decode_rm_word_register()
625 return &M.x86.R_BP; in decode_rm_word_register()
628 return &M.x86.R_SI; in decode_rm_word_register()
631 return &M.x86.R_DI; in decode_rm_word_register()
654 return &M.x86.R_EAX; in decode_rm_long_register()
657 return &M.x86.R_ECX; in decode_rm_long_register()
660 return &M.x86.R_EDX; in decode_rm_long_register()
663 return &M.x86.R_EBX; in decode_rm_long_register()
666 return &M.x86.R_ESP; in decode_rm_long_register()
669 return &M.x86.R_EBP; in decode_rm_long_register()
672 return &M.x86.R_ESI; in decode_rm_long_register()
675 return &M.x86.R_EDI; in decode_rm_long_register()
699 return &M.x86.R_ES; in decode_rm_seg_register()
702 return &M.x86.R_CS; in decode_rm_seg_register()
705 return &M.x86.R_SS; in decode_rm_seg_register()
708 return &M.x86.R_DS; in decode_rm_seg_register()
711 return &M.x86.R_FS; in decode_rm_seg_register()
714 return &M.x86.R_GS; in decode_rm_seg_register()
749 return M.x86.R_EAX * index; in decode_sib_si()
752 return M.x86.R_ECX * index; in decode_sib_si()
755 return M.x86.R_EDX * index; in decode_sib_si()
758 return M.x86.R_EBX * index; in decode_sib_si()
764 return M.x86.R_EBP * index; in decode_sib_si()
767 return M.x86.R_ESI * index; in decode_sib_si()
770 return M.x86.R_EDI * index; in decode_sib_si()
799 offset = M.x86.R_EAX; in decode_sib_address()
803 offset = M.x86.R_ECX; in decode_sib_address()
807 offset = M.x86.R_EDX; in decode_sib_address()
811 offset = M.x86.R_EBX; in decode_sib_address()
815 offset = M.x86.R_ESP; in decode_sib_address()
827 offset = M.x86.R_EBP + displacement; in decode_sib_address()
832 offset = M.x86.R_EBP + displacement; in decode_sib_address()
838 offset = M.x86.R_EAX; in decode_sib_address()
842 offset = M.x86.R_ESI; in decode_sib_address()
846 offset = M.x86.R_EDI; in decode_sib_address()
881 if (M.x86.mode & SYSMODE_PREFIX_ADDR) { in decode_rm00_address()
886 return M.x86.R_EAX; in decode_rm00_address()
889 return M.x86.R_ECX; in decode_rm00_address()
892 return M.x86.R_EDX; in decode_rm00_address()
895 return M.x86.R_EBX; in decode_rm00_address()
904 return M.x86.R_ESI; in decode_rm00_address()
907 return M.x86.R_EDI; in decode_rm00_address()
914 return (M.x86.R_BX + M.x86.R_SI) & 0xffff; in decode_rm00_address()
917 return (M.x86.R_BX + M.x86.R_DI) & 0xffff; in decode_rm00_address()
920 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm00_address()
921 return (M.x86.R_BP + M.x86.R_SI) & 0xffff; in decode_rm00_address()
924 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm00_address()
925 return (M.x86.R_BP + M.x86.R_DI) & 0xffff; in decode_rm00_address()
928 return M.x86.R_SI; in decode_rm00_address()
931 return M.x86.R_DI; in decode_rm00_address()
938 return M.x86.R_BX; in decode_rm00_address()
961 if (M.x86.mode & SYSMODE_PREFIX_ADDR) { in decode_rm01_address()
971 return M.x86.R_EAX + displacement; in decode_rm01_address()
974 return M.x86.R_ECX + displacement; in decode_rm01_address()
977 return M.x86.R_EDX + displacement; in decode_rm01_address()
980 return M.x86.R_EBX + displacement; in decode_rm01_address()
989 return M.x86.R_EBP + displacement; in decode_rm01_address()
992 return M.x86.R_ESI + displacement; in decode_rm01_address()
995 return M.x86.R_EDI + displacement; in decode_rm01_address()
1003 return (M.x86.R_BX + M.x86.R_SI + displacement) & 0xffff; in decode_rm01_address()
1006 return (M.x86.R_BX + M.x86.R_DI + displacement) & 0xffff; in decode_rm01_address()
1009 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm01_address()
1010 return (M.x86.R_BP + M.x86.R_SI + displacement) & 0xffff; in decode_rm01_address()
1013 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm01_address()
1014 return (M.x86.R_BP + M.x86.R_DI + displacement) & 0xffff; in decode_rm01_address()
1017 return (M.x86.R_SI + displacement) & 0xffff; in decode_rm01_address()
1020 return (M.x86.R_DI + displacement) & 0xffff; in decode_rm01_address()
1023 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm01_address()
1024 return (M.x86.R_BP + displacement) & 0xffff; in decode_rm01_address()
1027 return (M.x86.R_BX + displacement) & 0xffff; in decode_rm01_address()
1048 if (M.x86.mode & SYSMODE_PREFIX_ADDR) { in decode_rm10_address()
1060 return M.x86.R_EAX + displacement; in decode_rm10_address()
1063 return M.x86.R_ECX + displacement; in decode_rm10_address()
1066 return M.x86.R_EDX + displacement; in decode_rm10_address()
1069 return M.x86.R_EBX + displacement; in decode_rm10_address()
1078 return M.x86.R_EBP + displacement; in decode_rm10_address()
1081 return M.x86.R_ESI + displacement; in decode_rm10_address()
1084 return M.x86.R_EDI + displacement; in decode_rm10_address()
1093 return (M.x86.R_BX + M.x86.R_SI + displacement) & 0xffff; in decode_rm10_address()
1096 return (M.x86.R_BX + M.x86.R_DI + displacement) & 0xffff; in decode_rm10_address()
1099 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm10_address()
1100 return (M.x86.R_BP + M.x86.R_SI + displacement) & 0xffff; in decode_rm10_address()
1103 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm10_address()
1104 return (M.x86.R_BP + M.x86.R_DI + displacement) & 0xffff; in decode_rm10_address()
1107 return (M.x86.R_SI + displacement) & 0xffff; in decode_rm10_address()
1110 return (M.x86.R_DI + displacement) & 0xffff; in decode_rm10_address()
1113 M.x86.mode |= SYSMODE_SEG_DS_SS; in decode_rm10_address()
1114 return (M.x86.R_BP + displacement) & 0xffff; in decode_rm10_address()
1117 return (M.x86.R_BX + displacement) & 0xffff; in decode_rm10_address()