Re: [Qemu-devel] [RFC PATCH v4 75/75] target/i386: convert pmovmskb/movmskps/movmskpd helpers to gvec style

2019-08-21 Thread Richard Henderson
On 8/21/19 10:29 AM, Jan Bobek wrote: > +for (intptr_t i = 0; i * sizeof(uint8_t) < oprsz; ++i) { > +const uint8_t t = a->B(i) & (1 << 7); > +ret |= i < 8 ? t >> (7 - i) : t << (i - 7); You can avoid this variable shift by doing uint32_t t = a->B(i) >> 7; ret |= t << i; >

[Qemu-devel] [RFC PATCH v4 75/75] target/i386: convert pmovmskb/movmskps/movmskpd helpers to gvec style

2019-08-21 Thread Jan Bobek
Make these helpers suitable for use with tcg_gen_gvec_* functions. Signed-off-by: Jan Bobek --- target/i386/ops_sse.h| 74 ++-- target/i386/ops_sse_header.h | 9 ++- target/i386/translate.c | 132 ++- 3 files changed, 65 insertions(