From 4c03ed437f3a021dfd21ee470b4f0191f32d9885 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sun, 14 Apr 2024 15:39:11 +0200 Subject: [PATCH] Fix SICORTEX ASUM/ZASUM and SUM/ZSUM for INCX <=0 (#4640) * Exit early if INCX <= 0 --- kernel/mips64/asum.S | 1 + kernel/mips64/sum.S | 1 + kernel/mips64/zasum.S | 1 + kernel/mips64/zsum.S | 1 + 4 files changed, 4 insertions(+) diff --git a/kernel/mips64/asum.S b/kernel/mips64/asum.S index 2bf95c65d2..4e75529f52 100644 --- a/kernel/mips64/asum.S +++ b/kernel/mips64/asum.S @@ -73,6 +73,7 @@ MTC $0, s1 MTC $0, s2 + blez INCX, .L999 dsll INCX, INCX, BASE_SHIFT blez N, .L999 diff --git a/kernel/mips64/sum.S b/kernel/mips64/sum.S index 261630d49d..725346ff62 100644 --- a/kernel/mips64/sum.S +++ b/kernel/mips64/sum.S @@ -73,6 +73,7 @@ MTC $0, s1 MTC $0, s2 + blez INCX, .L999 dsll INCX, INCX, BASE_SHIFT blez N, .L999 diff --git a/kernel/mips64/zasum.S b/kernel/mips64/zasum.S index cd22f98414..a7af6918da 100644 --- a/kernel/mips64/zasum.S +++ b/kernel/mips64/zasum.S @@ -73,6 +73,7 @@ MTC $0, s1 MTC $0, s2 + blez INCX, .L999 dsll INCX, INCX, ZBASE_SHIFT blez N, .L999 diff --git a/kernel/mips64/zsum.S b/kernel/mips64/zsum.S index 129b97900e..83c5393197 100644 --- a/kernel/mips64/zsum.S +++ b/kernel/mips64/zsum.S @@ -73,6 +73,7 @@ MTC $0, s1 MTC $0, s2 + blez INCX, .L999 dsll INCX, INCX, ZBASE_SHIFT blez N, .L999