aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/arm_conv/pooling/kernels/sve_s8_nhwc_avg_generic_depthfirst/generic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/NEON/kernels/arm_conv/pooling/kernels/sve_s8_nhwc_avg_generic_depthfirst/generic.cpp')
-rw-r--r--src/core/NEON/kernels/arm_conv/pooling/kernels/sve_s8_nhwc_avg_generic_depthfirst/generic.cpp140
1 files changed, 70 insertions, 70 deletions
diff --git a/src/core/NEON/kernels/arm_conv/pooling/kernels/sve_s8_nhwc_avg_generic_depthfirst/generic.cpp b/src/core/NEON/kernels/arm_conv/pooling/kernels/sve_s8_nhwc_avg_generic_depthfirst/generic.cpp
index dab142f3f4..68bd831d63 100644
--- a/src/core/NEON/kernels/arm_conv/pooling/kernels/sve_s8_nhwc_avg_generic_depthfirst/generic.cpp
+++ b/src/core/NEON/kernels/arm_conv/pooling/kernels/sve_s8_nhwc_avg_generic_depthfirst/generic.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021-2022 Arm Limited.
+ * Copyright (c) 2021-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -95,21 +95,21 @@ void sve_s8_nhwc_avg_generic_depthfirst_impl(
}
__asm__ __volatile__(
- "mov x26, #0x0\n"
- "cntb x25\n"
- "cntb x24, ALL, MUL #2\n"
- "cntb x23, ALL, MUL #3\n"
- "whilelt p4.b, x26, %x[n_channels]\n"
- "whilelt p3.b, x25, %x[n_channels]\n"
- "whilelt p2.b, x24, %x[n_channels]\n"
- "whilelt p1.b, x23, %x[n_channels]\n"
+ "mov x27, #0x0\n"
+ "cntb x26\n"
+ "cntb x25, ALL, MUL #2\n"
+ "cntb x24, ALL, MUL #3\n"
+ "whilelt p4.b, x27, %x[n_channels]\n"
+ "whilelt p3.b, x26, %x[n_channels]\n"
+ "whilelt p2.b, x25, %x[n_channels]\n"
+ "whilelt p1.b, x24, %x[n_channels]\n"
"ptrue p0.b\n"
"b.none 7f\n"
"1:" // 4-vectors of channels
- "lsr x22, %x[n_valid_cells], #0x1\n"
+ "lsr x23, %x[n_valid_cells], #0x1\n"
"mov z15.s, #0x0\n"
"mov z14.s, #0x0\n"
- "mov x19, %x[inptrs]\n"
+ "mov x20, %x[inptrs]\n"
"mov z13.s, #0x0\n"
"mov z12.s, #0x0\n"
"mov z11.s, #0x0\n"
@@ -124,43 +124,43 @@ void sve_s8_nhwc_avg_generic_depthfirst_impl(
"mov z2.s, #0x0\n"
"mov z1.s, #0x0\n"
"mov z0.s, #0x0\n"
- "cbz x22, 4f\n"
- "ldp x21, x20, [x19, #0x0]\n"
- "subs x22, x22, #0x1\n"
- "add x19, x19, #0x10\n"
- "ld1b { z31.b }, p4/Z, [x21, x26]\n"
- "ld1b { z30.b }, p4/Z, [x20, x26]\n"
- "ld1b { z29.b }, p3/Z, [x21, x25]\n"
- "ld1b { z28.b }, p3/Z, [x20, x25]\n"
- "ld1b { z27.b }, p2/Z, [x21, x24]\n"
- "ld1b { z26.b }, p2/Z, [x20, x24]\n"
- "ld1b { z25.b }, p1/Z, [x21, x23]\n"
- "ld1b { z24.b }, p1/Z, [x20, x23]\n"
+ "cbz x23, 4f\n"
+ "ldp x22, x21, [x20, #0x0]\n"
+ "subs x23, x23, #0x1\n"
+ "add x20, x20, #0x10\n"
+ "ld1b { z31.b }, p4/Z, [x22, x27]\n"
+ "ld1b { z30.b }, p4/Z, [x21, x27]\n"
+ "ld1b { z29.b }, p3/Z, [x22, x26]\n"
+ "ld1b { z28.b }, p3/Z, [x21, x26]\n"
+ "ld1b { z27.b }, p2/Z, [x22, x25]\n"
+ "ld1b { z26.b }, p2/Z, [x21, x25]\n"
+ "ld1b { z25.b }, p1/Z, [x22, x24]\n"
+ "ld1b { z24.b }, p1/Z, [x21, x24]\n"
"beq 3f\n"
"2:" // 4-vectors of channels: 2 inputs loop
".inst 0x455e03f7 // saddlb z23.h, z31.b, z30.b\n"
".inst 0x455e07f6 // saddlt z22.h, z31.b, z30.b\n"
- "ldp x21, x20, [x19, #0x0]\n"
- "subs x22, x22, #0x1\n"
+ "ldp x22, x21, [x20, #0x0]\n"
+ "subs x23, x23, #0x1\n"
".inst 0x455c03b5 // saddlb z21.h, z29.b, z28.b\n"
".inst 0x455c07b4 // saddlt z20.h, z29.b, z28.b\n"
- "add x19, x19, #0x10\n"
- "ld1b { z31.b }, p4/Z, [x21, x26]\n"
+ "add x20, x20, #0x10\n"
+ "ld1b { z31.b }, p4/Z, [x22, x27]\n"
".inst 0x455a0373 // saddlb z19.h, z27.b, z26.b\n"
".inst 0x455a0772 // saddlt z18.h, z27.b, z26.b\n"
- "ld1b { z30.b }, p4/Z, [x20, x26]\n"
- "ld1b { z29.b }, p3/Z, [x21, x25]\n"
+ "ld1b { z30.b }, p4/Z, [x21, x27]\n"
+ "ld1b { z29.b }, p3/Z, [x22, x26]\n"
".inst 0x45580331 // saddlb z17.h, z25.b, z24.b\n"
".inst 0x45580730 // saddlt z16.h, z25.b, z24.b\n"
- "ld1b { z28.b }, p3/Z, [x20, x25]\n"
- "ld1b { z27.b }, p2/Z, [x21, x24]\n"
+ "ld1b { z28.b }, p3/Z, [x21, x26]\n"
+ "ld1b { z27.b }, p2/Z, [x22, x25]\n"
".inst 0x459741ef // saddwb z15.s, z15.s, z23.h\n"
".inst 0x459745ce // saddwt z14.s, z14.s, z23.h\n"
- "ld1b { z26.b }, p2/Z, [x20, x24]\n"
- "ld1b { z25.b }, p1/Z, [x21, x23]\n"
+ "ld1b { z26.b }, p2/Z, [x21, x25]\n"
+ "ld1b { z25.b }, p1/Z, [x22, x24]\n"
".inst 0x459641ad // saddwb z13.s, z13.s, z22.h\n"
".inst 0x4596458c // saddwt z12.s, z12.s, z22.h\n"
- "ld1b { z24.b }, p1/Z, [x20, x23]\n"
+ "ld1b { z24.b }, p1/Z, [x21, x24]\n"
".inst 0x4595416b // saddwb z11.s, z11.s, z21.h\n"
".inst 0x4595454a // saddwt z10.s, z10.s, z21.h\n"
".inst 0x45944129 // saddwb z9.s, z9.s, z20.h\n"
@@ -200,21 +200,21 @@ void sve_s8_nhwc_avg_generic_depthfirst_impl(
".inst 0x45904021 // saddwb z1.s, z1.s, z16.h\n"
".inst 0x45904400 // saddwt z0.s, z0.s, z16.h\n"
"4:" // 4-vectors of channels: After loop
- "ands x20, %x[n_valid_cells], #0x1\n"
+ "ands x21, %x[n_valid_cells], #0x1\n"
"beq 6f\n"
"5:" // 4-vectors of channels: Single input loop
- "ldr x21, [x19], #0x8\n"
- "ld1b { z31.b }, p4/Z, [x21, x26]\n"
+ "ldr x22, [x20], #0x8\n"
+ "ld1b { z31.b }, p4/Z, [x22, x27]\n"
".inst 0x4508a3f7 // sshllb z23.h, z31.b, #0x0\n"
".inst 0x4508a7f6 // sshllt z22.h, z31.b, #0x0\n"
- "ld1b { z29.b }, p3/Z, [x21, x25]\n"
- "ld1b { z27.b }, p2/Z, [x21, x24]\n"
+ "ld1b { z29.b }, p3/Z, [x22, x26]\n"
+ "ld1b { z27.b }, p2/Z, [x22, x25]\n"
".inst 0x4508a3b5 // sshllb z21.h, z29.b, #0x0\n"
".inst 0x4508a7b4 // sshllt z20.h, z29.b, #0x0\n"
- "ld1b { z25.b }, p1/Z, [x21, x23]\n"
+ "ld1b { z25.b }, p1/Z, [x22, x24]\n"
".inst 0x4508a373 // sshllb z19.h, z27.b, #0x0\n"
".inst 0x4508a772 // sshllt z18.h, z27.b, #0x0\n"
- "subs x20, x20, #0x1\n"
+ "subs x21, x21, #0x1\n"
".inst 0x4508a331 // sshllb z17.h, z25.b, #0x0\n"
".inst 0x4508a730 // sshllt z16.h, z25.b, #0x0\n"
".inst 0x459741ef // saddwb z15.s, z15.s, z23.h\n"
@@ -298,7 +298,7 @@ void sve_s8_nhwc_avg_generic_depthfirst_impl(
"smin z10.s, p0/M, z10.s, z18.s\n"
"smin z9.s, p0/M, z9.s, z18.s\n"
"trn1 z17.h, z11.h, z10.h\n"
- "st1b { z16.b }, p4, [%x[outptr], x26]\n"
+ "st1b { z16.b }, p4, [%x[outptr], x27]\n"
"smin z8.s, p0/M, z8.s, z18.s\n"
"smin z7.s, p0/M, z7.s, z18.s\n"
"trn1 z16.h, z9.h, z8.h\n"
@@ -306,7 +306,7 @@ void sve_s8_nhwc_avg_generic_depthfirst_impl(
"smin z6.s, p0/M, z6.s, z18.s\n"
"smin z5.s, p0/M, z5.s, z18.s\n"
"trn1 z17.h, z7.h, z6.h\n"
- "st1b { z16.b }, p3, [%x[outptr], x25]\n"
+ "st1b { z16.b }, p3, [%x[outptr], x26]\n"
"smin z4.s, p0/M, z4.s, z18.s\n"
"smin z3.s, p0/M, z3.s, z18.s\n"
"trn1 z16.h, z5.h, z4.h\n"
@@ -314,46 +314,46 @@ void sve_s8_nhwc_avg_generic_depthfirst_impl(
"smin z2.s, p0/M, z2.s, z18.s\n"
"smin z1.s, p0/M, z1.s, z18.s\n"
"trn1 z17.h, z3.h, z2.h\n"
- "st1b { z16.b }, p2, [%x[outptr], x24]\n"
+ "st1b { z16.b }, p2, [%x[outptr], x25]\n"
"smin z0.s, p0/M, z0.s, z18.s\n"
"trn1 z16.h, z1.h, z0.h\n"
"trn1 z16.b, z17.b, z16.b\n"
- "st1b { z16.b }, p1, [%x[outptr], x23]\n"
- "incb x23, ALL, MUL #4\n"
- "whilelt p1.b, x23, %x[n_channels]\n"
+ "st1b { z16.b }, p1, [%x[outptr], x24]\n"
+ "incb x24, ALL, MUL #4\n"
+ "whilelt p1.b, x24, %x[n_channels]\n"
+ "incb x27, ALL, MUL #4\n"
"incb x26, ALL, MUL #4\n"
"incb x25, ALL, MUL #4\n"
- "incb x24, ALL, MUL #4\n"
"b.any 1b\n"
"7:" // Single vector of channels
- "whilelt p4.b, x26, %x[n_channels]\n"
+ "whilelt p4.b, x27, %x[n_channels]\n"
"b.none 14f\n"
"8:" // Single vector of channels: Loop
- "lsr x22, %x[n_valid_cells], #0x1\n"
+ "lsr x23, %x[n_valid_cells], #0x1\n"
"mov z15.s, #0x0\n"
"mov z14.s, #0x0\n"
- "mov x19, %x[inptrs]\n"
+ "mov x20, %x[inptrs]\n"
"mov z13.s, #0x0\n"
"mov z12.s, #0x0\n"
- "cbz x22, 11f\n"
- "ldp x21, x20, [x19, #0x0]\n"
- "subs x22, x22, #0x1\n"
- "add x19, x19, #0x10\n"
- "ld1b { z31.b }, p4/Z, [x21, x26]\n"
- "ld1b { z30.b }, p4/Z, [x20, x26]\n"
+ "cbz x23, 11f\n"
+ "ldp x22, x21, [x20, #0x0]\n"
+ "subs x23, x23, #0x1\n"
+ "add x20, x20, #0x10\n"
+ "ld1b { z31.b }, p4/Z, [x22, x27]\n"
+ "ld1b { z30.b }, p4/Z, [x21, x27]\n"
"beq 10f\n"
"9:" // Single vector of channels: Loop: 2 inputs loop
".inst 0x455e03f7 // saddlb z23.h, z31.b, z30.b\n"
".inst 0x455e07f6 // saddlt z22.h, z31.b, z30.b\n"
- "ldp x21, x20, [x19, #0x0]\n"
- "subs x22, x22, #0x1\n"
+ "ldp x22, x21, [x20, #0x0]\n"
+ "subs x23, x23, #0x1\n"
".inst 0x459741ef // saddwb z15.s, z15.s, z23.h\n"
".inst 0x459745ce // saddwt z14.s, z14.s, z23.h\n"
- "add x19, x19, #0x10\n"
- "ld1b { z31.b }, p4/Z, [x21, x26]\n"
+ "add x20, x20, #0x10\n"
+ "ld1b { z31.b }, p4/Z, [x22, x27]\n"
".inst 0x459641ad // saddwb z13.s, z13.s, z22.h\n"
".inst 0x4596458c // saddwt z12.s, z12.s, z22.h\n"
- "ld1b { z30.b }, p4/Z, [x20, x26]\n"
+ "ld1b { z30.b }, p4/Z, [x21, x27]\n"
"bgt 9b\n"
"10:" // Single vector of channels: Loop: 2 inputs tail
".inst 0x455e03f7 // saddlb z23.h, z31.b, z30.b\n"
@@ -363,14 +363,14 @@ void sve_s8_nhwc_avg_generic_depthfirst_impl(
".inst 0x459641ad // saddwb z13.s, z13.s, z22.h\n"
".inst 0x4596458c // saddwt z12.s, z12.s, z22.h\n"
"11:" // Single vector of channels: Loop: After loop
- "ands x20, %x[n_valid_cells], #0x1\n"
+ "ands x21, %x[n_valid_cells], #0x1\n"
"beq 13f\n"
"12:" // Single vector of channels: Loop: Single input loop
- "ldr x21, [x19], #0x8\n"
- "ld1b { z31.b }, p4/Z, [x21, x26]\n"
+ "ldr x22, [x20], #0x8\n"
+ "ld1b { z31.b }, p4/Z, [x22, x27]\n"
".inst 0x4508a3f7 // sshllb z23.h, z31.b, #0x0\n"
".inst 0x4508a7f6 // sshllt z22.h, z31.b, #0x0\n"
- "subs x20, x20, #0x1\n"
+ "subs x21, x21, #0x1\n"
".inst 0x459741ef // saddwb z15.s, z15.s, z23.h\n"
".inst 0x459745ce // saddwt z14.s, z14.s, z23.h\n"
".inst 0x459641ad // saddwb z13.s, z13.s, z22.h\n"
@@ -400,14 +400,14 @@ void sve_s8_nhwc_avg_generic_depthfirst_impl(
"smin z12.s, p0/M, z12.s, z18.s\n"
"trn1 z16.h, z13.h, z12.h\n"
"trn1 z16.b, z17.b, z16.b\n"
- "st1b { z16.b }, p4, [%x[outptr], x26]\n"
- "incb x26\n"
- "whilelt p4.b, x26, %x[n_channels]\n"
+ "st1b { z16.b }, p4, [%x[outptr], x27]\n"
+ "incb x27\n"
+ "whilelt p4.b, x27, %x[n_channels]\n"
"b.any 8b\n"
"14:" // End
:
: [inptrs] "r" (inptrs), [n_channels] "r" (n_channels), [n_valid_cells] "r" (n_valid_cells), [outptr] "r" (outptr), [rescale_ptr] "r" (&rescale_value), [shift_ptr] "r" (&shift_value)
- : "cc", "memory", "p0", "p1", "p2", "p3", "p4", "x19", "x20", "x21", "x22", "x23", "x24", "x25", "x26", "z0", "z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8", "z9", "z10", "z11", "z12", "z13", "z14", "z15", "z16", "z17", "z18", "z19", "z20", "z21", "z22", "z23", "z24", "z25", "z26", "z27", "z28", "z29", "z30", "z31"
+ : "cc", "memory", "p0", "p1", "p2", "p3", "p4", "x20", "x21", "x22", "x23", "x24", "x25", "x26", "x27", "z0", "z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8", "z9", "z10", "z11", "z12", "z13", "z14", "z15", "z16", "z17", "z18", "z19", "z20", "z21", "z22", "z23", "z24", "z25", "z26", "z27", "z28", "z29", "z30", "z31"
);
}