diff options
author | Richard Henderson <rth@twiddle.net> | 2016-07-12 13:12:50 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2016-10-31 09:46:25 -0600 |
commit | 2f9d35fc4006122bad33f9ae3e2e51d2263e98ee (patch) | |
tree | f6499fba9d4ce0cc5c0860fff9ea939784257ded /target-sparc/cpu.h | |
parent | 808832277af11dafee5a55da2b9e41d019b879ca (diff) | |
download | qemu-2f9d35fc4006122bad33f9ae3e2e51d2263e98ee.tar.gz |
target-sparc: Introduce cpu_raise_exception_ra
Several helpers call helper_raise_exception directly, which requires
in turn that their callers have performed save_state. The new function
allows a TCG return address to be passed in so that we can restore
PC + NPC + flags data from that.
This fixes a bug in the usage of helper_check_align, whose callers had
not been calling save_state. It fixes another bug in which the divide
helpers used GETPC at a level other than the direct callee from TCG.
This allows the translator to avoid save_state prior to SAVE, RESTORE,
and FLUSHW instructions.
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-sparc/cpu.h')
-rw-r--r-- | target-sparc/cpu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 646a103513..3ae3a12e19 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @@ -549,6 +549,7 @@ void QEMU_NORETURN sparc_cpu_do_unaligned_access(CPUState *cpu, vaddr addr, MMUAccessType access_type, int mmu_idx, uintptr_t retaddr); +void cpu_raise_exception_ra(CPUSPARCState *, int, uintptr_t) QEMU_NORETURN; #ifndef NO_CPU_IO_DEFS /* cpu_init.c */ |