target/sparc/mmu_helper: Perform comparison pass against qemu

Ensure code and formatting match qemu
This commit is contained in:
Lioncash 2018-03-12 12:45:16 -04:00
parent 83c0769d90
commit 0215431990
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -28,10 +28,18 @@
int sparc_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int size, int rw,
int mmu_idx)
{
SPARCCPU *cpu = SPARC_CPU(cs->uc, cs);
CPUSPARCState *env = &cpu->env;
if (rw & 2) {
cs->exception_index = TT_TFAULT;
} else {
cs->exception_index = TT_DFAULT;
#ifdef TARGET_SPARC64
env->dmmu.mmuregs[4] = address;
#else
env->mmuregs[4] = address;
#endif
}
return 1;
}