sim65 common define for paravirt hooks base location
allows the loaded binary to take up as much space as possible restored some documentation of the hooks but without reference to specific location
This commit is contained in:
committed by
Oliver Schmidt
parent
6efb71bea7
commit
5269552346
@@ -318,13 +318,13 @@ void ParaVirtHooks (CPURegs* Regs)
|
||||
/* Potentially execute paravirtualization hooks */
|
||||
{
|
||||
/* Check for paravirtualization address range */
|
||||
if (Regs->PC < 0xFFF4 ||
|
||||
Regs->PC >= 0xFFF4 + sizeof (Hooks) / sizeof (Hooks[0])) {
|
||||
if (Regs->PC < PARAVIRT_BASE ||
|
||||
Regs->PC >= PARAVIRT_BASE + sizeof (Hooks) / sizeof (Hooks[0])) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Call paravirtualization hook */
|
||||
Hooks[Regs->PC - 0xFFF4] (Regs);
|
||||
Hooks[Regs->PC - PARAVIRT_BASE] (Regs);
|
||||
|
||||
/* Simulate RTS */
|
||||
Regs->PC = Pop(Regs) + (Pop(Regs) << 8) + 1;
|
||||
|
||||
Reference in New Issue
Block a user