riscv: atomic: Optimize dec_if_positive functions
Current implementation wastes another register to pass the argument, but we only need addi to calculate the result. Optimize the code with minimize the usage of registers. Signed-off-by:Guo Ren <guoren@linux.alibaba.com> Signed-off-by:
Guo Ren <guoren@kernel.org> Link: https://lore.kernel.org/r/20220505035526.2974382-3-guoren@kernel.orgSigned-off-by:
Palmer Dabbelt <palmer@rivosinc.com>
Showing
Please register or sign in to comment