From 3f32517201d195b0035a72137e3356c787c3e8dd Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Sun, 20 May 2012 18:58:57 +0000 Subject: [PATCH] small fix for save/restore --- bochs/cpu/init.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bochs/cpu/init.cc b/bochs/cpu/init.cc index f77cbe295..e363e9343 100644 --- a/bochs/cpu/init.cc +++ b/bochs/cpu/init.cc @@ -756,6 +756,8 @@ void BX_CPU_C::after_restore_state(void) { handleCpuContextChange(); + BX_CPU_THIS_PTR prev_rip = RIP = 0x00000000; + if (BX_CPU_THIS_PTR cpu_mode == BX_MODE_IA32_REAL) CPL = 0; else { if (BX_CPU_THIS_PTR cpu_mode == BX_MODE_IA32_V8086) CPL = 3;