On 29/04/2025 10:53 pm, Linus Torvalds wrote: > I just did > > gcc -m32 -O2 -S -fomit-frame-pointer t.c > > (with, and without that -m32) and looked at the result to see that it > looks sane. No *actual* testing.
do_variable_ffs() doesn't quite work. REP BSF is LZCNT, and unconditionally writes it's output operand, and defeats the attempt to preload with -1. Drop the REP prefix, and it should work as intended. ~Andrew