diff options
Diffstat (limited to 'target/s390x/vec_int_helper.c')
| -rw-r--r-- | target/s390x/vec_int_helper.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/target/s390x/vec_int_helper.c b/target/s390x/vec_int_helper.c index 06f8bfa30d..09137dab99 100644 --- a/target/s390x/vec_int_helper.c +++ b/target/s390x/vec_int_helper.c @@ -567,3 +567,19 @@ void HELPER(gvec_vsrl)(void *v1, const void *v2, uint64_t count, { s390_vec_shr(v1, v2, count); } + +#define DEF_VSCBI(BITS) \ +void HELPER(gvec_vscbi##BITS)(void *v1, const void *v2, const void *v3, \ + uint32_t desc) \ +{ \ + int i; \ + \ + for (i = 0; i < (128 / BITS); i++) { \ + const uint##BITS##_t a = s390_vec_read_element##BITS(v2, i); \ + const uint##BITS##_t b = s390_vec_read_element##BITS(v3, i); \ + \ + s390_vec_write_element##BITS(v1, i, a < b); \ + } \ +} +DEF_VSCBI(8) +DEF_VSCBI(16) |