Merge pull request #4190 from martin-frbg/issue4186-2

Allow negative INCX in the ?NRM2 kernels
This commit is contained in:
Martin Kroeker 2023-08-10 23:12:59 +02:00 committed by GitHub
commit ebc157fcc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 38 additions and 38 deletions

View File

@ -57,7 +57,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
FLOAT absxi = 0.0;
if (n <= 0 || inc_x <= 0) return(0.0);
if (n <= 0 || inc_x == 0) return(0.0);
if ( n == 1 ) return( ABS(x[0]) );
n *= inc_x;

View File

@ -57,7 +57,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
BLASLONG inc_x2;
FLOAT temp;
if (n <= 0 || inc_x <= 0) return(0.0);
if (n <= 0 || inc_x == 0) return(0.0);
inc_x2 = 2 * inc_x;

View File

@ -61,7 +61,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
fmov.d s2, s1
bge $r0, N, .L999
slli.d INCX, INCX, ZBASE_SHIFT
bge $r0, INCX, .L999
beq $r0, INCX, .L999
srai.d I, N, 2
bge $r0, I, .L25
LD a1, X, 0 * SIZE

View File

@ -70,7 +70,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MTC s1, $r0
bge $r0, N, .L999
slli.d INCX, INCX, BASE_SHIFT
bge $r0, INCX, .L999
beq $r0, INCX, .L999
move XX, X
NOP
LD a1, X, 0 * SIZE

View File

@ -61,7 +61,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
fmov.d s2, s1
bge $r0, N, .L999
slli.d INCX, INCX, BASE_SHIFT
bge $r0, INCX, .L999
beq $r0, INCX, .L999
srai.d I, N, 3
bne INCX, TEMP, .L20
bge $r0, I, .L15

View File

@ -64,7 +64,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MTC s1, $r0
bge $r0, N, .L999
slli.d INCX, INCX, ZBASE_SHIFT
bge $r0, INCX, .L999
beq $r0, INCX, .L999
move XX, X
MOV s2, s1
srai.d I, N, 2

View File

@ -57,7 +57,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
FLOAT absxi = 0.0;
if (n <= 0 || inc_x <= 0) return(0.0);
if (n <= 0 || inc_x == 0) return(0.0);
if ( n == 1 ) return( ABS(x[0]) );
n *= inc_x;

View File

@ -48,7 +48,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
BLASLONG inc_x2;
FLOAT temp;
if (n <= 0 || inc_x <= 0) return(0.0);
if (n <= 0 || inc_x == 0) return(0.0);
inc_x2 = 2 * inc_x;

View File

@ -77,7 +77,7 @@
blez N, .L999
mov.d s2, s1
blez INCX, .L999
beqz INCX, .L999
dsll INCX, INCX, ZBASE_SHIFT
dsra I, N, 2

View File

@ -81,7 +81,7 @@
blez N, .L999
MTC $0, s1
blez INCX, .L999
beqz INCX, .L999
dsll INCX, INCX, BASE_SHIFT
move XX, X

View File

@ -77,7 +77,7 @@
blez N, .L999
mov.d s2, s1
blez INCX, .L999
beqz INCX, .L999
dsll INCX, INCX, BASE_SHIFT
bne INCX, TEMP, .L20

View File

@ -80,7 +80,7 @@
blez N, .L999
MTC $0, s1
blez INCX, .L999
beqz INCX, .L999
dsll INCX, INCX, ZBASE_SHIFT
move XX, X

View File

@ -99,7 +99,7 @@
cmpwi cr0, N, 0
ble- LL(9999)
cmpwi cr0, INCX, 0
ble- LL(9999)
beq- LL(9999)
fmr f0, f1
fmr f2, f1

View File

@ -119,7 +119,7 @@
cmpwi cr0, N, 0
ble LL(99)
cmpwi cr0, INCX, 0
ble LL(99)
beq LL(99)
andi. r0, X, 2 * SIZE - 1
bne LL(100)

View File

@ -104,7 +104,7 @@
cmpwi cr0, N, 0
ble- LL(999)
cmpwi cr0, INCX, 0
ble- LL(999)
beq- LL(999)
fmr f0, f1
sub X, X, INCX

View File

@ -134,7 +134,7 @@
cmpwi cr0, N, 0
ble LL(99)
cmpwi cr0, INCX, 0
ble LL(99)
beq LL(99)
mr XX, X

View File

@ -111,7 +111,7 @@
cmpwi cr0, N, 0
ble- LL(999)
cmpwi cr0, INCX, 0
ble- LL(999)
beq- LL(999)
mr NN, N
mr XX, X

