]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Use SLL by 0 for 32-bit truncation in `__read_64bit_c0_split'
authorMaciej W. Rozycki <macro@imgtec.com>
Fri, 29 Sep 2017 15:26:31 +0000 (16:26 +0100)
committerJames Hogan <jhogan@kernel.org>
Wed, 8 Nov 2017 21:50:52 +0000 (21:50 +0000)
commit3aa86f09d82a1869154c658768f132e15ac0576d
tree5b80d9ec87799dde7054bd6daa00ee3c9611ee4c
parentf0bd2a3aefc9c77c92c69eed0bd47d5f95e0b951
MIPS: Use SLL by 0 for 32-bit truncation in `__read_64bit_c0_split'

Optimize `__read_64bit_c0_split' and reduce the instruction count by 1,
observing that a DSLL/DSRA pair by 32, is equivalent to SLL by 0, which
architecturally truncates the value requested to 32 bits on 64-bit MIPS
hardware regardless of whether the input operand is or is not a properly
sign-extended 32-bit value.

Signed-off-by: Maciej W. Rozycki <macro@imgtec.com>
Reviewed-by: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17399/
Signed-off-by: James Hogan <jhogan@kernel.org>
arch/mips/include/asm/mipsregs.h