From cb8cc3f64901577758884c5e0313e290574b3b1e Mon Sep 17 00:00:00 2001 From: gxw Date: Thu, 16 Jan 2025 19:50:22 +0800 Subject: [PATCH] LoongArch64: Fixed LASX version of cscal and zscal --- kernel/loongarch64/cscal_lasx.S | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/kernel/loongarch64/cscal_lasx.S b/kernel/loongarch64/cscal_lasx.S index f535266630..5581a7a007 100644 --- a/kernel/loongarch64/cscal_lasx.S +++ b/kernel/loongarch64/cscal_lasx.S @@ -87,9 +87,9 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. bne INCX, TEMP, .L22 .L11: - bge $r0, I, .L997 CMPEQ $fcc0, ALPHAR, a1 CMPEQ $fcc1, ALPHAI, a1 + bge $r0, I, .L997 bceqz $fcc0, .L13 b .L14 .align 3 @@ -182,10 +182,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .align 3 .L22: - bge $r0, I, .L997 - move XX, X CMPEQ $fcc0, ALPHAR, a1 CMPEQ $fcc1, ALPHAI, a1 + bge $r0, I, .L997 + move XX, X bceqz $fcc0, .L23 b .L24 .align 3 @@ -477,6 +477,16 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endif bge $r0, I, .L999 .align 3 + bceqz $fcc0, .L998 + bceqz $fcc1, .L998 + +.L996: + addi.d I, I, -1 + ST a1, X, 0 * SIZE + ST a1, X, 1 * SIZE + add.d X, X, INCX + blt $r0, I, .L996 + b .L999 .L998: LD a1, X, 0 * SIZE