View File

@ -113,7 +113,7 @@
cmpwi cr0, N, 0
ble- LL(9999)
cmpwi cr0, INCX, 0
ble- LL(9999)
beq- LL(9999)
mr NN, N
mr XX, X

View File

@ -97,7 +97,7 @@
cmpwi cr0, N, 0
ble- LL(9999)
cmpwi cr0, INCX, 0
ble- LL(9999)
beq- LL(9999)
fmr f0, f1
fmr f2, f1

View File

@ -119,7 +119,7 @@
cmpwi cr0, N, 0
ble LL(99)
cmpwi cr0, INCX, 0
ble LL(99)
beq LL(99)
cmpwi cr0, INCX, SIZE
bne LL(100)

View File

@ -105,7 +105,7 @@
cmpwi cr0, N, 0
ble- LL(999)
cmpwi cr0, INCX, 0
ble- LL(999)
beq- LL(999)
fmr f0, f1
fmr f2, f1

View File

@ -105,7 +105,7 @@
cmpwi cr0, N, 0
ble- LL(9999)
cmpwi cr0, INCX, 0
ble- LL(9999)
beq- LL(9999)
mr NN, N
mr XX, X

View File

@ -134,7 +134,7 @@
cmpwi cr0, N, 0
ble LL(99)
cmpwi cr0, INCX, 0
ble LL(99)
beq LL(99)
mr XX, X

View File

@ -112,7 +112,7 @@
cmpwi cr0, N, 0
ble- LL(999)
cmpwi cr0, INCX, 0
ble- LL(999)
beq- LL(999)
mr NN, N
mr XX, X

View File

@ -57,7 +57,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
FLOAT absxi = 0.0;
if (n <= 0 || inc_x <= 0) return(0.0);
if (n <= 0 || inc_x == 0) return(0.0);
if ( n == 1 ) return( ABS(x[0]) );
n *= inc_x;

View File

@ -57,7 +57,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
BLASLONG inc_x2;
FLOAT temp;
if (n <= 0 || inc_x <= 0) return(0.0);
if (n <= 0 || inc_x == 0) return(0.0);
inc_x2 = 2 * inc_x;

View File

@ -76,7 +76,7 @@
FMOV c1, t4
cmp INCX, 0
ble .LL20
beq .LL20
sll INCX, ZBASE_SHIFT, INCX
cmp N, 0

View File

@ -107,7 +107,7 @@
FMOV fzero, c1
cmp INCX, 0
ble .LL99
beq .LL99
sll INCX, BASE_SHIFT, INCX
add %sp, -8, %sp

View File

@ -76,7 +76,7 @@
FMOV c1, t4
cmp INCX, 0
ble .LL20
beq .LL20
sll INCX, BASE_SHIFT, INCX
cmp N, 0

View File

@ -107,7 +107,7 @@
FMOV fzero, c1
cmp INCX, 0
ble .LL99
beq .LL99
sll INCX, ZBASE_SHIFT, INCX
add %sp, -8, %sp

View File

@ -78,7 +78,7 @@
testl M, M
jle .L999
testl INCX, INCX
jle .L999
je .L999
sall $BASE_SHIFT, INCX
fldz

View File

@ -69,7 +69,7 @@
jle .L999
pxor %xmm1, %xmm1
testl INCX, INCX
jle .L999
je .L999
leal (, INCX, SIZE), INCX
cmpl $SIZE, INCX

View File

@ -78,7 +78,7 @@
testl M, M
jle .L999
testl INCX, INCX
jle .L999
je .L999
sall $ZBASE_SHIFT, INCX
fldz

View File

@ -69,7 +69,7 @@
jle .L999
pxor %xmm1, %xmm1
testl INCX, INCX
jle .L999
je .L999
sall $ZBASE_SHIFT, INCX

View File

@ -58,7 +58,7 @@
testq M, M
jle .L999
testq INCX, INCX
jle .L999
je .L999
salq $BASE_SHIFT, INCX

View File

@ -57,7 +57,7 @@
jle .L999
pxor %xmm1, %xmm1
testq INCX, INCX
jle .L999
je .L999
pxor %xmm2, %xmm2
leaq (, INCX, SIZE), INCX

View File

@ -58,7 +58,7 @@
testq M, M
jle .L999
testq INCX, INCX
jle .L999
je .L999
salq $ZBASE_SHIFT, INCX

View File

@ -58,7 +58,7 @@
jle .L999
pxor %xmm1, %xmm1
testq INCX, INCX
jle .L999
je .L999
xorq FLAG, FLAG