Re: [PATCH 01/10] target/arm: Implement FTMOPA (non-widening, FP32)
Richard Henderson <[email protected]> Tue, 28 Jul 2026 07:49:59 -0700
| Newsgroups | org.nongnu.qemu-arm,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
On 7/28/26 06:10, Peter Maydell wrote: > On Tue, 14 Jul 2026 at 00:04, Richard Henderson > <[email protected]> wrote: >> >> Signed-off-by: Richard Henderson <[email protected]> >> --- > > >> +static void sme_tmop(void *vza, void *vzn, void *vzm, uint64_t *zk, >> + void *fn_opaque, uint32_t desc, MemOp esz, >> + void (*fn)(void *, void *, void *, void *)) >> +{ >> + intptr_t oprsz = simd_maxsz(desc); >> + intptr_t index = simd_data(desc); >> + intptr_t esize = 1 << esz; >> + intptr_t host_adj = HOST_BIG_ENDIAN ? 8 - esize : 0; >> + /* Base in bits for op3[index*:csize], csize = (VL * 2) / esize. */ >> + intptr_t ctrl_base = index * oprsz * 2; >> + /* Create a zero for use with the largest esz. */ >> + uint32_t zero = 0; >> + >> + for (intptr_t row = 0; row < oprsz; row += esize) { >> + void *vza_row = vza + tile_vslice_offset(row); >> + >> + for (intptr_t col = 0; col < oprsz; col += esize) { >> + void *e2 = vzm + (col ^ host_adj); >> + void *e3 = vza_row + (col ^ host_adj); > > Having just read patch 4, is it possible to do this with the H > macros rather than a manual host_adj, as we do in > sme_tmop_2way_sh() there ? Not without making copies of the function specializing on esz. Of course, it turns out after the fact that only two esz are used, so perhaps it's not that bad. But the element selection logic was confusing enough to suggest just one function. r~