mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
target-cris: Switch to AREG0 free mode
Add an explicit CPUCRISState parameter instead of relying on AREG0, and use cpu_ld* in translation and interrupt handling. Remove AREG0 swapping in tlb_fill(). Switch to AREG0 free mode Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
febc9920c6
commit
cf7e0c80aa
6 changed files with 181 additions and 187 deletions
|
@ -19,7 +19,6 @@
|
|||
*/
|
||||
|
||||
#include "cpu.h"
|
||||
#include "dyngen-exec.h"
|
||||
#include "mmu.h"
|
||||
#include "helper.h"
|
||||
#include "host-utils.h"
|
||||
|
@ -55,17 +54,12 @@
|
|||
/* Try to fill the TLB and return an exception if error. If retaddr is
|
||||
NULL, it means that the function was called in C code (i.e. not
|
||||
from generated code or from helper.c) */
|
||||
/* XXX: fix it to restore all registers */
|
||||
void tlb_fill(CPUCRISState *env1, target_ulong addr, int is_write, int mmu_idx,
|
||||
void tlb_fill(CPUCRISState *env, target_ulong addr, int is_write, int mmu_idx,
|
||||
uintptr_t retaddr)
|
||||
{
|
||||
TranslationBlock *tb;
|
||||
CPUCRISState *saved_env;
|
||||
int ret;
|
||||
|
||||
saved_env = env;
|
||||
env = env1;
|
||||
|
||||
D_LOG("%s pc=%x tpc=%x ra=%p\n", __func__,
|
||||
env->pc, env->debug1, (void *)retaddr);
|
||||
ret = cpu_cris_handle_mmu_fault(env, addr, is_write, mmu_idx);
|
||||
|
@ -84,7 +78,6 @@ void tlb_fill(CPUCRISState *env1, target_ulong addr, int is_write, int mmu_idx,
|
|||
}
|
||||
cpu_loop_exit(env);
|
||||
}
|
||||
env = saved_env;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue