Skip to content
Commit 87321fdd authored by Paul Burton's avatar Paul Burton Committed by Ralf Baechle
Browse files

MIPS: Implement __arch_bitrev* using bitswap for MIPSr6



Release 6 of the MIPS architecture introduced the bitswap instruction,
which reverses the bits within each byte of a word. Make use of this
instruction to implement the __arch_bitrev* functions, which should be
faster for most MIPSr6 CPUs, reduces code size slightly and allows us to
avoid the lookup table used by the generic implementation, saving 256
bytes in the kernel binary by dropping that.

Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13204/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 015aa05f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment