mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
target/arm: Pass index to AdvSIMD FCMLA (indexed)
For aa64 advsimd, we had been passing the pre-indexed vector. However, sve applies the index to each 128-bit segment, so we need to pass in the index separately. For aa32 advsimd, the fp32 operation always has index 0, but we failed to interpret the fp16 index correctly. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20180627043328.11531-31-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
05f48bab30
commit
2cc99919a8
3 changed files with 41 additions and 22 deletions
|
@ -317,10 +317,11 @@ void HELPER(gvec_fcmlah_idx)(void *vd, void *vn, void *vm,
|
|||
float_status *fpst = vfpst;
|
||||
intptr_t flip = extract32(desc, SIMD_DATA_SHIFT, 1);
|
||||
uint32_t neg_imag = extract32(desc, SIMD_DATA_SHIFT + 1, 1);
|
||||
intptr_t index = extract32(desc, SIMD_DATA_SHIFT + 2, 2);
|
||||
uint32_t neg_real = flip ^ neg_imag;
|
||||
uintptr_t i;
|
||||
float16 e1 = m[H2(flip)];
|
||||
float16 e3 = m[H2(1 - flip)];
|
||||
float16 e1 = m[H2(2 * index + flip)];
|
||||
float16 e3 = m[H2(2 * index + 1 - flip)];
|
||||
|
||||
/* Shift boolean to the sign bit so we can xor to negate. */
|
||||
neg_real <<= 15;
|
||||
|
@ -377,10 +378,11 @@ void HELPER(gvec_fcmlas_idx)(void *vd, void *vn, void *vm,
|
|||
float_status *fpst = vfpst;
|
||||
intptr_t flip = extract32(desc, SIMD_DATA_SHIFT, 1);
|
||||
uint32_t neg_imag = extract32(desc, SIMD_DATA_SHIFT + 1, 1);
|
||||
intptr_t index = extract32(desc, SIMD_DATA_SHIFT + 2, 2);
|
||||
uint32_t neg_real = flip ^ neg_imag;
|
||||
uintptr_t i;
|
||||
float32 e1 = m[H4(flip)];
|
||||
float32 e3 = m[H4(1 - flip)];
|
||||
float32 e1 = m[H4(2 * index + flip)];
|
||||
float32 e3 = m[H4(2 * index + 1 - flip)];
|
||||
|
||||
/* Shift boolean to the sign bit so we can xor to negate. */
|
||||
neg_real <<= 31;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue