qemu-patch-raspberry4/target
Peter Maydell 6ed6845532 target/arm/arm-semi: Restrict use of TaskState*
The semihosting code needs accuss to the linux-user only
TaskState pointer so it can set the semihosting errno per-thread
for linux-user mode. At the moment we do this by having some
ifdefs so that we define a 'ts' local in do_arm_semihosting()
which is either a real TaskState * or just a CPUARMState *,
depending on which mode we're compiling for.

This is awkward if we want to refactor do_arm_semihosting()
into other functions which might need to be passed the TaskState.
Restrict usage of the TaskState local by:
 * making set_swi_errno() always take the CPUARMState pointer
   and (for the linux-user version) get TaskState from that
 * creating a new get_swi_errno() which reads the errno
 * having the two semihosting calls which need the TaskState
   for other purposes (SYS_GET_CMDLINE and SYS_HEAPINFO)
   define a variable with scope restricted to just that code

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20190916141544.17540-6-peter.maydell@linaro.org
2019-10-15 18:09:03 +01:00
..
alpha target/alpha: Tidy helper_fp_exc_raise_s 2019-09-26 19:00:53 +01:00
arm target/arm/arm-semi: Restrict use of TaskState* 2019-10-15 18:09:03 +01:00
cris Monitor patches for 2019-08-21 2019-08-22 10:31:21 +01:00
hppa target/hppa: prevent trashing of temporary in do_depw_sar() 2019-09-14 15:39:24 -04:00
i386 target/i386/kvm: Silence warning from Valgrind about uninitialized bytes 2019-10-04 18:49:20 +02:00
lm32 Monitor patches for 2019-08-21 2019-08-22 10:31:21 +01:00
m68k target/m68k/fpu_helper.c: rename the access arguments 2019-09-19 12:12:19 +02:00
microblaze tcg: TCGMemOp is now accelerator independent MemOp 2019-09-03 08:30:38 -07:00
mips target/mips: msa: Move helpers for <AND|NOR|OR|XOR>.V 2019-10-01 16:58:45 +02:00
moxie hw/core: Move cpu.c, cpu.h from qom/ to hw/core/ 2019-08-21 13:24:01 +02:00
nios2 Monitor patches for 2019-08-21 2019-08-22 10:31:21 +01:00
openrisc target/openrisc: Update cpu "any" to v1.3 2019-09-04 13:01:56 -07:00
ppc target/ppc: use Vsr macros in BCD helpers 2019-10-04 19:08:21 +10:00
riscv gdbstub: riscv: fix the fflags registers 2019-09-17 08:42:50 -07:00
s390x s390x/tcg: MVCL: Exit to main loop if requested 2019-10-10 12:27:15 +02:00
sh4 Monitor patches for 2019-08-21 2019-08-22 10:31:21 +01:00
sparc target/sparc: Switch to do_transaction_failed() hook 2019-09-17 12:01:00 +01:00
tilegx tcg: TCGMemOp is now accelerator independent MemOp 2019-09-03 08:30:38 -07:00
tricore tcg: TCGMemOp is now accelerator independent MemOp 2019-09-03 08:30:38 -07:00
unicore32 Monitor patches for 2019-08-21 2019-08-22 10:31:21 +01:00
xtensa target/xtensa: linux-user: add call0 ABI support 2019-09-11 08:47:06 +02:00