[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 25/53] semihosting: Use env more often in do_common_semiho
From: |
Luc Michel |
Subject: |
Re: [PATCH v4 25/53] semihosting: Use env more often in do_common_semihosting |
Date: |
Wed, 22 Jun 2022 10:22:23 +0200 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On 13:45 Tue 07 Jun , Richard Henderson wrote:
> We've already loaded cs->env_ptr into a local variable; use it.
> Since env is unconditionally used, we don't need a dummy use.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Luc Michel <lmichel@kalray.eu>
> ---
> semihosting/arm-compat-semi.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c
> index 5e442e549d..adb4e5b581 100644
> --- a/semihosting/arm-compat-semi.c
> +++ b/semihosting/arm-compat-semi.c
> @@ -553,7 +553,6 @@ void do_common_semihosting(CPUState *cs)
> GuestFD *gf;
> int64_t elapsed;
>
> - (void) env; /* Used implicitly by arm lock_user macro */
> nr = common_semi_arg(cs, 0) & 0xffffffffU;
> args = common_semi_arg(cs, 1);
>
> @@ -636,12 +635,12 @@ void do_common_semihosting(CPUState *cs)
> break;
>
> case TARGET_SYS_WRITEC:
> - qemu_semihosting_console_outc(cs->env_ptr, args);
> + qemu_semihosting_console_outc(env, args);
> common_semi_set_ret(cs, 0xdeadbeef);
> break;
>
> case TARGET_SYS_WRITE0:
> - ret = qemu_semihosting_console_outs(cs->env_ptr, args);
> + ret = qemu_semihosting_console_outs(env, args);
> common_semi_set_ret(cs, ret);
> break;
>
> @@ -672,7 +671,7 @@ void do_common_semihosting(CPUState *cs)
> break;
>
> case TARGET_SYS_READC:
> - ret = qemu_semihosting_console_inc(cs->env_ptr);
> + ret = qemu_semihosting_console_inc(env);
> common_semi_set_ret(cs, ret);
> break;
>
> --
> 2.34.1
>
- Re: [PATCH v4 10/53] semihosting: Adjust error checking in common_semi_cb, (continued)
- [PATCH v4 02/53] semihosting: Return failure from softmmu-uaccess.h functions, Richard Henderson, 2022/06/07
- [PATCH v4 15/53] semihosting: Remove GDB_O_BINARY, Richard Henderson, 2022/06/07
- [PATCH v4 14/53] semihosting: Move common-semi.h to include/semihosting/, Richard Henderson, 2022/06/07
- [PATCH v4 16/53] include/exec: Move gdb open flags to gdbstub.h, Richard Henderson, 2022/06/07
- [PATCH v4 23/53] semihosting: Split out common_semi_has_synccache, Richard Henderson, 2022/06/07
- [PATCH v4 25/53] semihosting: Use env more often in do_common_semihosting, Richard Henderson, 2022/06/07
- Re: [PATCH v4 25/53] semihosting: Use env more often in do_common_semihosting,
Luc Michel <=
- [PATCH v4 27/53] semihosting: Split out semihost_sys_open, Richard Henderson, 2022/06/07
- [PATCH v4 31/53] semihosting: Bound length for semihost_sys_{read, write}, Richard Henderson, 2022/06/07
- [PATCH v4 35/53] semihosting: Split out semihost_sys_remove, Richard Henderson, 2022/06/07
- [PATCH v4 37/53] semihosting: Split out semihost_sys_system, Richard Henderson, 2022/06/07