unicorn/qemu/target/sparc
Peter Maydell 0b48392779
target/sparc: Factor out the body of sparc_cpu_unassigned_access()
Currently the SPARC target uses the old-style do_unassigned_access
hook. We want to switch it over to do_transaction_failed, but to do
this we must first remove all the direct calls in ldst_helper.c to
cpu_unassigned_access(). Factor out the body of the hook function's
code into a new sparc_raise_mmu_fault() and call it from the hook and
from the various places that used to call cpu_unassigned_access().

In passing, this fixes a bug where the code that raised the
MMU exception was directly calling GETPC() from a function that
was several levels deep in the callstack from the original
helper function: the new sparc_raise_mmu_fault() instead takes
the return address as an argument.

Other than the use of retaddr rather than GETPC() and a comment
format fixup, the body of the new function has no changes from
that of the old hook function.

Backports commit c9d793f44620a4793239da73f67758ce5f5ba5d0 from qemu
2019-11-28 02:56:05 -05:00
..
asi.h Clean up ill-advised or unusual header guards 2019-05-14 08:02:53 -04:00
cc_helper.c target/sparc/cc_helper: Perform a comparison pass against qemu 2018-03-12 12:36:51 -04:00
cpu-param.h tcg: Split out target/arch/cpu-param.h 2019-06-10 19:35:46 -04:00
cpu-qom.h sparc: convert cpu models to SPARC cpu subclasses 2018-03-07 21:30:22 -05:00
cpu.c cpu: Introduce cpu_set_cpustate_pointers 2019-06-12 12:27:16 -04:00
cpu.h configure: Define target access alignment in configure 2019-11-18 21:41:35 -05:00
fop_helper.c target/sparc: Use env_cpu, env_archcpu 2019-06-12 12:13:03 -04:00
helper.c target/sparc: Use env_cpu, env_archcpu 2019-06-12 12:13:03 -04:00
helper.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
int32_helper.c sparc: embed sparc_def_t into CPUSPARCState 2018-03-07 21:35:23 -05:00
int64_helper.c sparc: embed sparc_def_t into CPUSPARCState 2018-03-07 21:35:23 -05:00
ldst_helper.c target/sparc: Factor out the body of sparc_cpu_unassigned_access() 2019-11-28 02:56:05 -05:00
Makefile.objs Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
mmu_helper.c target/sparc: Use env_cpu, env_archcpu 2019-06-12 12:13:03 -04:00
TODO Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
translate.c target/sparc: check CF_PARALLEL instead of parallel_cpus 2019-05-06 00:43:21 -04:00
unicorn.c Use DEFINE_MACHINE() to register all machines 2018-03-11 15:12:46 -04:00
unicorn.h Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
unicorn64.c Revert use of DEFINE_MACHINE() for registrations of multiple machines 2018-03-11 15:17:17 -04:00
vis_helper.c Move target-* CPU file into a target/ folder 2018-03-01 22:50:58 -05:00
win_helper.c target/sparc/win_helper: Perform comparison pass against qemu 2018-03-12 12:46:59 -04:00