[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 4/4] target/arm: remove run time semihosting
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v1 4/4] target/arm: remove run time semihosting checks |
Date: |
Wed, 3 Jul 2019 18:38:04 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 |
On 7/3/19 5:52 PM, Alex Bennée wrote:
> Now we do all our checking and use a common EXCP_SEMIHOST for
> semihosting operations we can make helper code a lot simpler.
>
> Signed-off-by: Alex Bennée <address@hidden>
> ---
> target/arm/helper.c | 84 +++++++++------------------------------------
> 1 file changed, 17 insertions(+), 67 deletions(-)
>
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index ad29dc4072..5c1f741380 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -10364,83 +10364,33 @@ static void arm_cpu_do_interrupt_aarch64(CPUState
> *cs)
> new_el, env->pc, pstate_read(env));
> }
>
> -static inline bool check_for_semihosting(CPUState *cs)
> +/*
> + * Check whether this exception is a semihosting call; if so
> + * then handle it and return true; otherwise return false.
> + *
> + * All the permission and validity checks are done at translate time.
> + */
> +static inline bool handle_semihosting(CPUState *cs)
Drop the inline, probably.
Since you are renaming away the "check", perhaps hoist
> + if (cs->exception_index == EXCP_SEMIHOST) {
this check to the caller, change the return to void,
> @@ -10476,7 +10426,7 @@ void arm_cpu_do_interrupt(CPUState *cs)
> * code that caused the exception, not the target exception level,
> * so must be handled here.
> */
> - if (check_for_semihosting(cs)) {
> + if (handle_semihosting(cs)) {
> return;
> }
so we get
if (cs->exception_index == EXCP_SEMIHOST) {
handle_semihosting(cs);
return;
}
r~
- Re: [Qemu-devel] [PATCH v1 3/4] target/arm: handle A-profile A32 semihosting at translate time, (continued)
[Qemu-devel] [PATCH v1 4/4] target/arm: remove run time semihosting checks, Alex Bennée, 2019/07/03
Re: [Qemu-devel] [PATCH v1 4/4] target/arm: remove run time semihosting checks,
Richard Henderson <=
Re: [Qemu-devel] [PATCH v1 0/4] arm semihosting cleanups, no-reply, 2019/07/03