Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 1 | /* |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 2 | * Copyright (c) 2021-2023 Arm Limited. |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: MIT |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | * of this software and associated documentation files (the "Software"), to |
| 8 | * deal in the Software without restriction, including without limitation the |
| 9 | * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 10 | * sell copies of the Software, and to permit persons to whom the Software is |
| 11 | * furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included in all |
| 14 | * copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 22 | * SOFTWARE. |
| 23 | */ |
| 24 | |
| 25 | #include "pooling.hpp" |
| 26 | #include <cstdint> |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 27 | #include <cstddef> |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 28 | #include <cstring> |
| 29 | #include <cmath> |
| 30 | |
| 31 | |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 32 | #if defined(ARM_COMPUTE_ENABLE_SVE) |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 33 | |
| 34 | namespace arm_conv { |
| 35 | namespace pooling { |
| 36 | |
| 37 | namespace { |
| 38 | struct RescaleParams |
| 39 | { |
| 40 | int32_t multiplier, shift; |
| 41 | }; |
| 42 | |
| 43 | constexpr RescaleParams rescale_params[8] = { |
| 44 | {0x40000000, -0}, // 1/2 |
Michele Di Giorgio | cf87f50 | 2021-02-02 14:59:09 +0000 | [diff] [blame] | 45 | {0x55555556, -1}, // 1/3 |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 46 | {0x40000000, -1}, // 1/4 |
| 47 | {0x66666666, -2}, // 1/5 |
Michele Di Giorgio | cf87f50 | 2021-02-02 14:59:09 +0000 | [diff] [blame] | 48 | {0x55555556, -2}, // 1/6 |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 49 | {0x49249249, -2}, // 1/7 |
| 50 | {0x40000000, -2}, // 1/8 |
| 51 | {0x71c71c72, -3}, // 1/9 |
| 52 | }; |
| 53 | } |
| 54 | |
| 55 | void sve_u8q_nhwc_avg_generic_depthfirst_impl( |
| 56 | const uint64_t window_cells, |
| 57 | const uint64_t n_valid_cells, |
| 58 | uint64_t n_channels, |
| 59 | const uint8_t *const *const inptrs, |
| 60 | uint8_t *outptr, |
| 61 | const Requantize32 &qp |
| 62 | ) |
| 63 | { |
| 64 | if (n_valid_cells == 1 && window_cells == 1) |
| 65 | { |
| 66 | // In this case, simply copy from the input to the output |
| 67 | std::memcpy(outptr, *inptrs, n_channels); |
| 68 | return; |
| 69 | } |
| 70 | |
| 71 | // Compute (or look up) the rescale values |
| 72 | int32_t shift_value = 0, rescale_value = 0; |
| 73 | if (2 <= window_cells && window_cells <= 9) |
| 74 | { |
| 75 | auto ¶ms = rescale_params[window_cells - 2]; |
| 76 | rescale_value = params.multiplier; |
| 77 | shift_value = params.shift; |
| 78 | } |
| 79 | else |
| 80 | { |
| 81 | auto f_rescale_value = 1.0f / static_cast<float>(window_cells); |
| 82 | |
| 83 | shift_value = 0; |
| 84 | while (f_rescale_value < 0.5f) |
| 85 | { |
| 86 | shift_value--; |
| 87 | f_rescale_value *= 2.0f; |
| 88 | } |
| 89 | |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 90 | int64_t long_rescale_value = round(f_rescale_value * static_cast<float>(1ll << 31)); |
| 91 | if (long_rescale_value == (1ll << 31)) |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 92 | { |
| 93 | shift_value++; |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 94 | long_rescale_value >>= 1; |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 95 | } |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 96 | rescale_value = static_cast<int32_t>(long_rescale_value); |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 97 | } |
| 98 | |
| 99 | |
| 100 | // Initialise the accumulators such that the offsets are subtracted for all |
| 101 | // valid inputs. |
| 102 | const int32_t accumulator_init = -qp.input_offset * n_valid_cells; |
| 103 | |
| 104 | // Combine together the rescale value for the requantization and the scaling |
| 105 | // factor for the average pool. |
| 106 | const int32_t shift = qp.per_layer_left_shift - qp.per_layer_right_shift + shift_value; |
| 107 | const int32_t left_shift = shift > 0 ? shift : 0; |
| 108 | const int32_t right_shift = shift <= 0 ? shift : 0; |
| 109 | |
| 110 | int32_t combined_rescale_value = 0; |
| 111 | __asm__ __volatile__ ( |
| 112 | "mov v16.s[0], %w[per_layer_mul]\n" |
| 113 | "mov v17.s[0], %w[rescale_value]\n" |
| 114 | "sqrdmulh s18, s16, s17\n" |
| 115 | "mov %w[combined_rescale_value], v18.s[0]\n" |
| 116 | : [combined_rescale_value] "=r" (combined_rescale_value) |
| 117 | : [per_layer_mul] "r" (qp.per_layer_mul), [rescale_value] "r" (rescale_value) |
Michele Di Giorgio | cf87f50 | 2021-02-02 14:59:09 +0000 | [diff] [blame] | 118 | : "v16", "v17", "v18" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 119 | ); |
| 120 | |
| 121 | __asm__ __volatile__( |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 122 | "mov x27, #0x0\n" |
| 123 | "cntb x26\n" |
| 124 | "cntb x25, ALL, MUL #2\n" |
| 125 | "cntb x24, ALL, MUL #3\n" |
| 126 | "whilelt p4.b, x27, %x[n_channels]\n" |
| 127 | "whilelt p3.b, x26, %x[n_channels]\n" |
| 128 | "whilelt p2.b, x25, %x[n_channels]\n" |
| 129 | "whilelt p1.b, x24, %x[n_channels]\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 130 | "ptrue p0.b\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 131 | "b.none 7f\n" |
| 132 | "1:" // 4-vectors of channels |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 133 | "ld1rw { z15.s }, p0/Z, [%x[accumulator_init]]\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 134 | "lsr x23, %x[n_valid_cells], #0x1\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 135 | "mov z14.d, z15.d\n" |
| 136 | "mov z13.d, z15.d\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 137 | "mov z12.d, z15.d\n" |
| 138 | "mov z11.d, z15.d\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 139 | "mov x20, %x[inptrs]\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 140 | "mov z10.d, z15.d\n" |
| 141 | "mov z9.d, z15.d\n" |
| 142 | "mov z8.d, z15.d\n" |
| 143 | "mov z7.d, z15.d\n" |
| 144 | "mov z6.d, z15.d\n" |
| 145 | "mov z5.d, z15.d\n" |
| 146 | "mov z4.d, z15.d\n" |
| 147 | "mov z3.d, z15.d\n" |
| 148 | "mov z2.d, z15.d\n" |
| 149 | "mov z1.d, z15.d\n" |
| 150 | "mov z0.d, z15.d\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 151 | "cbz x23, 4f\n" |
| 152 | "ldp x22, x21, [x20, #0x0]\n" |
| 153 | "subs x23, x23, #0x1\n" |
| 154 | "add x20, x20, #0x10\n" |
| 155 | "ld1b { z31.b }, p4/Z, [x22, x27]\n" |
| 156 | "ld1b { z30.b }, p4/Z, [x21, x27]\n" |
| 157 | "ld1b { z29.b }, p3/Z, [x22, x26]\n" |
| 158 | "ld1b { z28.b }, p3/Z, [x21, x26]\n" |
| 159 | "ld1b { z27.b }, p2/Z, [x22, x25]\n" |
| 160 | "ld1b { z26.b }, p2/Z, [x21, x25]\n" |
| 161 | "ld1b { z25.b }, p1/Z, [x22, x24]\n" |
| 162 | "ld1b { z24.b }, p1/Z, [x21, x24]\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 163 | "beq 3f\n" |
| 164 | "2:" // 4-vectors of channels: 2 inputs loop |
| 165 | ".inst 0x455e0bf7 // uaddlb z23.h, z31.b, z30.b\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 166 | ".inst 0x455e0ff6 // uaddlt z22.h, z31.b, z30.b\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 167 | "ldp x22, x21, [x20, #0x0]\n" |
| 168 | "subs x23, x23, #0x1\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 169 | ".inst 0x455c0bb5 // uaddlb z21.h, z29.b, z28.b\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 170 | ".inst 0x455c0fb4 // uaddlt z20.h, z29.b, z28.b\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 171 | "add x20, x20, #0x10\n" |
| 172 | "ld1b { z31.b }, p4/Z, [x22, x27]\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 173 | ".inst 0x455a0b73 // uaddlb z19.h, z27.b, z26.b\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 174 | ".inst 0x455a0f72 // uaddlt z18.h, z27.b, z26.b\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 175 | "ld1b { z30.b }, p4/Z, [x21, x27]\n" |
| 176 | "ld1b { z29.b }, p3/Z, [x22, x26]\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 177 | ".inst 0x45580b31 // uaddlb z17.h, z25.b, z24.b\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 178 | ".inst 0x45580f30 // uaddlt z16.h, z25.b, z24.b\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 179 | "ld1b { z28.b }, p3/Z, [x21, x26]\n" |
| 180 | "ld1b { z27.b }, p2/Z, [x22, x25]\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 181 | ".inst 0x459749ef // uaddwb z15.s, z15.s, z23.h\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 182 | ".inst 0x45974dce // uaddwt z14.s, z14.s, z23.h\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 183 | "ld1b { z26.b }, p2/Z, [x21, x25]\n" |
| 184 | "ld1b { z25.b }, p1/Z, [x22, x24]\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 185 | ".inst 0x459649ad // uaddwb z13.s, z13.s, z22.h\n" |
| 186 | ".inst 0x45964d8c // uaddwt z12.s, z12.s, z22.h\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 187 | "ld1b { z24.b }, p1/Z, [x21, x24]\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 188 | ".inst 0x4595496b // uaddwb z11.s, z11.s, z21.h\n" |
| 189 | ".inst 0x45954d4a // uaddwt z10.s, z10.s, z21.h\n" |
| 190 | ".inst 0x45944929 // uaddwb z9.s, z9.s, z20.h\n" |
| 191 | ".inst 0x45944d08 // uaddwt z8.s, z8.s, z20.h\n" |
| 192 | ".inst 0x459348e7 // uaddwb z7.s, z7.s, z19.h\n" |
| 193 | ".inst 0x45934cc6 // uaddwt z6.s, z6.s, z19.h\n" |
| 194 | ".inst 0x459248a5 // uaddwb z5.s, z5.s, z18.h\n" |
| 195 | ".inst 0x45924c84 // uaddwt z4.s, z4.s, z18.h\n" |
| 196 | ".inst 0x45914863 // uaddwb z3.s, z3.s, z17.h\n" |
| 197 | ".inst 0x45914c42 // uaddwt z2.s, z2.s, z17.h\n" |
| 198 | ".inst 0x45904821 // uaddwb z1.s, z1.s, z16.h\n" |
| 199 | ".inst 0x45904c00 // uaddwt z0.s, z0.s, z16.h\n" |
| 200 | "bgt 2b\n" |
| 201 | "3:" // 4-vectors of channels: 2 inputs tail |
| 202 | ".inst 0x455e0bf7 // uaddlb z23.h, z31.b, z30.b\n" |
| 203 | ".inst 0x455e0ff6 // uaddlt z22.h, z31.b, z30.b\n" |
| 204 | ".inst 0x455c0bb5 // uaddlb z21.h, z29.b, z28.b\n" |
| 205 | ".inst 0x455c0fb4 // uaddlt z20.h, z29.b, z28.b\n" |
| 206 | ".inst 0x455a0b73 // uaddlb z19.h, z27.b, z26.b\n" |
| 207 | ".inst 0x455a0f72 // uaddlt z18.h, z27.b, z26.b\n" |
| 208 | ".inst 0x45580b31 // uaddlb z17.h, z25.b, z24.b\n" |
| 209 | ".inst 0x45580f30 // uaddlt z16.h, z25.b, z24.b\n" |
| 210 | ".inst 0x459749ef // uaddwb z15.s, z15.s, z23.h\n" |
| 211 | ".inst 0x45974dce // uaddwt z14.s, z14.s, z23.h\n" |
| 212 | ".inst 0x459649ad // uaddwb z13.s, z13.s, z22.h\n" |
| 213 | ".inst 0x45964d8c // uaddwt z12.s, z12.s, z22.h\n" |
| 214 | ".inst 0x4595496b // uaddwb z11.s, z11.s, z21.h\n" |
| 215 | ".inst 0x45954d4a // uaddwt z10.s, z10.s, z21.h\n" |
| 216 | ".inst 0x45944929 // uaddwb z9.s, z9.s, z20.h\n" |
| 217 | ".inst 0x45944d08 // uaddwt z8.s, z8.s, z20.h\n" |
| 218 | ".inst 0x459348e7 // uaddwb z7.s, z7.s, z19.h\n" |
| 219 | ".inst 0x45934cc6 // uaddwt z6.s, z6.s, z19.h\n" |
| 220 | ".inst 0x459248a5 // uaddwb z5.s, z5.s, z18.h\n" |
| 221 | ".inst 0x45924c84 // uaddwt z4.s, z4.s, z18.h\n" |
| 222 | ".inst 0x45914863 // uaddwb z3.s, z3.s, z17.h\n" |
| 223 | ".inst 0x45914c42 // uaddwt z2.s, z2.s, z17.h\n" |
| 224 | ".inst 0x45904821 // uaddwb z1.s, z1.s, z16.h\n" |
| 225 | ".inst 0x45904c00 // uaddwt z0.s, z0.s, z16.h\n" |
| 226 | "4:" // 4-vectors of channels: After loop |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 227 | "ands x21, %x[n_valid_cells], #0x1\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 228 | "beq 6f\n" |
| 229 | "5:" // 4-vectors of channels: Single input loop |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 230 | "ldr x22, [x20], #0x8\n" |
| 231 | "ld1b { z31.b }, p4/Z, [x22, x27]\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 232 | ".inst 0x4508abf7 // ushllb z23.h, z31.b, #0x0\n" |
| 233 | ".inst 0x4508aff6 // ushllt z22.h, z31.b, #0x0\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 234 | "ld1b { z29.b }, p3/Z, [x22, x26]\n" |
| 235 | "ld1b { z27.b }, p2/Z, [x22, x25]\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 236 | ".inst 0x4508abb5 // ushllb z21.h, z29.b, #0x0\n" |
| 237 | ".inst 0x4508afb4 // ushllt z20.h, z29.b, #0x0\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 238 | "ld1b { z25.b }, p1/Z, [x22, x24]\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 239 | ".inst 0x4508ab73 // ushllb z19.h, z27.b, #0x0\n" |
| 240 | ".inst 0x4508af72 // ushllt z18.h, z27.b, #0x0\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 241 | "subs x21, x21, #0x1\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 242 | ".inst 0x4508ab31 // ushllb z17.h, z25.b, #0x0\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 243 | ".inst 0x4508af30 // ushllt z16.h, z25.b, #0x0\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 244 | ".inst 0x459749ef // uaddwb z15.s, z15.s, z23.h\n" |
| 245 | ".inst 0x45974dce // uaddwt z14.s, z14.s, z23.h\n" |
| 246 | ".inst 0x459649ad // uaddwb z13.s, z13.s, z22.h\n" |
| 247 | ".inst 0x45964d8c // uaddwt z12.s, z12.s, z22.h\n" |
| 248 | ".inst 0x4595496b // uaddwb z11.s, z11.s, z21.h\n" |
| 249 | ".inst 0x45954d4a // uaddwt z10.s, z10.s, z21.h\n" |
| 250 | ".inst 0x45944929 // uaddwb z9.s, z9.s, z20.h\n" |
| 251 | ".inst 0x45944d08 // uaddwt z8.s, z8.s, z20.h\n" |
| 252 | ".inst 0x459348e7 // uaddwb z7.s, z7.s, z19.h\n" |
| 253 | ".inst 0x45934cc6 // uaddwt z6.s, z6.s, z19.h\n" |
| 254 | ".inst 0x459248a5 // uaddwb z5.s, z5.s, z18.h\n" |
| 255 | ".inst 0x45924c84 // uaddwt z4.s, z4.s, z18.h\n" |
| 256 | ".inst 0x45914863 // uaddwb z3.s, z3.s, z17.h\n" |
| 257 | ".inst 0x45914c42 // uaddwt z2.s, z2.s, z17.h\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 258 | ".inst 0x45904821 // uaddwb z1.s, z1.s, z16.h\n" |
| 259 | ".inst 0x45904c00 // uaddwt z0.s, z0.s, z16.h\n" |
| 260 | "bgt 5b\n" |
| 261 | "6:" // 4-vectors of channels: Single input loop: End |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 262 | "ld1rw { z18.s }, p0/Z, [%x[left_shift]]\n" |
| 263 | "ld1rw { z16.s }, p0/Z, [%x[combined_rescale_value]]\n" |
| 264 | ".inst 0x4482824f // srshl z15.s, p0/M, z15.s, z18.s\n" |
| 265 | ".inst 0x4482824e // srshl z14.s, p0/M, z14.s, z18.s\n" |
| 266 | ".inst 0x4482824d // srshl z13.s, p0/M, z13.s, z18.s\n" |
| 267 | ".inst 0x4482824c // srshl z12.s, p0/M, z12.s, z18.s\n" |
| 268 | "ld1rw { z17.s }, p0/Z, [%x[right_shift]]\n" |
| 269 | ".inst 0x04b075ef // sqrdmulh z15.s, z15.s, z16.s\n" |
| 270 | ".inst 0x4482824b // srshl z11.s, p0/M, z11.s, z18.s\n" |
| 271 | ".inst 0x4482824a // srshl z10.s, p0/M, z10.s, z18.s\n" |
| 272 | ".inst 0x04b075ce // sqrdmulh z14.s, z14.s, z16.s\n" |
| 273 | ".inst 0x04b075ad // sqrdmulh z13.s, z13.s, z16.s\n" |
| 274 | ".inst 0x44828249 // srshl z9.s, p0/M, z9.s, z18.s\n" |
| 275 | ".inst 0x44828248 // srshl z8.s, p0/M, z8.s, z18.s\n" |
| 276 | ".inst 0x04b0758c // sqrdmulh z12.s, z12.s, z16.s\n" |
| 277 | ".inst 0x04b0756b // sqrdmulh z11.s, z11.s, z16.s\n" |
| 278 | ".inst 0x44828247 // srshl z7.s, p0/M, z7.s, z18.s\n" |
| 279 | ".inst 0x44828246 // srshl z6.s, p0/M, z6.s, z18.s\n" |
| 280 | ".inst 0x04b0754a // sqrdmulh z10.s, z10.s, z16.s\n" |
| 281 | ".inst 0x04b07529 // sqrdmulh z9.s, z9.s, z16.s\n" |
| 282 | ".inst 0x44828245 // srshl z5.s, p0/M, z5.s, z18.s\n" |
| 283 | ".inst 0x44828244 // srshl z4.s, p0/M, z4.s, z18.s\n" |
| 284 | ".inst 0x04b07508 // sqrdmulh z8.s, z8.s, z16.s\n" |
| 285 | ".inst 0x04b074e7 // sqrdmulh z7.s, z7.s, z16.s\n" |
| 286 | ".inst 0x44828243 // srshl z3.s, p0/M, z3.s, z18.s\n" |
| 287 | ".inst 0x44828242 // srshl z2.s, p0/M, z2.s, z18.s\n" |
| 288 | ".inst 0x04b074c6 // sqrdmulh z6.s, z6.s, z16.s\n" |
| 289 | ".inst 0x04b074a5 // sqrdmulh z5.s, z5.s, z16.s\n" |
| 290 | ".inst 0x44828241 // srshl z1.s, p0/M, z1.s, z18.s\n" |
| 291 | ".inst 0x44828240 // srshl z0.s, p0/M, z0.s, z18.s\n" |
| 292 | ".inst 0x04b07484 // sqrdmulh z4.s, z4.s, z16.s\n" |
| 293 | ".inst 0x04b07463 // sqrdmulh z3.s, z3.s, z16.s\n" |
| 294 | ".inst 0x04b07442 // sqrdmulh z2.s, z2.s, z16.s\n" |
| 295 | ".inst 0x04b07421 // sqrdmulh z1.s, z1.s, z16.s\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 296 | "add x20, %x[quant_params], %[offsetof_qp_output_offset]\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 297 | ".inst 0x4482822f // srshl z15.s, p0/M, z15.s, z17.s\n" |
| 298 | ".inst 0x04b07400 // sqrdmulh z0.s, z0.s, z16.s\n" |
| 299 | ".inst 0x4482822e // srshl z14.s, p0/M, z14.s, z17.s\n" |
| 300 | ".inst 0x4482822d // srshl z13.s, p0/M, z13.s, z17.s\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 301 | "ld1rw { z16.s }, p0/Z, [x20]\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 302 | ".inst 0x4482822c // srshl z12.s, p0/M, z12.s, z17.s\n" |
| 303 | ".inst 0x4482822b // srshl z11.s, p0/M, z11.s, z17.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 304 | "add z15.s, z15.s, z16.s\n" |
| 305 | "add z14.s, z14.s, z16.s\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 306 | ".inst 0x4482822a // srshl z10.s, p0/M, z10.s, z17.s\n" |
| 307 | ".inst 0x44828229 // srshl z9.s, p0/M, z9.s, z17.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 308 | "add z13.s, z13.s, z16.s\n" |
| 309 | "add z12.s, z12.s, z16.s\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 310 | ".inst 0x44828228 // srshl z8.s, p0/M, z8.s, z17.s\n" |
| 311 | ".inst 0x44828227 // srshl z7.s, p0/M, z7.s, z17.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 312 | "add z11.s, z11.s, z16.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 313 | "add z10.s, z10.s, z16.s\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 314 | ".inst 0x44828226 // srshl z6.s, p0/M, z6.s, z17.s\n" |
| 315 | ".inst 0x44828225 // srshl z5.s, p0/M, z5.s, z17.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 316 | "add z9.s, z9.s, z16.s\n" |
| 317 | "add z8.s, z8.s, z16.s\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 318 | ".inst 0x44828224 // srshl z4.s, p0/M, z4.s, z17.s\n" |
| 319 | ".inst 0x44828223 // srshl z3.s, p0/M, z3.s, z17.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 320 | "add z7.s, z7.s, z16.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 321 | "add z6.s, z6.s, z16.s\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 322 | ".inst 0x44828222 // srshl z2.s, p0/M, z2.s, z17.s\n" |
| 323 | ".inst 0x44828221 // srshl z1.s, p0/M, z1.s, z17.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 324 | "add z5.s, z5.s, z16.s\n" |
| 325 | "add z4.s, z4.s, z16.s\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 326 | ".inst 0x44828220 // srshl z0.s, p0/M, z0.s, z17.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 327 | "add z3.s, z3.s, z16.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 328 | "add z2.s, z2.s, z16.s\n" |
| 329 | "add z1.s, z1.s, z16.s\n" |
| 330 | "add z0.s, z0.s, z16.s\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 331 | "mov z16.s, #0x0\n" |
| 332 | "smax z15.s, p0/M, z15.s, z16.s\n" |
| 333 | "smax z14.s, p0/M, z14.s, z16.s\n" |
| 334 | "mov z18.s, #0xff\n" |
| 335 | "smax z13.s, p0/M, z13.s, z16.s\n" |
| 336 | "smax z12.s, p0/M, z12.s, z16.s\n" |
| 337 | "smax z11.s, p0/M, z11.s, z16.s\n" |
| 338 | "smax z10.s, p0/M, z10.s, z16.s\n" |
| 339 | "smax z9.s, p0/M, z9.s, z16.s\n" |
| 340 | "smax z8.s, p0/M, z8.s, z16.s\n" |
| 341 | "smax z7.s, p0/M, z7.s, z16.s\n" |
| 342 | "smax z6.s, p0/M, z6.s, z16.s\n" |
| 343 | "smax z5.s, p0/M, z5.s, z16.s\n" |
| 344 | "smax z4.s, p0/M, z4.s, z16.s\n" |
| 345 | "smax z3.s, p0/M, z3.s, z16.s\n" |
| 346 | "smax z2.s, p0/M, z2.s, z16.s\n" |
| 347 | "smax z1.s, p0/M, z1.s, z16.s\n" |
| 348 | "smax z0.s, p0/M, z0.s, z16.s\n" |
| 349 | "smin z15.s, p0/M, z15.s, z18.s\n" |
| 350 | "smin z14.s, p0/M, z14.s, z18.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 351 | "trn1 z17.h, z15.h, z14.h\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 352 | "smin z13.s, p0/M, z13.s, z18.s\n" |
| 353 | "smin z12.s, p0/M, z12.s, z18.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 354 | "trn1 z16.h, z13.h, z12.h\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 355 | "trn1 z16.b, z17.b, z16.b\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 356 | "smin z11.s, p0/M, z11.s, z18.s\n" |
| 357 | "smin z10.s, p0/M, z10.s, z18.s\n" |
| 358 | "trn1 z17.h, z11.h, z10.h\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 359 | "st1b { z16.b }, p4, [%x[outptr], x27]\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 360 | "smin z9.s, p0/M, z9.s, z18.s\n" |
| 361 | "smin z8.s, p0/M, z8.s, z18.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 362 | "trn1 z16.h, z9.h, z8.h\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 363 | "trn1 z16.b, z17.b, z16.b\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 364 | "smin z7.s, p0/M, z7.s, z18.s\n" |
| 365 | "smin z6.s, p0/M, z6.s, z18.s\n" |
| 366 | "trn1 z17.h, z7.h, z6.h\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 367 | "st1b { z16.b }, p3, [%x[outptr], x26]\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 368 | "smin z5.s, p0/M, z5.s, z18.s\n" |
| 369 | "smin z4.s, p0/M, z4.s, z18.s\n" |
| 370 | "trn1 z16.h, z5.h, z4.h\n" |
| 371 | "trn1 z16.b, z17.b, z16.b\n" |
| 372 | "smin z3.s, p0/M, z3.s, z18.s\n" |
| 373 | "smin z2.s, p0/M, z2.s, z18.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 374 | "trn1 z17.h, z3.h, z2.h\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 375 | "st1b { z16.b }, p2, [%x[outptr], x25]\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 376 | "smin z1.s, p0/M, z1.s, z18.s\n" |
| 377 | "smin z0.s, p0/M, z0.s, z18.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 378 | "trn1 z16.h, z1.h, z0.h\n" |
| 379 | "trn1 z16.b, z17.b, z16.b\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 380 | "st1b { z16.b }, p1, [%x[outptr], x24]\n" |
| 381 | "incb x24, ALL, MUL #4\n" |
| 382 | "whilelt p1.b, x24, %x[n_channels]\n" |
| 383 | "incb x27, ALL, MUL #4\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 384 | "incb x26, ALL, MUL #4\n" |
| 385 | "incb x25, ALL, MUL #4\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 386 | "b.any 1b\n" |
| 387 | "7:" // Single vector of channels |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 388 | "whilelt p4.b, x27, %x[n_channels]\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 389 | "b.none 14f\n" |
| 390 | "8:" // Single vector of channels: Loop |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 391 | "ld1rw { z15.s }, p0/Z, [%x[accumulator_init]]\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 392 | "lsr x23, %x[n_valid_cells], #0x1\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 393 | "mov z14.d, z15.d\n" |
| 394 | "mov z13.d, z15.d\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 395 | "mov z12.d, z15.d\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 396 | "mov x20, %x[inptrs]\n" |
| 397 | "cbz x23, 11f\n" |
| 398 | "ldp x22, x21, [x20, #0x0]\n" |
| 399 | "subs x23, x23, #0x1\n" |
| 400 | "add x20, x20, #0x10\n" |
| 401 | "ld1b { z31.b }, p4/Z, [x22, x27]\n" |
| 402 | "ld1b { z30.b }, p4/Z, [x21, x27]\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 403 | "beq 10f\n" |
| 404 | "9:" // Single vector of channels: Loop: 2 inputs loop |
| 405 | ".inst 0x455e0bf7 // uaddlb z23.h, z31.b, z30.b\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 406 | ".inst 0x455e0ff6 // uaddlt z22.h, z31.b, z30.b\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 407 | "ldp x22, x21, [x20, #0x0]\n" |
| 408 | "subs x23, x23, #0x1\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 409 | ".inst 0x459749ef // uaddwb z15.s, z15.s, z23.h\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 410 | ".inst 0x45974dce // uaddwt z14.s, z14.s, z23.h\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 411 | "add x20, x20, #0x10\n" |
| 412 | "ld1b { z31.b }, p4/Z, [x22, x27]\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 413 | ".inst 0x459649ad // uaddwb z13.s, z13.s, z22.h\n" |
| 414 | ".inst 0x45964d8c // uaddwt z12.s, z12.s, z22.h\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 415 | "ld1b { z30.b }, p4/Z, [x21, x27]\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 416 | "bgt 9b\n" |
| 417 | "10:" // Single vector of channels: Loop: 2 inputs tail |
| 418 | ".inst 0x455e0bf7 // uaddlb z23.h, z31.b, z30.b\n" |
| 419 | ".inst 0x455e0ff6 // uaddlt z22.h, z31.b, z30.b\n" |
| 420 | ".inst 0x459749ef // uaddwb z15.s, z15.s, z23.h\n" |
| 421 | ".inst 0x45974dce // uaddwt z14.s, z14.s, z23.h\n" |
| 422 | ".inst 0x459649ad // uaddwb z13.s, z13.s, z22.h\n" |
| 423 | ".inst 0x45964d8c // uaddwt z12.s, z12.s, z22.h\n" |
| 424 | "11:" // Single vector of channels: Loop: After loop |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 425 | "ands x21, %x[n_valid_cells], #0x1\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 426 | "beq 13f\n" |
| 427 | "12:" // Single vector of channels: Loop: Single input loop |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 428 | "ldr x22, [x20], #0x8\n" |
| 429 | "ld1b { z31.b }, p4/Z, [x22, x27]\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 430 | ".inst 0x4508abf7 // ushllb z23.h, z31.b, #0x0\n" |
| 431 | ".inst 0x4508aff6 // ushllt z22.h, z31.b, #0x0\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 432 | "subs x21, x21, #0x1\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 433 | ".inst 0x459749ef // uaddwb z15.s, z15.s, z23.h\n" |
| 434 | ".inst 0x45974dce // uaddwt z14.s, z14.s, z23.h\n" |
| 435 | ".inst 0x459649ad // uaddwb z13.s, z13.s, z22.h\n" |
| 436 | ".inst 0x45964d8c // uaddwt z12.s, z12.s, z22.h\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 437 | "bgt 12b\n" |
| 438 | "13:" // Single vector of channels: Loop: Single input loop: End |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 439 | "ld1rw { z18.s }, p0/Z, [%x[left_shift]]\n" |
| 440 | "ld1rw { z16.s }, p0/Z, [%x[combined_rescale_value]]\n" |
| 441 | ".inst 0x4482824f // srshl z15.s, p0/M, z15.s, z18.s\n" |
| 442 | ".inst 0x4482824e // srshl z14.s, p0/M, z14.s, z18.s\n" |
| 443 | ".inst 0x4482824d // srshl z13.s, p0/M, z13.s, z18.s\n" |
| 444 | ".inst 0x4482824c // srshl z12.s, p0/M, z12.s, z18.s\n" |
| 445 | "ld1rw { z17.s }, p0/Z, [%x[right_shift]]\n" |
| 446 | ".inst 0x04b075ef // sqrdmulh z15.s, z15.s, z16.s\n" |
| 447 | ".inst 0x04b075ce // sqrdmulh z14.s, z14.s, z16.s\n" |
| 448 | ".inst 0x04b075ad // sqrdmulh z13.s, z13.s, z16.s\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 449 | "add x20, %x[quant_params], %[offsetof_qp_output_offset]\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 450 | ".inst 0x4482822f // srshl z15.s, p0/M, z15.s, z17.s\n" |
| 451 | ".inst 0x04b0758c // sqrdmulh z12.s, z12.s, z16.s\n" |
| 452 | ".inst 0x4482822e // srshl z14.s, p0/M, z14.s, z17.s\n" |
| 453 | ".inst 0x4482822d // srshl z13.s, p0/M, z13.s, z17.s\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 454 | "ld1rw { z16.s }, p0/Z, [x20]\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 455 | ".inst 0x4482822c // srshl z12.s, p0/M, z12.s, z17.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 456 | "add z15.s, z15.s, z16.s\n" |
| 457 | "add z14.s, z14.s, z16.s\n" |
| 458 | "add z13.s, z13.s, z16.s\n" |
| 459 | "add z12.s, z12.s, z16.s\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 460 | "mov z16.s, #0x0\n" |
| 461 | "smax z15.s, p0/M, z15.s, z16.s\n" |
| 462 | "smax z14.s, p0/M, z14.s, z16.s\n" |
| 463 | "mov z18.s, #0xff\n" |
| 464 | "smax z13.s, p0/M, z13.s, z16.s\n" |
| 465 | "smax z12.s, p0/M, z12.s, z16.s\n" |
| 466 | "smin z15.s, p0/M, z15.s, z18.s\n" |
| 467 | "smin z14.s, p0/M, z14.s, z18.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 468 | "trn1 z17.h, z15.h, z14.h\n" |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 469 | "smin z13.s, p0/M, z13.s, z18.s\n" |
| 470 | "smin z12.s, p0/M, z12.s, z18.s\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 471 | "trn1 z16.h, z13.h, z12.h\n" |
| 472 | "trn1 z16.b, z17.b, z16.b\n" |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 473 | "st1b { z16.b }, p4, [%x[outptr], x27]\n" |
| 474 | "incb x27\n" |
| 475 | "whilelt p4.b, x27, %x[n_channels]\n" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 476 | "b.any 8b\n" |
| 477 | "14:" // End |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 478 | : |
| 479 | : [accumulator_init] "r" (&accumulator_init), [combined_rescale_value] "r" (&combined_rescale_value), [inptrs] "r" (inptrs), [left_shift] "r" (&left_shift), [n_channels] "r" (n_channels), [n_valid_cells] "r" (n_valid_cells), [offsetof_qp_output_offset] "I" (offsetof(Requantize32, output_offset)), [outptr] "r" (outptr), [quant_params] "r" (&qp), [right_shift] "r" (&right_shift) |
Michael Tyler | 7d9a626 | 2023-02-01 16:37:07 +0000 | [diff] [blame^] | 480 | : "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" |
Michele Di Giorgio | d556d7b | 2020-10-27 10:56:31 +0000 | [diff] [blame] | 481 | ); |
| 482 | } |
| 483 | |
| 484 | } // namespace pooling |
| 485 | } // namespace arm_conv |
| 486 | |
ramelg01 | c827e99 | 2022-04-08 03:52:28 +0100 | [diff] [blame] | 487 | #endif // defined(ARM_COMPUTE_ENABLE_SVE) |