diff options
| author | Philippe Mathieu-Daudé | 2021-07-08 19:05:49 +0200 |
|---|---|---|
| committer | Laurent Vivier | 2021-07-12 21:53:35 +0200 |
| commit | 3ffe3268ea5e938de0c5fc309013805e4123531d (patch) | |
| tree | e340d9fef2630e861cee3ca320c8b6a73acfdd53 /linux-user/openrisc | |
| parent | linux-user/mips: Move errno definitions to 'target_errno_defs.h' (diff) | |
| download | qemu-3ffe3268ea5e938de0c5fc309013805e4123531d.tar.gz qemu-3ffe3268ea5e938de0c5fc309013805e4123531d.tar.xz qemu-3ffe3268ea5e938de0c5fc309013805e4123531d.zip | |
linux-user: Simplify host <-> target errno conversion using macros
Convert the host_to_target_errno_table[] array to a switch
case to allow compiler optimizations (such noticing the identity
function when host and guest errnos match). 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.
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210708170550.1846343-8-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/openrisc')
0 files changed, 0 insertions, 0 deletions
