From d1bc75d7595b237f78b594509ea7cc159f98cae9 Mon Sep 17 00:00:00 2001 From: WANG Xuerui Date: Tue, 26 Jul 2022 23:57:20 +0800 Subject: LoongArch: Simplify "BLT foo, zero" with BLTZ Support for the syntactic sugar is present in upstream binutils port from the beginning. Use it for shorter lines and better consistency. Generated code should be identical. Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen --- arch/loongarch/include/asm/atomic.h | 8 ++++---- arch/loongarch/mm/tlbex.S | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'arch/loongarch') diff --git a/arch/loongarch/include/asm/atomic.h b/arch/loongarch/include/asm/atomic.h index 0869bec2c937..dc2ae4f22c8e 100644 --- a/arch/loongarch/include/asm/atomic.h +++ b/arch/loongarch/include/asm/atomic.h @@ -158,7 +158,7 @@ static inline int arch_atomic_sub_if_positive(int i, atomic_t *v) "1: ll.w %1, %2 # atomic_sub_if_positive\n" " addi.w %0, %1, %3 \n" " move %1, %0 \n" - " blt %0, $zero, 2f \n" + " bltz %0, 2f \n" " sc.w %1, %2 \n" " beqz %1, 1b \n" "2: \n" @@ -171,7 +171,7 @@ static inline int arch_atomic_sub_if_positive(int i, atomic_t *v) "1: ll.w %1, %2 # atomic_sub_if_positive\n" " sub.w %0, %1, %3 \n" " move %1, %0 \n" - " blt %0, $zero, 2f \n" + " bltz %0, 2f \n" " sc.w %1, %2 \n" " beqz %1, 1b \n" "2: \n" @@ -321,7 +321,7 @@ static inline long arch_atomic64_sub_if_positive(long i, atomic64_t *v) "1: ll.d %1, %2 # atomic64_sub_if_positive \n" " addi.d %0, %1, %3 \n" " move %1, %0 \n" - " blt %0, $zero, 2f \n" + " bltz %0, 2f \n" " sc.d %1, %2 \n" " beqz %1, 1b \n" "2: \n" @@ -334,7 +334,7 @@ static inline long arch_atomic64_sub_if_positive(long i, atomic64_t *v) "1: ll.d %1, %2 # atomic64_sub_if_positive \n" " sub.d %0, %1, %3 \n" " move %1, %0 \n" - " blt %0, $zero, 2f \n" + " bltz %0, 2f \n" " sc.d %1, %2 \n" " beqz %1, 1b \n" "2: \n" diff --git a/arch/loongarch/mm/tlbex.S b/arch/loongarch/mm/tlbex.S index 4d16e27020e0..9ca1e3ff1ded 100644 --- a/arch/loongarch/mm/tlbex.S +++ b/arch/loongarch/mm/tlbex.S @@ -47,7 +47,7 @@ SYM_FUNC_START(handle_tlb_load) * The vmalloc handling is not in the hotpath. */ csrrd t0, LOONGARCH_CSR_BADV - blt t0, zero, vmalloc_load + bltz t0, vmalloc_load csrrd t1, LOONGARCH_CSR_PGDL vmalloc_done_load: @@ -210,7 +210,7 @@ SYM_FUNC_START(handle_tlb_store) * The vmalloc handling is not in the hotpath. */ csrrd t0, LOONGARCH_CSR_BADV - blt t0, zero, vmalloc_store + bltz t0, vmalloc_store csrrd t1, LOONGARCH_CSR_PGDL vmalloc_done_store: @@ -378,7 +378,7 @@ SYM_FUNC_START(handle_tlb_modify) * The vmalloc handling is not in the hotpath. */ csrrd t0, LOONGARCH_CSR_BADV - blt t0, zero, vmalloc_modify + bltz t0, vmalloc_modify csrrd t1, LOONGARCH_CSR_PGDL vmalloc_done_modify: -- cgit v1.2.3