]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[libc] Add bit-rotation functions for unsigned long values
authorMichael Brown <mcb30@ipxe.org>
Thu, 9 Jul 2020 12:51:30 +0000 (13:51 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 9 Jul 2020 12:52:31 +0000 (13:52 +0100)
commitf7ddda435cf0d116098351986f89517e3d88af13
treee40efe1007703bb3f1dedf79229f166b8cb5e714
parent98d49e460a27f74212aab2d6b5eef1143c7a8e37
[libc] Add bit-rotation functions for unsigned long values

Generalise the bit rotation implementations to use a common macro, and
add roll() and rorl() to handle unsigned long values.

Each function will still compile down to a single instruction.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/rotate.h