aboutsummaryrefslogtreecommitdiff
path: root/helper-i386.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-08-10 21:47:01 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2003-08-10 21:47:01 +0000
commit33417e7025afa5ea1c38c3c2b2ea53d975b5648b (patch)
tree6c4ab68c228ac2eb8ec4a40559629fce57480b51 /helper-i386.c
parent4021dab0594761c939b258cad67275c492b88e4d (diff)
soft mmu support - Memory I/O API - synthetize string instructions
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@354 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'helper-i386.c')
-rw-r--r--helper-i386.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/helper-i386.c b/helper-i386.c
index 0003fb46a1..01046ea091 100644
--- a/helper-i386.c
+++ b/helper-i386.c
@@ -781,7 +781,7 @@ void helper_lcall_real_T0_T1(int shift, int next_eip)
int new_cs, new_eip;
uint32_t esp, esp_mask;
uint8_t *ssp;
-
+
new_cs = T0;
new_eip = T1;
esp = env->regs[R_ESP];
@@ -1741,3 +1741,34 @@ void helper_frstor(uint8_t *ptr, int data32)
}
}
+#define SHIFT 0
+#include "softmmu_template.h"
+
+#define SHIFT 1
+#include "softmmu_template.h"
+
+#define SHIFT 2
+#include "softmmu_template.h"
+
+#define SHIFT 3
+#include "softmmu_template.h"
+
+/* try to fill the TLB and return an exception if error */
+void tlb_fill(unsigned long addr, int is_write, void *retaddr)
+{
+ TranslationBlock *tb;
+ int ret;
+ unsigned long pc;
+ ret = cpu_x86_handle_mmu_fault(env, addr, is_write);
+ if (ret) {
+ /* now we have a real cpu fault */
+ pc = (unsigned long)retaddr;
+ tb = tb_find_pc(pc);
+ if (tb) {
+ /* the PC is inside the translated code. It means that we have
+ a virtual CPU fault */
+ cpu_restore_state(tb, env, pc);
+ }
+ raise_exception_err(EXCP0E_PAGE, env->error_code);
+ }
+}