15 #include <linux/types.h>
16 #include <linux/string.h>
17 #include <linux/module.h>
40 const uint32_t before_mask = (1 << (s_int << 3)) - 1;
41 uint32_t v = (*p | before_mask) ^ (goal & __insn_shrib(before_mask, 1));
46 zero_matches = __insn_seqb(v, 0);
49 goal_matches = __insn_seqb(v, goal);
51 if (__builtin_expect(zero_matches | goal_matches, 0))
57 z = __insn_ctz(zero_matches);
58 g = __insn_ctz(goal_matches);
64 return (g <= z) ? ((
char *)p) + (g >> 3) :
NULL;