From 3fce9bf6e976abdbfa7fafd2a1e89934021f4a18 Mon Sep 17 00:00:00 2001 From: Mao Minkai Date: Mon, 8 Aug 2022 10:04:28 +0800 Subject: [PATCH] sw64: fix head loop in deep-copy_template.S Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5PN9S -------------------------------- Fix conditional branch of head loop in deep-copy_template.S, so it will go to simd loop properly when dst is 32 bytes aligned. Signed-off-by: Mao Minkai Signed-off-by: Gu Zitao --- arch/sw_64/lib/deep-copy_template.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/sw_64/lib/deep-copy_template.S b/arch/sw_64/lib/deep-copy_template.S index 8355ecf8a905..f80be2bef44c 100644 --- a/arch/sw_64/lib/deep-copy_template.S +++ b/arch/sw_64/lib/deep-copy_template.S @@ -83,9 +83,9 @@ $quad_loop_head: addl $17, 8, $17 FIXUP_LDST( stl $2, 0($16) ) addl $16, 8, $16 - and $16, 31, $1 blt $18, $simd_end - beq $16, $dest_aligned_32 + and $16, 31, $1 + beq $1, $dest_aligned_32 br $31, $quad_loop_head $dest_aligned_32: @@ -191,7 +191,8 @@ $quad_u_loop_head: FIXUP_LDST( stl $2, 0($16) ) addl $16, 8, $16 blt $18, $simd_end - beq $16, $dest_aligned_32 + and $16, 31, $1 + beq $1, $dest_aligned_32 br $31, $quad_u_loop_head $prep_simd_u_loop: -- GitLab