diff options
author | WANG Xuerui <git@xen0n.name> | 2022-07-26 23:57:19 +0800 |
---|---|---|
committer | Huacai Chen <chenhuacai@loongson.cn> | 2022-07-29 18:22:32 +0800 |
commit | d47b2dc87c58154052daf8ac0f9229db5c7890cc (patch) | |
tree | 78ace17ff4fec7785d9a0622d51357afc6810087 /arch/loongarch/include/asm/cmpxchg.h | |
parent | 57ce5d3eefacfaadfe2ed0a3a85713d1ae6287b9 (diff) | |
download | linux-d47b2dc87c58154052daf8ac0f9229db5c7890cc.tar.gz linux-d47b2dc87c58154052daf8ac0f9229db5c7890cc.tar.bz2 linux-d47b2dc87c58154052daf8ac0f9229db5c7890cc.zip |
LoongArch: Simplify "BEQ/BNE foo, zero" with BEQZ/BNEZ
While B{EQ,NE}Z and B{EQ,NE} are different instructions, and the vastly
expanded range for branch destination does not really matter in the few
cases touched, use the B{EQ,NE}Z where possible for shorter lines and
better consistency (e.g. some places used "BEQ foo, zero", while some
used "BEQ zero, foo").
Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/include/asm/cmpxchg.h')
-rw-r--r-- | arch/loongarch/include/asm/cmpxchg.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/loongarch/include/asm/cmpxchg.h b/arch/loongarch/include/asm/cmpxchg.h index 9e9939196471..0a9b0fac1eee 100644 --- a/arch/loongarch/include/asm/cmpxchg.h +++ b/arch/loongarch/include/asm/cmpxchg.h @@ -57,7 +57,7 @@ static inline unsigned long __xchg(volatile void *ptr, unsigned long x, " bne %0, %z3, 2f \n" \ " move $t0, %z4 \n" \ " " st " $t0, %1 \n" \ - " beq $zero, $t0, 1b \n" \ + " beqz $t0, 1b \n" \ "2: \n" \ __WEAK_LLSC_MB \ : "=&r" (__ret), "=ZB"(*m) \ |