On 5/15/19 1:31 PM, David Hildenbrand wrote: > +#define DEF_VISTR(BITS) > \ > +static int vistr##BITS(void *v1, const void *v2) > +{ > + S390Vector tmp = {}; > + int i, cc = 3; > + > + for (i = 0; i < (128 / BITS); i++) { > + const uint##BITS##_t data = s390_vec_read_element##BITS(v2, i); > + > + if (!data) { > + cc = 0; > + break; > + } > + s390_vec_write_element##BITS(&tmp, i, data); > + } > + *(S390Vector *)v1 = tmp; > + return cc; > +} > +DEF_VISTR(8) > +DEF_VISTR(16) > +DEF_VISTR(32)
Based on previous, this becomes cc = 3; a0 = s390_vec_read_element64(v2, 0); a1 = s390_vec_read_element64(v2, 1); z0 = zero_search(a0, m); if (z0) { i = clz64(z0); a0 &= ~(UINT64_MAX >> i); a1 = 0; cc = 0; } else { z1 = zero_search(a1, m); if (z1) { i = clz64(z1); a1 &= ~(UINT64_MAX >> i); cc = 0; } } s390_vec_write_element64(v1, 0, a0); s390_vec_write_element64(v1, 1, a1); return cc; r~