2 #include "dyngen-exec.h"
5 #if !defined(CONFIG_USER_ONLY)
6 static void do_unaligned_access(target_ulong addr
, int is_write
, int is_user
,
13 #include "softmmu_template.h"
16 #include "softmmu_template.h"
19 #include "softmmu_template.h"
22 #include "softmmu_template.h"
24 /* XXX: make it generic ? */
25 static void cpu_restore_state2(void *retaddr
)
31 /* now we have a real cpu fault */
32 pc
= (unsigned long)retaddr
;
35 /* the PC is inside the translated code. It means that we have
36 a virtual CPU fault */
37 cpu_restore_state(tb
, env
, pc
);
42 static void do_unaligned_access(target_ulong addr
, int is_write
, int is_user
,
45 #ifdef DEBUG_UNALIGNED
46 printf("Unaligned access to 0x" TARGET_FMT_lx
" from 0x" TARGET_FMT_lx
49 cpu_restore_state2(retaddr
);
50 helper_raise_exception(env
, TT_UNALIGNED
);
53 /* try to fill the TLB and return an exception if error. If retaddr is
54 NULL, it means that the function was called in C code (i.e. not
55 from generated code or from helper.c) */
56 /* XXX: fix it to restore all registers */
57 void tlb_fill(CPUState
*env1
, target_ulong addr
, int is_write
, int mmu_idx
,
66 ret
= cpu_sparc_handle_mmu_fault(env
, addr
, is_write
, mmu_idx
);
68 cpu_restore_state2(retaddr
);
74 #endif /* !CONFIG_USER_ONLY */