mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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
This commit is contained in:
+129
-129
File diff suppressed because it is too large
Load Diff
@@ -589,8 +589,8 @@ DO_DOT_IDX(gvec_sdot_idx_b, int32_t, int8_t, int8_t, H4)
|
||||
DO_DOT_IDX(gvec_udot_idx_b, uint32_t, uint8_t, uint8_t, H4)
|
||||
DO_DOT_IDX(gvec_sudot_idx_b, int32_t, int8_t, uint8_t, H4)
|
||||
DO_DOT_IDX(gvec_usdot_idx_b, int32_t, uint8_t, int8_t, H4)
|
||||
DO_DOT_IDX(gvec_sdot_idx_h, int64_t, int16_t, int16_t, )
|
||||
DO_DOT_IDX(gvec_udot_idx_h, uint64_t, uint16_t, uint16_t, )
|
||||
DO_DOT_IDX(gvec_sdot_idx_h, int64_t, int16_t, int16_t, H8)
|
||||
DO_DOT_IDX(gvec_udot_idx_h, uint64_t, uint16_t, uint16_t, H8)
|
||||
|
||||
void HELPER(gvec_fcaddh)(void *vd, void *vn, void *vm,
|
||||
void *vfpst, uint32_t desc)
|
||||
@@ -1226,7 +1226,7 @@ void HELPER(NAME)(void *vd, void *vn, void *vm, uint32_t desc) \
|
||||
|
||||
DO_MUL_IDX(gvec_mul_idx_h, uint16_t, H2)
|
||||
DO_MUL_IDX(gvec_mul_idx_s, uint32_t, H4)
|
||||
DO_MUL_IDX(gvec_mul_idx_d, uint64_t, )
|
||||
DO_MUL_IDX(gvec_mul_idx_d, uint64_t, H8)
|
||||
|
||||
#undef DO_MUL_IDX
|
||||
|
||||
@@ -1248,11 +1248,11 @@ void HELPER(NAME)(void *vd, void *vn, void *vm, void *va, uint32_t desc) \
|
||||
|
||||
DO_MLA_IDX(gvec_mla_idx_h, uint16_t, +, H2)
|
||||
DO_MLA_IDX(gvec_mla_idx_s, uint32_t, +, H4)
|
||||
DO_MLA_IDX(gvec_mla_idx_d, uint64_t, +, )
|
||||
DO_MLA_IDX(gvec_mla_idx_d, uint64_t, +, H8)
|
||||
|
||||
DO_MLA_IDX(gvec_mls_idx_h, uint16_t, -, H2)
|
||||
DO_MLA_IDX(gvec_mls_idx_s, uint32_t, -, H4)
|
||||
DO_MLA_IDX(gvec_mls_idx_d, uint64_t, -, )
|
||||
DO_MLA_IDX(gvec_mls_idx_d, uint64_t, -, H8)
|
||||
|
||||
#undef DO_MLA_IDX
|
||||
|
||||
@@ -1279,7 +1279,7 @@ void HELPER(NAME)(void *vd, void *vn, void *vm, void *stat, uint32_t desc) \
|
||||
|
||||
DO_FMUL_IDX(gvec_fmul_idx_h, nop, float16, H2)
|
||||
DO_FMUL_IDX(gvec_fmul_idx_s, nop, float32, H4)
|
||||
DO_FMUL_IDX(gvec_fmul_idx_d, nop, float64, )
|
||||
DO_FMUL_IDX(gvec_fmul_idx_d, nop, float64, H8)
|
||||
|
||||
/*
|
||||
* Non-fused multiply-accumulate operations, for Neon. NB that unlike
|
||||
@@ -1317,7 +1317,7 @@ void HELPER(NAME)(void *vd, void *vn, void *vm, void *va, \
|
||||
|
||||
DO_FMLA_IDX(gvec_fmla_idx_h, float16, H2)
|
||||
DO_FMLA_IDX(gvec_fmla_idx_s, float32, H4)
|
||||
DO_FMLA_IDX(gvec_fmla_idx_d, float64, )
|
||||
DO_FMLA_IDX(gvec_fmla_idx_d, float64, H8)
|
||||
|
||||
#undef DO_FMLA_IDX
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user