|
From: | Leandro Lupori |
Subject: | Re: [RFC PATCH v3 1/5] ppc64: Add semihosting support |
Date: | Wed, 20 Apr 2022 14:54:56 -0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 |
On 4/18/22 17:22, Cédric Le Goater wrote:
diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.cindex 7a51fd0737..e1279c316c 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -268,6 +268,31 @@ common_semi_sys_exit_extended(CPUState *cs, int nr) #endif +#ifdef TARGET_PPC64This PPC ifdef in an ARM file seems wrong. The rest looks OK.
IIUC, arm-compat-semi.c is not an ARM specific file, but it's used by targets that implement ARM-compatible semihosting. It's currently used by ARM and RISC-V and both use target ifdefs in small parts of this file.
Thanks, Leandro
Thanks, C.+static inline target_ulong +common_semi_arg(CPUState *cs, int argno) +{ + PowerPCCPU *cpu = POWERPC_CPU(cs); + CPUPPCState *env = &cpu->env; + return env->gpr[3 + argno]; +} + +static inline void +common_semi_set_ret(CPUState *cs, target_ulong ret) +{ + PowerPCCPU *cpu = POWERPC_CPU(cs); + CPUPPCState *env = &cpu->env; + env->gpr[3] = ret; +} + +static inline bool +common_semi_sys_exit_extended(CPUState *cs, int nr) +{+ return (nr == TARGET_SYS_EXIT_EXTENDED || sizeof(target_ulong) == 8);+} + +#endif +
[Prev in Thread] | Current Thread | [Next in Thread] |