15 #include <linux/types.h>
16 #include <linux/string.h>
17 #include <linux/module.h>
37 uint64_t v = (*p | before_mask) ^ (goal & __insn_v1shrui(before_mask, 1));
42 zero_matches = __insn_v1cmpeqi(v, 0);
45 goal_matches = __insn_v1cmpeq(v, goal);
47 if (__builtin_expect((zero_matches | goal_matches) != 0, 0))
53 z =
CFZ(zero_matches);
54 g =
CFZ(goal_matches);
60 return (g <= z) ? ((
char *)p) + (g >> 3) :
NULL;