mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
experimental code copy support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@623 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
3a1d9b8bbb
commit
58fe2f10f0
6 changed files with 1603 additions and 21 deletions
|
@ -24,6 +24,10 @@
|
|||
|
||||
#include "cpu-defs.h"
|
||||
|
||||
#if defined(__i386__) && !defined(CONFIG_SOFTMMU)
|
||||
#define USE_CODE_COPY
|
||||
#endif
|
||||
|
||||
#define R_EAX 0
|
||||
#define R_ECX 1
|
||||
#define R_EDX 2
|
||||
|
@ -121,6 +125,7 @@
|
|||
#define HF_SS32_MASK (1 << HF_SS32_SHIFT)
|
||||
#define HF_ADDSEG_MASK (1 << HF_ADDSEG_SHIFT)
|
||||
#define HF_PE_MASK (1 << HF_PE_SHIFT)
|
||||
#define HF_TF_MASK (1 << HF_TF_SHIFT)
|
||||
|
||||
#define CR0_PE_MASK (1 << 0)
|
||||
#define CR0_TS_MASK (1 << 3)
|
||||
|
@ -297,6 +302,10 @@ typedef struct CPUX86State {
|
|||
uint32_t sysenter_cs;
|
||||
uint32_t sysenter_esp;
|
||||
uint32_t sysenter_eip;
|
||||
|
||||
/* temporary data for USE_CODE_COPY mode */
|
||||
uint32_t tmp0;
|
||||
uint32_t saved_esp;
|
||||
|
||||
/* exception/interrupt handling */
|
||||
jmp_buf jmp_env;
|
||||
|
|
|
@ -869,7 +869,7 @@ void do_interrupt(int intno, int is_int, int error_code,
|
|||
{
|
||||
extern FILE *stdout;
|
||||
static int count;
|
||||
if (env->cr[0] & CR0_PE_MASK) {
|
||||
if (env->cr[0] & CR0_PE_MASK) {
|
||||
fprintf(stdout, "%d: v=%02x e=%04x i=%d CPL=%d CS:EIP=%04x:%08x SS:ESP=%04x:%08x",
|
||||
count, intno, error_code, is_int,
|
||||
env->hflags & HF_CPL_MASK,
|
||||
|
@ -2489,7 +2489,7 @@ void tlb_fill(unsigned long addr, int is_write, int is_user, void *retaddr)
|
|||
if (tb) {
|
||||
/* the PC is inside the translated code. It means that we have
|
||||
a virtual CPU fault */
|
||||
cpu_restore_state(tb, env, pc);
|
||||
cpu_restore_state(tb, env, pc, NULL);
|
||||
}
|
||||
}
|
||||
raise_exception_err(EXCP0E_PAGE, env->error_code);
|
||||
|
|
1544
target-i386/translate-copy.c
Normal file
1544
target-i386/translate-copy.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue