diff options
author | Peter Maydell | 2021-06-14 17:09:11 +0200 |
---|---|---|
committer | Peter Maydell | 2021-06-16 15:33:51 +0200 |
commit | 6e802db3c418e522b25a16fd74ea6d98fc2a1480 (patch) | |
tree | f49aaf67685cd04d19891f018b73171fb9252412 /target/arm/vec_internal.h | |
parent | hw/arm: quanta-q71l add pca954x muxes (diff) | |
download | qemu-6e802db3c418e522b25a16fd74ea6d98fc2a1480.tar.gz qemu-6e802db3c418e522b25a16fd74ea6d98fc2a1480.tar.xz qemu-6e802db3c418e522b25a16fd74ea6d98fc2a1480.zip |
target/arm: Provide and use H8 and H1_8 macros
Currently we provide Hn and H1_n macros for accessing the correct
data within arrays of vector elements of size 1, 2 and 4, accounting
for host endianness. We don't provide any macros for elements of
size 8 because there the host endianness doesn't matter. However,
this does result in awkwardness where we need to pass empty arguments
to macros, because checkpatch complains about them. The empty
argument is a little confusing for humans to read as well.
Add H8() and H1_8() macros and use them where we were previously
passing empty arguments to macros.
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210614151007.4545-2-peter.maydell@linaro.org
Message-id: 20210610132505.5827-1-peter.maydell@linaro.org
Diffstat (limited to 'target/arm/vec_internal.h')
-rw-r--r-- | target/arm/vec_internal.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/target/arm/vec_internal.h b/target/arm/vec_internal.h index dba481e001..613f3421b9 100644 --- a/target/arm/vec_internal.h +++ b/target/arm/vec_internal.h @@ -42,7 +42,13 @@ #define H2(x) (x) #define H4(x) (x) #endif - +/* + * Access to 64-bit elements isn't host-endian dependent; we provide H8 + * and H1_8 so that when a function is being generated from a macro we + * can pass these rather than an empty macro argument, for clarity. + */ +#define H8(x) (x) +#define H1_8(x) (x) static inline void clear_tail(void *vd, uintptr_t opr_sz, uintptr_t max_sz) { |