mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
target/arm: Implement SVE conditionally broadcast/extract element
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20180613015641.5667-7-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
3ca879aeb3
commit
ef23cb726d
4 changed files with 362 additions and 0 deletions
|
@ -2070,3 +2070,15 @@ void HELPER(sve_compact_d)(void *vd, void *vn, void *vg, uint32_t desc)
|
|||
d[j] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Similar to the ARM LastActiveElement pseudocode function, except the
|
||||
* result is multiplied by the element size. This includes the not found
|
||||
* indication; e.g. not found for esz=3 is -8.
|
||||
*/
|
||||
int32_t HELPER(sve_last_active_element)(void *vg, uint32_t pred_desc)
|
||||
{
|
||||
intptr_t oprsz = extract32(pred_desc, 0, SIMD_OPRSZ_BITS) + 2;
|
||||
intptr_t esz = extract32(pred_desc, SIMD_DATA_SHIFT, 2);
|
||||
|
||||
return last_active_element(vg, DIV_ROUND_UP(oprsz, 8), esz);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue