Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45938 )
Change subject: lib and libpayload: add 64-bit versions of clz, __ffs and log2 ......................................................................
Patch Set 2:
(4 comments)
https://review.coreboot.org/c/coreboot/+/45938/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/45938/1//COMMIT_MSG@7 PS1, Line 7: lib
Could you add these to libpayload as well so the two stay in sync?
Done
https://review.coreboot.org/c/coreboot/+/45938/1/src/include/lib.h File src/include/lib.h:
https://review.coreboot.org/c/coreboot/+/45938/1/src/include/lib.h@59 PS1, Line 59: __builtin_clz
Careful, this is in and off itself a 32-bit function. […]
I guess I'd rather leave clz alone and just change this one.
https://review.coreboot.org/c/coreboot/+/45938/1/src/include/lib.h@59 PS1, Line 59: long long
Why does one of these return `long long` and the others int? I think int makes sense for all of them […]
Ack
https://review.coreboot.org/c/coreboot/+/45938/1/src/include/lib.h@61 PS1, Line 61: __ffs_64
nit: Linux calls this __ffs64(). […]
sure, that works, I'll just change those two and leave log2_64 for now.