On 5/15/19 1:31 PM, David Hildenbrand wrote: > Similar to VECTOR FIND ELEMENT EQUAL, however the search also stops on > any inequality. A match for inequality seems to have precedence over > a match for zero, because both elements have to be zero. > > Signed-off-by: David Hildenbrand <da...@redhat.com> > --- > target/s390x/helper.h | 6 ++++ > target/s390x/insn-data.def | 2 ++ > target/s390x/translate_vx.inc.c | 31 +++++++++++++++++++ > target/s390x/vec_string_helper.c | 53 ++++++++++++++++++++++++++++++++ > 4 files changed, 92 insertions(+)
Like the previous, only with static inline uint64_t nonzero_search(uint64_t a, uint64_t m) { return (((a & m) + m) | a) & ~m; } for the inequality. r~