Lines Matching +full:1 +full:v2
51 return (1 << es) * BITS_PER_BYTE; in get_element_bits()
59 return -1ull >> (64 - get_element_bits(es)); in get_single_element_mask()
67 return -1ull >> (65 - get_element_bits(es)); in get_single_element_lsbs_mask()
78 static int vfae(void *v1, const void *v2, const void *v3, bool in, in vfae() argument
88 a0 = s390_vec_read_element64(v2, 0); in vfae()
89 a1 = s390_vec_read_element64(v2, 1); in vfae()
91 b1 = s390_vec_read_element64(v3, 1); in vfae()
117 e0 = (e0 >> (bits - 1)) * get_single_element_mask(es); in vfae()
118 e1 = (e1 >> (bits - 1)) * get_single_element_mask(es); in vfae()
120 s390_vec_write_element64(v1, 1, e1); in vfae()
123 s390_vec_write_element64(v1, 1, 0); in vfae()
129 return 1; /* matching elements, no match for zero */ in vfae()
137 void HELPER(gvec_vfae##BITS)(void *v1, const void *v2, const void *v3, \
140 const bool in = extract32(simd_data(desc), 3, 1); \
141 const bool rt = extract32(simd_data(desc), 2, 1); \
142 const bool zs = extract32(simd_data(desc), 1, 1); \
144 vfae(v1, v2, v3, in, rt, zs, MO_##BITS); \
151 void HELPER(gvec_vfae_cc##BITS)(void *v1, const void *v2, const void *v3, \
154 const bool in = extract32(simd_data(desc), 3, 1); \
155 const bool rt = extract32(simd_data(desc), 2, 1); \
156 const bool zs = extract32(simd_data(desc), 1, 1); \
158 env->cc_op = vfae(v1, v2, v3, in, rt, zs, MO_##BITS); \
164 static int vfee(void *v1, const void *v2, const void *v3, bool zs, uint8_t es) in vfee() argument
171 a0 = s390_vec_read_element64(v2, 0); in vfee()
172 a1 = s390_vec_read_element64(v2, 1); in vfee()
174 b1 = s390_vec_read_element64(v3, 1); in vfee()
186 s390_vec_write_element64(v1, 1, 0); in vfee()
190 return 1; /* matching elements, no match for zero */ in vfee()
198 void HELPER(gvec_vfee##BITS)(void *v1, const void *v2, const void *v3, \
201 const bool zs = extract32(simd_data(desc), 1, 1); \
203 vfee(v1, v2, v3, zs, MO_##BITS); \
210 void HELPER(gvec_vfee_cc##BITS)(void *v1, const void *v2, const void *v3, \
213 const bool zs = extract32(simd_data(desc), 1, 1); \
215 env->cc_op = vfee(v1, v2, v3, zs, MO_##BITS); \
221 static int vfene(void *v1, const void *v2, const void *v3, bool zs, uint8_t es) in vfene() argument
229 a0 = s390_vec_read_element64(v2, 0); in vfene()
230 a1 = s390_vec_read_element64(v2, 1); in vfene()
232 b1 = s390_vec_read_element64(v3, 1); in vfene()
239 uint8_t enr = first_inequal / (1 << es); in vfene()
240 uint32_t a = s390_vec_read_element(v2, enr, es); in vfene()
253 s390_vec_write_element64(v1, 1, 0); in vfene()
259 return smaller ? 1 : 2; in vfene()
263 void HELPER(gvec_vfene##BITS)(void *v1, const void *v2, const void *v3, \
266 const bool zs = extract32(simd_data(desc), 1, 1); \
268 vfene(v1, v2, v3, zs, MO_##BITS); \
275 void HELPER(gvec_vfene_cc##BITS)(void *v1, const void *v2, const void *v3, \
278 const bool zs = extract32(simd_data(desc), 1, 1); \
280 env->cc_op = vfene(v1, v2, v3, zs, MO_##BITS); \
286 static int vistr(void *v1, const void *v2, uint8_t es) in vistr() argument
289 uint64_t a0 = s390_vec_read_element64(v2, 0); in vistr()
290 uint64_t a1 = s390_vec_read_element64(v2, 1); in vistr()
296 a0 &= ~(-1ull >> clz64(z)); in vistr()
302 a1 &= ~(-1ull >> clz64(z)); in vistr()
308 s390_vec_write_element64(v1, 1, a1); in vistr()
313 void HELPER(gvec_vistr##BITS)(void *v1, const void *v2, uint32_t desc) \
315 vistr(v1, v2, MO_##BITS); \
322 void HELPER(gvec_vistr_cc##BITS)(void *v1, const void *v2, CPUS390XState *env, \
325 env->cc_op = vistr(v1, v2, MO_##BITS); \
333 const bool equal = extract32(c, 7, 1); in element_compare()
334 const bool lower = extract32(c, 6, 1); in element_compare()
335 const bool higher = extract32(c, 5, 1); in element_compare()
345 static int vstrc(void *v1, const void *v2, const void *v3, const void *v4, in vstrc() argument
349 uint64_t a0 = s390_vec_read_element64(v2, 0); in vstrc()
350 uint64_t a1 = s390_vec_read_element64(v2, 1); in vstrc()
362 for (i = 0; i < 16 / (1 << es); i++) { in vstrc()
363 const uint32_t data = s390_vec_read_element(v2, i, es); in vstrc()
364 const int cur_byte = i * (1 << es); in vstrc()
372 for (j = 0; j < 16 / (1 << es); j += 2) { in vstrc()
374 const uint32_t l2 = s390_vec_read_element(v3, j + 1, es); in vstrc()
376 const uint8_t c1 = s390_vec_read_element8(v4, j * (1 << es)); in vstrc()
377 const uint8_t c2 = s390_vec_read_element8(v4, (j + 1) * (1 << es)); in vstrc()
391 const uint64_t val = -1ull; in vstrc()
407 s390_vec_write_element64(v1, 1, 0); in vstrc()
413 return 1; /* matching elements, no match for zero */ in vstrc()
421 void HELPER(gvec_vstrc##BITS)(void *v1, const void *v2, const void *v3, \
424 const bool in = extract32(simd_data(desc), 3, 1); \
425 const bool zs = extract32(simd_data(desc), 1, 1); \
427 vstrc(v1, v2, v3, v4, in, 0, zs, MO_##BITS); \
434 void HELPER(gvec_vstrc_rt##BITS)(void *v1, const void *v2, const void *v3, \
437 const bool in = extract32(simd_data(desc), 3, 1); \
438 const bool zs = extract32(simd_data(desc), 1, 1); \
440 vstrc(v1, v2, v3, v4, in, 1, zs, MO_##BITS); \
447 void HELPER(gvec_vstrc_cc##BITS)(void *v1, const void *v2, const void *v3, \
451 const bool in = extract32(simd_data(desc), 3, 1); \
452 const bool zs = extract32(simd_data(desc), 1, 1); \
454 env->cc_op = vstrc(v1, v2, v3, v4, in, 0, zs, MO_##BITS); \
461 void HELPER(gvec_vstrc_cc_rt##BITS)(void *v1, const void *v2, const void *v3, \
465 const bool in = extract32(simd_data(desc), 3, 1); \
466 const bool zs = extract32(simd_data(desc), 1, 1); \
468 env->cc_op = vstrc(v1, v2, v3, v4, in, 1, zs, MO_##BITS); \
474 static int vstrs(S390Vector *v1, const S390Vector *v2, const S390Vector *v3, in vstrs() argument
504 if (s390_vec_read_element(v2, k, es) == 0) { in vstrs()
511 cc = str_leftmost_0 == nelem ? 0 : 1; /* No match. */ in vstrs()
515 uint32_t e2 = s390_vec_read_element(v2, j, es); in vstrs()
524 cc = 1; /* Ignored match. */ in vstrs()
537 s390_vec_write_element64(v1, 1, 0); in vstrs()
542 void QEMU_FLATTEN HELPER(gvec_vstrs_##BITS)(void *v1, const void *v2, \
544 { env->cc_op = vstrs(v1, v2, v3, v4, MO_##BITS, false); } \
545 void QEMU_FLATTEN HELPER(gvec_vstrs_zs##BITS)(void *v1, const void *v2, \
547 { env->cc_op = vstrs(v1, v2, v3, v4, MO_##BITS, true); }