From: Laurent Vivier <laurent@vivier.eu>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: Taylor Simpson <tsimpson@quicinc.com>,
Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [PATCH v2 8/8] linux-user: Simplify host <-> target errno conversion using macros
Date: Thu, 8 Jul 2021 17:30:07 +0200 [thread overview]
Message-ID: <d3d8214a-69f2-af60-324c-db4196ff7dae@vivier.eu> (raw)
In-Reply-To: <20210708141121.1731691-9-f4bug@amsat.org>
Le 08/07/2021 à 16:11, Philippe Mathieu-Daudé a écrit :
> Convert the host_to_target_errno_table[] array to a switch case
> to allow compiler optimizations. Extract the errnos list as to
> a new includible unit, using a generic macro. Remove the code
> related to target_to_host_errno_table[] initialization.
>
Is there some performance penalties by using a switch() rather than an array[] ?
> Suggested-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> linux-user/syscall.c | 169 +++++-----------------------------------
> linux-user/errnos.c.inc | 140 +++++++++++++++++++++++++++++++++
> 2 files changed, 161 insertions(+), 148 deletions(-)
> create mode 100644 linux-user/errnos.c.inc
>
...
> diff --git a/linux-user/errnos.c.inc b/linux-user/errnos.c.inc
> new file mode 100644
> index 00000000000..807c97ca25e
> --- /dev/null
> +++ b/linux-user/errnos.c.inc
> @@ -0,0 +1,140 @@
...
> +#ifdef ERKFILL
You fix it in patch 1 but forgot to report it in your patch :)
Thanks,
Laurent
next prev parent reply other threads:[~2021-07-08 16:04 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 14:11 [PATCH v2 0/8] linux-user: target <-> host errno conversion code refactor Philippe Mathieu-Daudé
2021-07-08 14:11 ` [PATCH v2 1/8] linux-user/syscall: Fix RF-kill errno (typo in ERFKILL) Philippe Mathieu-Daudé
2021-07-08 15:19 ` Laurent Vivier
2021-07-08 15:33 ` Richard Henderson
2021-07-08 14:11 ` [PATCH v2 2/8] linux-user/sparc: Rename target_errno.h -> target_errno_defs.h Philippe Mathieu-Daudé
2021-07-08 15:20 ` Laurent Vivier
2021-07-08 15:34 ` Richard Henderson
2021-07-08 14:11 ` [PATCH v2 3/8] linux-user: Extract target errno to 'target_errno_defs.h' Philippe Mathieu-Daudé
2021-07-08 15:25 ` Laurent Vivier
2021-07-08 15:33 ` Richard Henderson
2021-07-08 14:11 ` [PATCH v2 4/8] linux-user/alpha: Move errno definitions " Philippe Mathieu-Daudé
2021-07-08 15:25 ` Laurent Vivier
2021-07-08 15:34 ` Richard Henderson
2021-07-08 14:11 ` [PATCH v2 5/8] linux-user/hppa: " Philippe Mathieu-Daudé
2021-07-08 15:25 ` Laurent Vivier
2021-07-08 15:35 ` Richard Henderson
2021-07-08 14:11 ` [PATCH v2 6/8] linux-user/mips: " Philippe Mathieu-Daudé
2021-07-08 15:25 ` Laurent Vivier
2021-07-08 15:38 ` Richard Henderson
2021-07-08 14:11 ` [PATCH v2 7/8] linux-user/syscall: Introduce errno_exists() Philippe Mathieu-Daudé
2021-07-08 15:25 ` Laurent Vivier
2021-07-08 15:42 ` Richard Henderson
2021-07-08 14:11 ` [PATCH v2 8/8] linux-user: Simplify host <-> target errno conversion using macros Philippe Mathieu-Daudé
2021-07-08 15:30 ` Laurent Vivier [this message]
2021-07-08 15:48 ` Richard Henderson
2021-07-08 16:09 ` Philippe Mathieu-Daudé
2021-07-08 15:44 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d3d8214a-69f2-af60-324c-db4196ff7dae@vivier.eu \
--to=laurent@vivier.eu \
--cc=f4bug@amsat.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=tsimpson@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).