781 |
int new_cs, new_eip; |
int new_cs, new_eip; |
782 |
uint32_t esp, esp_mask; |
uint32_t esp, esp_mask; |
783 |
uint8_t *ssp; |
uint8_t *ssp; |
784 |
|
|
785 |
new_cs = T0; |
new_cs = T0; |
786 |
new_eip = T1; |
new_eip = T1; |
787 |
esp = env->regs[R_ESP]; |
esp = env->regs[R_ESP]; |
1741 |
} |
} |
1742 |
} |
} |
1743 |
|
|
1744 |
|
#define SHIFT 0 |
1745 |
|
#include "softmmu_template.h" |
1746 |
|
|
1747 |
|
#define SHIFT 1 |
1748 |
|
#include "softmmu_template.h" |
1749 |
|
|
1750 |
|
#define SHIFT 2 |
1751 |
|
#include "softmmu_template.h" |
1752 |
|
|
1753 |
|
#define SHIFT 3 |
1754 |
|
#include "softmmu_template.h" |
1755 |
|
|
1756 |
|
/* try to fill the TLB and return an exception if error */ |
1757 |
|
void tlb_fill(unsigned long addr, int is_write, void *retaddr) |
1758 |
|
{ |
1759 |
|
TranslationBlock *tb; |
1760 |
|
int ret; |
1761 |
|
unsigned long pc; |
1762 |
|
ret = cpu_x86_handle_mmu_fault(env, addr, is_write); |
1763 |
|
if (ret) { |
1764 |
|
/* now we have a real cpu fault */ |
1765 |
|
pc = (unsigned long)retaddr; |
1766 |
|
tb = tb_find_pc(pc); |
1767 |
|
if (tb) { |
1768 |
|
/* the PC is inside the translated code. It means that we have |
1769 |
|
a virtual CPU fault */ |
1770 |
|
cpu_restore_state(tb, env, pc); |
1771 |
|
} |
1772 |
|
raise_exception_err(EXCP0E_PAGE, env->error_code); |
1773 |
|
} |
1774 |
|
} |