mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
target/arm: Update CNTP for PREDDESC
Since b64ee454a4
, all predicate operations should be
using these field macros for predicates.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210309155305.11301-7-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
04c774a25d
commit
f556a201b5
2 changed files with 6 additions and 6 deletions
|
@ -2836,12 +2836,12 @@ uint32_t HELPER(sve_brkns)(void *vd, void *vn, void *vg, uint32_t pred_desc)
|
|||
|
||||
uint64_t HELPER(sve_cntp)(void *vn, 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);
|
||||
intptr_t words = DIV_ROUND_UP(FIELD_EX32(pred_desc, PREDDESC, OPRSZ), 8);
|
||||
intptr_t esz = FIELD_EX32(pred_desc, PREDDESC, ESZ);
|
||||
uint64_t *n = vn, *g = vg, sum = 0, mask = pred_esz_masks[esz];
|
||||
intptr_t i;
|
||||
|
||||
for (i = 0; i < DIV_ROUND_UP(oprsz, 8); ++i) {
|
||||
for (i = 0; i < words; ++i) {
|
||||
uint64_t t = n[i] & g[i] & mask;
|
||||
sum += ctpop64(t);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue