mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
target/arm: Implement SVE2 FCVTNT
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stephen Long <steplong@quicinc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210525010358.152808-73-richard.henderson@linaro.org Message-Id: <20200428174332.17162-2-steplong@quicinc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
80a712a2be
commit
5c1b7226f5
4 changed files with 45 additions and 0 deletions
|
@ -7602,3 +7602,23 @@ void HELPER(fmmla_d)(void *vd, void *vn, void *vm, void *va,
|
|||
d[3] = float64_add(a[3], float64_add(p0, p1, status), status);
|
||||
}
|
||||
}
|
||||
|
||||
#define DO_FCVTNT(NAME, TYPEW, TYPEN, HW, HN, OP) \
|
||||
void HELPER(NAME)(void *vd, void *vn, void *vg, void *status, uint32_t desc) \
|
||||
{ \
|
||||
intptr_t i = simd_oprsz(desc); \
|
||||
uint64_t *g = vg; \
|
||||
do { \
|
||||
uint64_t pg = g[(i - 1) >> 6]; \
|
||||
do { \
|
||||
i -= sizeof(TYPEW); \
|
||||
if (likely((pg >> (i & 63)) & 1)) { \
|
||||
TYPEW nn = *(TYPEW *)(vn + HW(i)); \
|
||||
*(TYPEN *)(vd + HN(i + sizeof(TYPEN))) = OP(nn, status); \
|
||||
} \
|
||||
} while (i & 63); \
|
||||
} while (i != 0); \
|
||||
}
|
||||
|
||||
DO_FCVTNT(sve2_fcvtnt_sh, uint32_t, uint16_t, H1_4, H1_2, sve_f32_to_f16)
|
||||
DO_FCVTNT(sve2_fcvtnt_ds, uint64_t, uint32_t, , H1_4, float64_to_float32)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue