|
|
| version 1.12, 2004/02/13 15:08:49 | version 1.13, 2004/02/18 20:11:37 |
|---|---|
| Line 643 CALLfar_pm_call_gate_more_privilege(sele | Line 643 CALLfar_pm_call_gate_more_privilege(sele |
| if (CPU_STAT_SS32) { | if (CPU_STAT_SS32) { |
| CPU_ESP = new_esp; | CPU_ESP = new_esp; |
| } else { | } else { |
| CPU_SP = new_esp; | CPU_SP = (WORD)new_esp; |
| } | } |
| load_cs(cs_sel->selector, &cs_sel->desc, cs_sel->desc.dpl); | load_cs(cs_sel->selector, &cs_sel->desc, cs_sel->desc.dpl); |
| Line 673 CALLfar_pm_call_gate_more_privilege(sele | Line 673 CALLfar_pm_call_gate_more_privilege(sele |
| if (CPU_STAT_SS32) { | if (CPU_STAT_SS32) { |
| CPU_ESP = new_esp; | CPU_ESP = new_esp; |
| } else { | } else { |
| CPU_SP = new_esp; | CPU_SP = (WORD)new_esp; |
| } | } |
| load_cs(cs_sel->selector, &cs_sel->desc, cs_sel->desc.dpl); | load_cs(cs_sel->selector, &cs_sel->desc, cs_sel->desc.dpl); |
| Line 863 RETfar_pm(DWORD nbytes) | Line 863 RETfar_pm(DWORD nbytes) |
| if (CPU_STAT_SS32) { | if (CPU_STAT_SS32) { |
| CPU_ESP += nbytes; | CPU_ESP += nbytes; |
| } else { | } else { |
| CPU_SP += nbytes; | CPU_SP += (WORD)nbytes; |
| } | } |
| load_cs(cs_sel.selector, &cs_sel.desc, CPU_STAT_CPL); | load_cs(cs_sel.selector, &cs_sel.desc, CPU_STAT_CPL); |
| Line 933 RETfar_pm(DWORD nbytes) | Line 933 RETfar_pm(DWORD nbytes) |
| if (CPU_STAT_SS32) { | if (CPU_STAT_SS32) { |
| CPU_ESP = new_sp + nbytes; | CPU_ESP = new_sp + nbytes; |
| } else { | } else { |
| CPU_SP = new_sp + nbytes; | CPU_SP = (WORD)(new_sp + nbytes); |
| } | } |
| /* check segment register */ | /* check segment register */ |
| Line 1105 IRET_pm_protected_mode_return(DWORD new_ | Line 1105 IRET_pm_protected_mode_return(DWORD new_ |
| /* PROTECTED-MODE-RETURN */ | /* PROTECTED-MODE-RETURN */ |
| VERBOSE(("IRET_pm: PE=1, VM=0 in flags image")); | VERBOSE(("IRET_pm: PE=1, VM=0 in flags image")); |
| rv = parse_selector(&cs_sel, new_cs); | rv = parse_selector(&cs_sel, (WORD)new_cs); |
| if (rv < 0) { | if (rv < 0) { |
| VERBOSE(("IRET_pm: parse_selector (selector = %04x, rv = %d)", cs_sel.selector, rv)); | VERBOSE(("IRET_pm: parse_selector (selector = %04x, rv = %d)", cs_sel.selector, rv)); |
| EXCEPTION(GP_EXCEPTION, cs_sel.idx); | EXCEPTION(GP_EXCEPTION, cs_sel.idx); |
| Line 1187 IRET_pm_protected_mode_return_same_privi | Line 1187 IRET_pm_protected_mode_return_same_privi |
| if (CPU_STAT_SS32) { | if (CPU_STAT_SS32) { |
| CPU_ESP += stacksize; | CPU_ESP += stacksize; |
| } else { | } else { |
| CPU_SP += stacksize; | CPU_SP += (WORD)stacksize; |
| } | } |
| } | } |
| Line 1288 IRET_pm_protected_mode_return_outer_priv | Line 1288 IRET_pm_protected_mode_return_outer_priv |
| if (CPU_STAT_SS32) { | if (CPU_STAT_SS32) { |
| CPU_ESP = new_sp; | CPU_ESP = new_sp; |
| } else { | } else { |
| CPU_SP = new_sp; | CPU_SP = (WORD)new_sp; |
| } | } |
| /* check segment register */ | /* check segment register */ |
| Line 1339 IRET_pm_return_to_vm86(DWORD new_cs, DWO | Line 1339 IRET_pm_return_to_vm86(DWORD new_cs, DWO |
| segsel[CPU_DS_INDEX] = cpu_vmemoryread_w(CPU_SS_INDEX, sp + 24); | segsel[CPU_DS_INDEX] = cpu_vmemoryread_w(CPU_SS_INDEX, sp + 24); |
| segsel[CPU_FS_INDEX] = cpu_vmemoryread_w(CPU_SS_INDEX, sp + 28); | segsel[CPU_FS_INDEX] = cpu_vmemoryread_w(CPU_SS_INDEX, sp + 28); |
| segsel[CPU_GS_INDEX] = cpu_vmemoryread_w(CPU_SS_INDEX, sp + 32); | segsel[CPU_GS_INDEX] = cpu_vmemoryread_w(CPU_SS_INDEX, sp + 32); |
| segsel[CPU_CS_INDEX] = new_cs; | segsel[CPU_CS_INDEX] = (WORD)new_cs; |
| for (i = 0; i < CPU_SEGREG_NUM; i++) { | for (i = 0; i < CPU_SEGREG_NUM; i++) { |
| CPU_REGS_SREG(i) = segsel[i]; | CPU_REGS_SREG(i) = segsel[i]; |
| Line 1376 IRET_pm_return_from_vm86(DWORD new_cs, D | Line 1376 IRET_pm_return_from_vm86(DWORD new_cs, D |
| if (CPU_STAT_SS32) { | if (CPU_STAT_SS32) { |
| CPU_ESP += stacksize; | CPU_ESP += stacksize; |
| } else { | } else { |
| CPU_SP += stacksize; | CPU_SP += (WORD)stacksize; |
| } | } |
| set_eflags(new_flags, I_FLAG|RF_FLAG); | set_eflags(new_flags, I_FLAG|RF_FLAG); |
| CPU_SET_SEGREG(CPU_CS_INDEX, new_cs); | CPU_SET_SEGREG(CPU_CS_INDEX, (WORD)new_cs); |
| SET_EIP(new_ip); | SET_EIP(new_ip); |
| return; | return; |
| } | } |