kernel: add bit rotation helpers for 16 and 8 bit