| 1 |
#include "crypto_asm_hidden.h" |
| 2 |
// linker define base |
| 3 |
|
| 4 |
/* Assembly for fixed base scalar multiplication */ |
| 5 |
|
| 6 |
.p2align 4 |
| 7 |
ASM_HIDDEN _CRYPTO_SHARED_NAMESPACE(base) |
| 8 |
.globl _CRYPTO_SHARED_NAMESPACE(base) |
| 9 |
ASM_HIDDEN CRYPTO_SHARED_NAMESPACE(base) |
| 10 |
.globl CRYPTO_SHARED_NAMESPACE(base) |
| 11 |
|
| 12 |
_CRYPTO_SHARED_NAMESPACE(base): |
| 13 |
CRYPTO_SHARED_NAMESPACE(base): |
| 14 |
|
| 15 |
sub sp, sp, #608 |
| 16 |
stp x19, x20, [sp, #0] |
| 17 |
stp x21, x22, [sp, #16] |
| 18 |
stp x23, x24, [sp, #32] |
| 19 |
stp x25, x26, [sp, #48] |
| 20 |
stp x27, x28, [sp, #64] |
| 21 |
stp x29, x30, [sp, #80] |
| 22 |
stp x0, x1, [sp, #96] |
| 23 |
str x2, [sp, #112] |
| 24 |
str x3, [sp, #592] |
| 25 |
|
| 26 |
movz x21, #0xfffe |
| 27 |
movk x21, #0x3fff, lsl 16 |
| 28 |
movk x21, #0xfffe, lsl 32 |
| 29 |
movk x21, #0x3fff, lsl 48 |
| 30 |
|
| 31 |
movz x22, #0xfffe |
| 32 |
movk x22, #0x3fff, lsl 16 |
| 33 |
movk x22, #0xfffe, lsl 32 |
| 34 |
movk x22, #0x00ff, lsl 48 |
| 35 |
|
| 36 |
movz x23, #0xfffe |
| 37 |
movk x23, #0x3fff, lsl 16 |
| 38 |
movk x23, #0xffda, lsl 32 |
| 39 |
movk x23, #0x3fff, lsl 48 |
| 40 |
|
| 41 |
movz x24, #0xfffe |
| 42 |
movk x24, #0x3fff, lsl 16 |
| 43 |
|
| 44 |
stp x21, x22, [sp, #120] |
| 45 |
stp x23, x24, [sp, #136] |
| 46 |
|
| 47 |
mov w29, #1216 |
| 48 |
|
| 49 |
/* choose t and initialize r */ |
| 50 |
|
| 51 |
mov x25, x2 |
| 52 |
ldrb w28, [x1, #0] |
| 53 |
uxtb w2, w28 |
| 54 |
sxtb x2, w2 |
| 55 |
|
| 56 |
mov x28, xzr |
| 57 |
mov x1, x2 |
| 58 |
asr x1, x1, #7 |
| 59 |
|
| 60 |
mov x27, x2 |
| 61 |
add x27, x27, x1 |
| 62 |
eor x27, x27, x1 |
| 63 |
|
| 64 |
mov x5, #0x1<<32 |
| 65 |
mov x10, x5 |
| 66 |
|
| 67 |
mov x28, x25 |
| 68 |
|
| 69 |
cmp x27, #1 |
| 70 |
ldp x13, x14, [x28,#0] |
| 71 |
csel x3, x13, xzr, eq |
| 72 |
csel x4, x14, xzr, eq |
| 73 |
ldp x13, x14, [x28, #16] |
| 74 |
csel x5, x13, x5, eq |
| 75 |
csel x6, x14, xzr, eq |
| 76 |
ldr x13, [x28, #32] |
| 77 |
csel x7, x13, xzr, eq |
| 78 |
|
| 79 |
ldp x13, x14, [x28, #40] |
| 80 |
csel x8, x13, xzr, eq |
| 81 |
csel x9, x14, xzr, eq |
| 82 |
ldp x13, x14, [x28, #56] |
| 83 |
csel x10, x13, x10, eq |
| 84 |
csel x11, x14, xzr, eq |
| 85 |
ldr x13, [x28, #72] |
| 86 |
csel x12, x13, xzr, eq |
| 87 |
|
| 88 |
cmp x27, #2 |
| 89 |
ldp x13, x14, [x28,#120] |
| 90 |
csel x3, x13, x3, eq |
| 91 |
csel x4, x14, x4, eq |
| 92 |
ldp x13, x14, [x28, #136] |
| 93 |
csel x5, x13, x5, eq |
| 94 |
csel x6, x14, x6, eq |
| 95 |
ldr x13, [x28, #152] |
| 96 |
csel x7, x13, x7, eq |
| 97 |
|
| 98 |
ldp x13, x14, [x28, #160] |
| 99 |
csel x8, x13, x8, eq |
| 100 |
csel x9, x14, x9, eq |
| 101 |
ldp x13, x14, [x28, #176] |
| 102 |
csel x10, x13, x10, eq |
| 103 |
csel x11, x14, x11, eq |
| 104 |
ldr x13, [x28, #192] |
| 105 |
csel x12, x13, x12, eq |
| 106 |
|
| 107 |
cmp x27, #3 |
| 108 |
ldp x13, x14, [x28,#240] |
| 109 |
csel x3, x13, x3, eq |
| 110 |
csel x4, x14, x4, eq |
| 111 |
ldp x13, x14, [x28, #256] |
| 112 |
csel x5, x13, x5, eq |
| 113 |
csel x6, x14, x6, eq |
| 114 |
ldr x13, [x28, #272] |
| 115 |
csel x7, x13, x7, eq |
| 116 |
|
| 117 |
ldp x13, x14, [x28, #280] |
| 118 |
csel x8, x13, x8, eq |
| 119 |
csel x9, x14, x9, eq |
| 120 |
ldp x13, x14, [x28, #296] |
| 121 |
csel x10, x13, x10, eq |
| 122 |
csel x11, x14, x11, eq |
| 123 |
ldr x13, [x28, #312] |
| 124 |
csel x12, x13, x12, eq |
| 125 |
|
| 126 |
cmp x27, #4 |
| 127 |
ldp x13, x14, [x28,#360] |
| 128 |
csel x3, x13, x3, eq |
| 129 |
csel x4, x14, x4, eq |
| 130 |
ldp x13, x14, [x28, #376] |
| 131 |
csel x5, x13, x5, eq |
| 132 |
csel x6, x14, x6, eq |
| 133 |
ldr x13, [x28, #392] |
| 134 |
csel x7, x13, x7, eq |
| 135 |
|
| 136 |
ldp x13, x14, [x28, #400] |
| 137 |
csel x8, x13, x8, eq |
| 138 |
csel x9, x14, x9, eq |
| 139 |
ldp x13, x14, [x28, #416] |
| 140 |
csel x10, x13, x10, eq |
| 141 |
csel x11, x14, x11, eq |
| 142 |
ldr x13, [x28, #432] |
| 143 |
csel x12, x13, x12, eq |
| 144 |
|
| 145 |
add x28, x28, #480 |
| 146 |
|
| 147 |
cmp x27, #5 |
| 148 |
ldp x13, x14, [x28,#0] |
| 149 |
csel x3, x13, x3, eq |
| 150 |
csel x4, x14, x4, eq |
| 151 |
ldp x13, x14, [x28, #16] |
| 152 |
csel x5, x13, x5, eq |
| 153 |
csel x6, x14, x6, eq |
| 154 |
ldr x13, [x28, #32] |
| 155 |
csel x7, x13, x7, eq |
| 156 |
|
| 157 |
ldp x13, x14, [x28, #40] |
| 158 |
csel x8, x13, x8, eq |
| 159 |
csel x9, x14, x9, eq |
| 160 |
ldp x13, x14, [x28, #56] |
| 161 |
csel x10, x13, x10, eq |
| 162 |
csel x11, x14, x11, eq |
| 163 |
ldr x13, [x28, #72] |
| 164 |
csel x12, x13, x12, eq |
| 165 |
|
| 166 |
cmp x27, #6 |
| 167 |
ldp x13, x14, [x28,#120] |
| 168 |
csel x3, x13, x3, eq |
| 169 |
csel x4, x14, x4, eq |
| 170 |
ldp x13, x14, [x28, #136] |
| 171 |
csel x5, x13, x5, eq |
| 172 |
csel x6, x14, x6, eq |
| 173 |
ldr x13, [x28, #152] |
| 174 |
csel x7, x13, x7, eq |
| 175 |
|
| 176 |
ldp x13, x14, [x28, #160] |
| 177 |
csel x8, x13, x8, eq |
| 178 |
csel x9, x14, x9, eq |
| 179 |
ldp x13, x14, [x28, #176] |
| 180 |
csel x10, x13, x10, eq |
| 181 |
csel x11, x14, x11, eq |
| 182 |
ldr x13, [x28, #192] |
| 183 |
csel x12, x13, x12, eq |
| 184 |
|
| 185 |
cmp x27, #7 |
| 186 |
ldp x13, x14, [x28,#240] |
| 187 |
csel x3, x13, x3, eq |
| 188 |
csel x4, x14, x4, eq |
| 189 |
ldp x13, x14, [x28, #256] |
| 190 |
csel x5, x13, x5, eq |
| 191 |
csel x6, x14, x6, eq |
| 192 |
ldr x13, [x28, #272] |
| 193 |
csel x7, x13, x7, eq |
| 194 |
|
| 195 |
ldp x13, x14, [x28, #280] |
| 196 |
csel x8, x13, x8, eq |
| 197 |
csel x9, x14, x9, eq |
| 198 |
ldp x13, x14, [x28, #296] |
| 199 |
csel x10, x13, x10, eq |
| 200 |
csel x11, x14, x11, eq |
| 201 |
ldr x13, [x28, #312] |
| 202 |
csel x12, x13, x12, eq |
| 203 |
|
| 204 |
cmp x27, #8 |
| 205 |
ldp x13, x14, [x28,#360] |
| 206 |
csel x3, x13, x3, eq |
| 207 |
csel x4, x14, x4, eq |
| 208 |
ldp x13, x14, [x28, #376] |
| 209 |
csel x5, x13, x5, eq |
| 210 |
csel x6, x14, x6, eq |
| 211 |
ldr x13, [x28, #392] |
| 212 |
csel x7, x13, x7, eq |
| 213 |
|
| 214 |
ldp x13, x14, [x28, #400] |
| 215 |
csel x8, x13, x8, eq |
| 216 |
csel x9, x14, x9, eq |
| 217 |
ldp x13, x14, [x28, #416] |
| 218 |
csel x10, x13, x10, eq |
| 219 |
csel x11, x14, x11, eq |
| 220 |
ldr x13, [x28, #432] |
| 221 |
csel x12, x13, x12, eq |
| 222 |
|
| 223 |
cmp x2, xzr |
| 224 |
mov x13, x3 |
| 225 |
csel x3, x8, x3, lt |
| 226 |
csel x8, x13, x8, lt |
| 227 |
|
| 228 |
mov x13, x4 |
| 229 |
csel x4, x9, x4, lt |
| 230 |
csel x9, x13, x9, lt |
| 231 |
|
| 232 |
mov x13, x5 |
| 233 |
csel x5, x10, x5, lt |
| 234 |
csel x10, x13, x10, lt |
| 235 |
|
| 236 |
mov x13, x6 |
| 237 |
csel x6, x11, x6, lt |
| 238 |
csel x11, x13, x11, lt |
| 239 |
|
| 240 |
mov x13, x7 |
| 241 |
csel x7, x12, x7, lt |
| 242 |
csel x12, x13, x12, lt |
| 243 |
|
| 244 |
// sub |
| 245 |
ldp x21, x22, [sp, #120] |
| 246 |
ldp x23, x24, [sp, #136] |
| 247 |
|
| 248 |
add x13, x8, x21 |
| 249 |
sub x13, x13, x3 |
| 250 |
add x14, x9, x22 |
| 251 |
sub x14, x14, x4 |
| 252 |
add x15, x10, x23 |
| 253 |
sub x15, x15, x5 |
| 254 |
add x16, x11, x21 |
| 255 |
sub x16, x16, x6 |
| 256 |
add x17, x12, x24 |
| 257 |
sub x17, x17, x7 |
| 258 |
|
| 259 |
stp x13, x14, [sp, #152] |
| 260 |
stp x15, x16, [sp, #168] |
| 261 |
str x17, [sp, #184] |
| 262 |
|
| 263 |
// add |
| 264 |
add x3, x8, x3 |
| 265 |
add x4, x9, x4 |
| 266 |
add x5, x10, x5 |
| 267 |
add x6, x11, x6 |
| 268 |
add x7, x12, x7 |
| 269 |
|
| 270 |
stp x3, x4, [sp, #192] |
| 271 |
stp x5, x6, [sp, #208] |
| 272 |
str x7, [sp, #224] |
| 273 |
|
| 274 |
mov x28, x25 |
| 275 |
|
| 276 |
cmp x27, #1 |
| 277 |
ldp x13, x14, [x28, #80] |
| 278 |
csel x3, x13, xzr, eq |
| 279 |
csel x4, x14, xzr, eq |
| 280 |
ldp x13, x14, [x28, #96] |
| 281 |
csel x5, x13, xzr, eq |
| 282 |
csel x6, x14, xzr, eq |
| 283 |
ldr x13, [x28, #112] |
| 284 |
csel x7, x13, xzr, eq |
| 285 |
|
| 286 |
cmp x27, #2 |
| 287 |
ldp x13, x14, [x28, #200] |
| 288 |
csel x3, x13, x3, eq |
| 289 |
csel x4, x14, x4, eq |
| 290 |
ldp x13, x14, [x28, #216] |
| 291 |
csel x5, x13, x5, eq |
| 292 |
csel x6, x14, x6, eq |
| 293 |
ldr x13, [x28, #232] |
| 294 |
csel x7, x13, x7, eq |
| 295 |
|
| 296 |
cmp x27, #3 |
| 297 |
ldp x13, x14, [x28, #320] |
| 298 |
csel x3, x13, x3, eq |
| 299 |
csel x4, x14, x4, eq |
| 300 |
ldp x13, x14, [x28, #336] |
| 301 |
csel x5, x13, x5, eq |
| 302 |
csel x6, x14, x6, eq |
| 303 |
ldr x13, [x28, #352] |
| 304 |
csel x7, x13, x7, eq |
| 305 |
|
| 306 |
cmp x27, #4 |
| 307 |
ldp x13, x14, [x28, #440] |
| 308 |
csel x3, x13, x3, eq |
| 309 |
csel x4, x14, x4, eq |
| 310 |
ldp x13, x14, [x28, #456] |
| 311 |
csel x5, x13, x5, eq |
| 312 |
csel x6, x14, x6, eq |
| 313 |
ldr x13, [x28, #472] |
| 314 |
csel x7, x13, x7, eq |
| 315 |
|
| 316 |
add x28, x28, #480 |
| 317 |
|
| 318 |
cmp x27, #5 |
| 319 |
ldp x13, x14, [x28, #80] |
| 320 |
csel x3, x13, x3, eq |
| 321 |
csel x4, x14, x4, eq |
| 322 |
ldp x13, x14, [x28, #96] |
| 323 |
csel x5, x13, x5, eq |
| 324 |
csel x6, x14, x6, eq |
| 325 |
ldr x13, [x28, #112] |
| 326 |
csel x7, x13, x7, eq |
| 327 |
|
| 328 |
cmp x27, #6 |
| 329 |
ldp x13, x14, [x28, #200] |
| 330 |
csel x3, x13, x3, eq |
| 331 |
csel x4, x14, x4, eq |
| 332 |
ldp x13, x14, [x28, #216] |
| 333 |
csel x5, x13, x5, eq |
| 334 |
csel x6, x14, x6, eq |
| 335 |
ldr x13, [x28, #232] |
| 336 |
csel x7, x13, x7, eq |
| 337 |
|
| 338 |
cmp x27, #7 |
| 339 |
ldp x13, x14, [x28, #320] |
| 340 |
csel x3, x13, x3, eq |
| 341 |
csel x4, x14, x4, eq |
| 342 |
ldp x13, x14, [x28, #336] |
| 343 |
csel x5, x13, x5, eq |
| 344 |
csel x6, x14, x6, eq |
| 345 |
ldr x13, [x28, #352] |
| 346 |
csel x7, x13, x7, eq |
| 347 |
|
| 348 |
cmp x27, #8 |
| 349 |
ldp x13, x14, [x28, #440] |
| 350 |
csel x3, x13, x3, eq |
| 351 |
csel x4, x14, x4, eq |
| 352 |
ldp x13, x14, [x28, #456] |
| 353 |
csel x5, x13, x5, eq |
| 354 |
csel x6, x14, x6, eq |
| 355 |
ldr x13, [x28, #472] |
| 356 |
csel x7, x13, x7, eq |
| 357 |
|
| 358 |
// neg |
| 359 |
ldp x21, x22, [sp, #120] |
| 360 |
ldp x23, x24, [sp, #136] |
| 361 |
|
| 362 |
sub x8, x21, x3 |
| 363 |
sub x9, x22, x4 |
| 364 |
sub x10, x23, x5 |
| 365 |
sub x11, x21, x6 |
| 366 |
sub x12, x24, x7 |
| 367 |
|
| 368 |
cmp x2, xzr |
| 369 |
csel x3, x8, x3, lt |
| 370 |
csel x4, x9, x4, lt |
| 371 |
csel x5, x10, x5, lt |
| 372 |
csel x6, x11, x6, lt |
| 373 |
csel x7, x12, x7, lt |
| 374 |
|
| 375 |
stp x3, x4, [sp, #272] |
| 376 |
stp x5, x6, [sp, #288] |
| 377 |
str x7, [sp, #304] |
| 378 |
|
| 379 |
mov x3, #0x2<<32 |
| 380 |
stp xzr, xzr, [sp, #232] |
| 381 |
stp x3, xzr, [sp, #248] |
| 382 |
str xzr, [sp, #264] |
| 383 |
|
| 384 |
/* loop: i=1,i<64,i=i+1 */ |
| 385 |
|
| 386 |
mov w30, #1 |
| 387 |
|
| 388 |
dup v31.2s, w29 |
| 389 |
mov w28, #0x1fffffff |
| 390 |
dup v30.2d, x28 |
| 391 |
|
| 392 |
.L: |
| 393 |
/* choose t */ |
| 394 |
|
| 395 |
ldr x25, [sp, #112] |
| 396 |
ldr x26, [sp, #104] |
| 397 |
add x26, x26, x30 |
| 398 |
ldrb w28, [x26] |
| 399 |
uxtb w2, w28 |
| 400 |
sxtb x2, w2 |
| 401 |
|
| 402 |
mov x20, #960 |
| 403 |
mul x28, x30, x20 |
| 404 |
mov x1, x2 |
| 405 |
asr x1, x1, #7 |
| 406 |
|
| 407 |
mov x27, x2 |
| 408 |
add x27, x27, x1 |
| 409 |
eor x27, x27, x1 |
| 410 |
|
| 411 |
mov x5, #0x1<<32 |
| 412 |
mov x10, x5 |
| 413 |
|
| 414 |
add x28, x28, x25 |
| 415 |
mov x15, x28 |
| 416 |
|
| 417 |
cmp x27, #1 |
| 418 |
ldp x13, x14, [x28,#0] |
| 419 |
csel x3, x13, xzr, eq |
| 420 |
csel x4, x14, xzr, eq |
| 421 |
ldp x13, x14, [x28, #16] |
| 422 |
csel x5, x13, x5, eq |
| 423 |
csel x6, x14, xzr, eq |
| 424 |
ldr x13, [x28, #32] |
| 425 |
csel x7, x13, xzr, eq |
| 426 |
|
| 427 |
ldp x13, x14, [x28, #40] |
| 428 |
csel x8, x13, xzr, eq |
| 429 |
csel x9, x14, xzr, eq |
| 430 |
ldp x13, x14, [x28, #56] |
| 431 |
csel x10, x13, x10, eq |
| 432 |
csel x11, x14, xzr, eq |
| 433 |
ldr x13, [x28, #72] |
| 434 |
csel x12, x13, xzr, eq |
| 435 |
|
| 436 |
cmp x27, #2 |
| 437 |
ldp x13, x14, [x28,#120] |
| 438 |
csel x3, x13, x3, eq |
| 439 |
csel x4, x14, x4, eq |
| 440 |
ldp x13, x14, [x28, #136] |
| 441 |
csel x5, x13, x5, eq |
| 442 |
csel x6, x14, x6, eq |
| 443 |
ldr x13, [x28, #152] |
| 444 |
csel x7, x13, x7, eq |
| 445 |
|
| 446 |
ldp x13, x14, [x28, #160] |
| 447 |
csel x8, x13, x8, eq |
| 448 |
csel x9, x14, x9, eq |
| 449 |
ldp x13, x14, [x28, #176] |
| 450 |
csel x10, x13, x10, eq |
| 451 |
csel x11, x14, x11, eq |
| 452 |
ldr x13, [x28, #192] |
| 453 |
csel x12, x13, x12, eq |
| 454 |
|
| 455 |
cmp x27, #3 |
| 456 |
ldp x13, x14, [x28,#240] |
| 457 |
csel x3, x13, x3, eq |
| 458 |
csel x4, x14, x4, eq |
| 459 |
ldp x13, x14, [x28, #256] |
| 460 |
csel x5, x13, x5, eq |
| 461 |
csel x6, x14, x6, eq |
| 462 |
ldr x13, [x28, #272] |
| 463 |
csel x7, x13, x7, eq |
| 464 |
|
| 465 |
ldp x13, x14, [x28, #280] |
| 466 |
csel x8, x13, x8, eq |
| 467 |
csel x9, x14, x9, eq |
| 468 |
ldp x13, x14, [x28, #296] |
| 469 |
csel x10, x13, x10, eq |
| 470 |
csel x11, x14, x11, eq |
| 471 |
ldr x13, [x28, #312] |
| 472 |
csel x12, x13, x12, eq |
| 473 |
|
| 474 |
cmp x27, #4 |
| 475 |
ldp x13, x14, [x28,#360] |
| 476 |
csel x3, x13, x3, eq |
| 477 |
csel x4, x14, x4, eq |
| 478 |
ldp x13, x14, [x28, #376] |
| 479 |
csel x5, x13, x5, eq |
| 480 |
csel x6, x14, x6, eq |
| 481 |
ldr x13, [x28, #392] |
| 482 |
csel x7, x13, x7, eq |
| 483 |
|
| 484 |
ldp x13, x14, [x28, #400] |
| 485 |
csel x8, x13, x8, eq |
| 486 |
csel x9, x14, x9, eq |
| 487 |
ldp x13, x14, [x28, #416] |
| 488 |
csel x10, x13, x10, eq |
| 489 |
csel x11, x14, x11, eq |
| 490 |
ldr x13, [x28, #432] |
| 491 |
csel x12, x13, x12, eq |
| 492 |
|
| 493 |
add x28, x28, #480 |
| 494 |
|
| 495 |
cmp x27, #5 |
| 496 |
ldp x13, x14, [x28,#0] |
| 497 |
csel x3, x13, x3, eq |
| 498 |
csel x4, x14, x4, eq |
| 499 |
ldp x13, x14, [x28, #16] |
| 500 |
csel x5, x13, x5, eq |
| 501 |
csel x6, x14, x6, eq |
| 502 |
ldr x13, [x28, #32] |
| 503 |
csel x7, x13, x7, eq |
| 504 |
|
| 505 |
ldp x13, x14, [x28, #40] |
| 506 |
csel x8, x13, x8, eq |
| 507 |
csel x9, x14, x9, eq |
| 508 |
ldp x13, x14, [x28, #56] |
| 509 |
csel x10, x13, x10, eq |
| 510 |
csel x11, x14, x11, eq |
| 511 |
ldr x13, [x28, #72] |
| 512 |
csel x12, x13, x12, eq |
| 513 |
|
| 514 |
cmp x27, #6 |
| 515 |
ldp x13, x14, [x28,#120] |
| 516 |
csel x3, x13, x3, eq |
| 517 |
csel x4, x14, x4, eq |
| 518 |
ldp x13, x14, [x28, #136] |
| 519 |
csel x5, x13, x5, eq |
| 520 |
csel x6, x14, x6, eq |
| 521 |
ldr x13, [x28, #152] |
| 522 |
csel x7, x13, x7, eq |
| 523 |
|
| 524 |
ldp x13, x14, [x28, #160] |
| 525 |
csel x8, x13, x8, eq |
| 526 |
csel x9, x14, x9, eq |
| 527 |
ldp x13, x14, [x28, #176] |
| 528 |
csel x10, x13, x10, eq |
| 529 |
csel x11, x14, x11, eq |
| 530 |
ldr x13, [x28, #192] |
| 531 |
csel x12, x13, x12, eq |
| 532 |
|
| 533 |
cmp x27, #7 |
| 534 |
ldp x13, x14, [x28,#240] |
| 535 |
csel x3, x13, x3, eq |
| 536 |
csel x4, x14, x4, eq |
| 537 |
ldp x13, x14, [x28, #256] |
| 538 |
csel x5, x13, x5, eq |
| 539 |
csel x6, x14, x6, eq |
| 540 |
ldr x13, [x28, #272] |
| 541 |
csel x7, x13, x7, eq |
| 542 |
|
| 543 |
ldp x13, x14, [x28, #280] |
| 544 |
csel x8, x13, x8, eq |
| 545 |
csel x9, x14, x9, eq |
| 546 |
ldp x13, x14, [x28, #296] |
| 547 |
csel x10, x13, x10, eq |
| 548 |
csel x11, x14, x11, eq |
| 549 |
ldr x13, [x28, #312] |
| 550 |
csel x12, x13, x12, eq |
| 551 |
|
| 552 |
cmp x27, #8 |
| 553 |
ldp x13, x14, [x28,#360] |
| 554 |
csel x3, x13, x3, eq |
| 555 |
csel x4, x14, x4, eq |
| 556 |
ldp x13, x14, [x28, #376] |
| 557 |
csel x5, x13, x5, eq |
| 558 |
csel x6, x14, x6, eq |
| 559 |
ldr x13, [x28, #392] |
| 560 |
csel x7, x13, x7, eq |
| 561 |
|
| 562 |
ldp x13, x14, [x28, #400] |
| 563 |
csel x8, x13, x8, eq |
| 564 |
csel x9, x14, x9, eq |
| 565 |
ldp x13, x14, [x28, #416] |
| 566 |
csel x10, x13, x10, eq |
| 567 |
csel x11, x14, x11, eq |
| 568 |
ldr x13, [x28, #432] |
| 569 |
csel x12, x13, x12, eq |
| 570 |
|
| 571 |
cmp x2, xzr |
| 572 |
mov x13, x3 |
| 573 |
csel x3, x8, x3, lt |
| 574 |
csel x8, x13, x8, lt |
| 575 |
|
| 576 |
mov x13, x4 |
| 577 |
csel x4, x9, x4, lt |
| 578 |
csel x9, x13, x9, lt |
| 579 |
|
| 580 |
mov x13, x5 |
| 581 |
csel x5, x10, x5, lt |
| 582 |
csel x10, x13, x10, lt |
| 583 |
|
| 584 |
mov x13, x6 |
| 585 |
csel x6, x11, x6, lt |
| 586 |
csel x11, x13, x11, lt |
| 587 |
|
| 588 |
mov x13, x7 |
| 589 |
csel x7, x12, x7, lt |
| 590 |
csel x12, x13, x12, lt |
| 591 |
|
| 592 |
stp x3, x4, [sp, #312] |
| 593 |
stp x5, x6, [sp, #328] |
| 594 |
str x7, [sp, #344] |
| 595 |
|
| 596 |
stp x8, x9, [sp, #352] |
| 597 |
stp x10, x11, [sp, #368] |
| 598 |
str x12, [sp, #384] |
| 599 |
|
| 600 |
mov x28, x15 |
| 601 |
|
| 602 |
cmp x27, #1 |
| 603 |
ldp x13, x14, [x28, #80] |
| 604 |
csel x3, x13, xzr, eq |
| 605 |
csel x4, x14, xzr, eq |
| 606 |
ldp x13, x14, [x28, #96] |
| 607 |
csel x5, x13, xzr, eq |
| 608 |
csel x6, x14, xzr, eq |
| 609 |
ldr x13, [x28, #112] |
| 610 |
csel x7, x13, xzr, eq |
| 611 |
|
| 612 |
cmp x27, #2 |
| 613 |
ldp x13, x14, [x28, #200] |
| 614 |
csel x3, x13, x3, eq |
| 615 |
csel x4, x14, x4, eq |
| 616 |
ldp x13, x14, [x28, #216] |
| 617 |
csel x5, x13, x5, eq |
| 618 |
csel x6, x14, x6, eq |
| 619 |
ldr x13, [x28, #232] |
| 620 |
csel x7, x13, x7, eq |
| 621 |
|
| 622 |
cmp x27, #3 |
| 623 |
ldp x13, x14, [x28, #320] |
| 624 |
csel x3, x13, x3, eq |
| 625 |
csel x4, x14, x4, eq |
| 626 |
ldp x13, x14, [x28, #336] |
| 627 |
csel x5, x13, x5, eq |
| 628 |
csel x6, x14, x6, eq |
| 629 |
ldr x13, [x28, #352] |
| 630 |
csel x7, x13, x7, eq |
| 631 |
|
| 632 |
cmp x27, #4 |
| 633 |
ldp x13, x14, [x28, #440] |
| 634 |
csel x3, x13, x3, eq |
| 635 |
csel x4, x14, x4, eq |
| 636 |
ldp x13, x14, [x28, #456] |
| 637 |
csel x5, x13, x5, eq |
| 638 |
csel x6, x14, x6, eq |
| 639 |
ldr x13, [x28, #472] |
| 640 |
csel x7, x13, x7, eq |
| 641 |
|
| 642 |
add x28, x28, #480 |
| 643 |
|
| 644 |
cmp x27, #5 |
| 645 |
ldp x13, x14, [x28, #80] |
| 646 |
csel x3, x13, x3, eq |
| 647 |
csel x4, x14, x4, eq |
| 648 |
ldp x13, x14, [x28, #96] |
| 649 |
csel x5, x13, x5, eq |
| 650 |
csel x6, x14, x6, eq |
| 651 |
ldr x13, [x28, #112] |
| 652 |
csel x7, x13, x7, eq |
| 653 |
|
| 654 |
cmp x27, #6 |
| 655 |
ldp x13, x14, [x28, #200] |
| 656 |
csel x3, x13, x3, eq |
| 657 |
csel x4, x14, x4, eq |
| 658 |
ldp x13, x14, [x28, #216] |
| 659 |
csel x5, x13, x5, eq |
| 660 |
csel x6, x14, x6, eq |
| 661 |
ldr x13, [x28, #232] |
| 662 |
csel x7, x13, x7, eq |
| 663 |
|
| 664 |
cmp x27, #7 |
| 665 |
ldp x13, x14, [x28, #320] |
| 666 |
csel x3, x13, x3, eq |
| 667 |
csel x4, x14, x4, eq |
| 668 |
ldp x13, x14, [x28, #336] |
| 669 |
csel x5, x13, x5, eq |
| 670 |
csel x6, x14, x6, eq |
| 671 |
ldr x13, [x28, #352] |
| 672 |
csel x7, x13, x7, eq |
| 673 |
|
| 674 |
cmp x27, #8 |
| 675 |
ldp x13, x14, [x28, #440] |
| 676 |
csel x3, x13, x3, eq |
| 677 |
csel x4, x14, x4, eq |
| 678 |
ldp x13, x14, [x28, #456] |
| 679 |
csel x5, x13, x5, eq |
| 680 |
csel x6, x14, x6, eq |
| 681 |
ldr x13, [x28, #472] |
| 682 |
csel x7, x13, x7, eq |
| 683 |
|
| 684 |
// neg |
| 685 |
ldp x21, x22, [sp, #120] |
| 686 |
ldp x23, x24, [sp, #136] |
| 687 |
|
| 688 |
sub x8, x21, x3 |
| 689 |
sub x9, x22, x4 |
| 690 |
sub x10, x23, x5 |
| 691 |
sub x11, x21, x6 |
| 692 |
sub x12, x24, x7 |
| 693 |
|
| 694 |
cmp x2, xzr |
| 695 |
csel x3, x8, x3, lt |
| 696 |
csel x4, x9, x4, lt |
| 697 |
csel x5, x10, x5, lt |
| 698 |
csel x6, x11, x6, lt |
| 699 |
csel x7, x12, x7, lt |
| 700 |
|
| 701 |
stp x3, x4, [sp, #392] |
| 702 |
stp x5, x6, [sp, #408] |
| 703 |
str x7, [sp, #424] |
| 704 |
|
| 705 |
/* nielsadd2 */ |
| 706 |
|
| 707 |
ldp x3, x4, [sp, #192] |
| 708 |
ldp x5, x6, [sp, #208] |
| 709 |
ldr x7, [sp, #224] |
| 710 |
|
| 711 |
ldp x13, x14, [sp, #152] |
| 712 |
ldp x15, x16, [sp, #168] |
| 713 |
ldr x17, [sp, #184] |
| 714 |
|
| 715 |
// sub |
| 716 |
ldp x21, x22, [sp, #120] |
| 717 |
ldp x23, x24, [sp, #136] |
| 718 |
|
| 719 |
add x8, x3, x21 |
| 720 |
sub x8, x8, x13 |
| 721 |
add x9, x4, x22 |
| 722 |
sub x9, x9, x14 |
| 723 |
add x10, x5, x23 |
| 724 |
sub x10, x10, x15 |
| 725 |
add x11, x6, x21 |
| 726 |
sub x11, x11, x16 |
| 727 |
add x12, x7, x24 |
| 728 |
sub x12, x12, x17 |
| 729 |
|
| 730 |
stp x8, x9, [sp, #432] |
| 731 |
stp x10, x11, [sp, #448] |
| 732 |
str x12, [sp, #464] |
| 733 |
|
| 734 |
// add |
| 735 |
add x8, x3, x13 |
| 736 |
add x9, x4, x14 |
| 737 |
add x10, x5, x15 |
| 738 |
add x11, x6, x16 |
| 739 |
add x12, x7, x17 |
| 740 |
|
| 741 |
stp x8, x9, [sp, #472] |
| 742 |
stp x10, x11, [sp, #488] |
| 743 |
str x12, [sp, #504] |
| 744 |
|
| 745 |
// inputs <312,352> and <432,472> |
| 746 |
add x11, sp, #312 |
| 747 |
add x12, sp, #352 |
| 748 |
ld2 {v10.s, v11.s}[0], [x11], #8 |
| 749 |
ld2 {v10.s, v11.s}[1], [x12], #8 |
| 750 |
ld2 {v12.s, v13.s}[0], [x11], #8 |
| 751 |
ld2 {v12.s, v13.s}[1], [x12], #8 |
| 752 |
ld2 {v14.s, v15.s}[0], [x11], #8 |
| 753 |
ld2 {v14.s, v15.s}[1], [x12], #8 |
| 754 |
ld2 {v16.s, v17.s}[0], [x11], #8 |
| 755 |
ld2 {v16.s, v17.s}[1], [x12], #8 |
| 756 |
ld2 {v18.s, v19.s}[0], [x11], #8 |
| 757 |
ld2 {v18.s, v19.s}[1], [x12], #8 |
| 758 |
|
| 759 |
add x11, sp, #432 |
| 760 |
add x12, sp, #472 |
| 761 |
ld2 {v20.s, v21.s}[0], [x11], #8 |
| 762 |
ld2 {v20.s, v21.s}[1], [x12], #8 |
| 763 |
ld2 {v22.s, v23.s}[0], [x11], #8 |
| 764 |
ld2 {v22.s, v23.s}[1], [x12], #8 |
| 765 |
ld2 {v24.s, v25.s}[0], [x11], #8 |
| 766 |
ld2 {v24.s, v25.s}[1], [x12], #8 |
| 767 |
ld2 {v26.s, v27.s}[0], [x11], #8 |
| 768 |
ld2 {v26.s, v27.s}[1], [x12], #8 |
| 769 |
ld2 {v28.s, v29.s}[0], [x11], #8 |
| 770 |
ld2 {v28.s, v29.s}[1], [x12], #8 |
| 771 |
|
| 772 |
// <432,312> ← Mul(<312,352>,<432,472>) |
| 773 |
mov x28, #0x1fffffff |
| 774 |
dup v29.2d, x28 |
| 775 |
dup v30.2s, w29 |
| 776 |
|
| 777 |
umull v5.2d, v15.2s, v25.2s |
| 778 |
umull v7.2d, v15.2s, v27.2s |
| 779 |
umull v8.2d, v15.2s, v28.2s |
| 780 |
umull v0.2d, v15.2s, v20.2s |
| 781 |
umull v2.2d, v15.2s, v22.2s |
| 782 |
umull v4.2d, v15.2s, v24.2s |
| 783 |
umull v6.2d, v15.2s, v26.2s |
| 784 |
umull v1.2d, v15.2s, v21.2s |
| 785 |
umull v3.2d, v15.2s, v23.2s |
| 786 |
|
| 787 |
umlal v7.2d, v17.2s, v25.2s |
| 788 |
umlal v8.2d, v17.2s, v27.2s |
| 789 |
umlal v0.2d, v17.2s, v28.2s |
| 790 |
umlal v2.2d, v17.2s, v20.2s |
| 791 |
umlal v4.2d, v17.2s, v22.2s |
| 792 |
umlal v6.2d, v17.2s, v24.2s |
| 793 |
umlal v1.2d, v17.2s, v26.2s |
| 794 |
umlal v3.2d, v17.2s, v21.2s |
| 795 |
umull v9.2d, v17.2s, v23.2s |
| 796 |
|
| 797 |
umlal v8.2d, v18.2s, v25.2s |
| 798 |
umlal v0.2d, v18.2s, v27.2s |
| 799 |
umlal v2.2d, v18.2s, v28.2s |
| 800 |
umlal v4.2d, v18.2s, v20.2s |
| 801 |
umlal v6.2d, v18.2s, v22.2s |
| 802 |
umlal v1.2d, v18.2s, v24.2s |
| 803 |
umlal v3.2d, v18.2s, v26.2s |
| 804 |
umlal v9.2d, v18.2s, v21.2s |
| 805 |
umull v15.2d, v18.2s, v23.2s |
| 806 |
|
| 807 |
umlal v0.2d, v10.2s, v25.2s |
| 808 |
umlal v2.2d, v10.2s, v27.2s |
| 809 |
umlal v4.2d, v10.2s, v28.2s |
| 810 |
umlal v6.2d, v10.2s, v20.2s |
| 811 |
umlal v1.2d, v10.2s, v22.2s |
| 812 |
umlal v3.2d, v10.2s, v24.2s |
| 813 |
umlal v9.2d, v10.2s, v26.2s |
| 814 |
umlal v15.2d, v10.2s, v21.2s |
| 815 |
umull v17.2d, v10.2s, v23.2s |
| 816 |
|
| 817 |
umlal v2.2d, v12.2s, v25.2s |
| 818 |
umlal v4.2d, v12.2s, v27.2s |
| 819 |
umlal v6.2d, v12.2s, v28.2s |
| 820 |
umlal v1.2d, v12.2s, v20.2s |
| 821 |
umlal v3.2d, v12.2s, v22.2s |
| 822 |
umlal v9.2d, v12.2s, v24.2s |
| 823 |
umlal v15.2d, v12.2s, v26.2s |
| 824 |
umlal v17.2d, v12.2s, v21.2s |
| 825 |
umull v18.2d, v12.2s, v23.2s |
| 826 |
|
| 827 |
umlal v4.2d, v14.2s, v25.2s |
| 828 |
umlal v6.2d, v14.2s, v27.2s |
| 829 |
umlal v1.2d, v14.2s, v28.2s |
| 830 |
umlal v3.2d, v14.2s, v20.2s |
| 831 |
umlal v9.2d, v14.2s, v22.2s |
| 832 |
umlal v15.2d, v14.2s, v24.2s |
| 833 |
umlal v17.2d, v14.2s, v26.2s |
| 834 |
umlal v18.2d, v14.2s, v21.2s |
| 835 |
umull v10.2d, v14.2s, v23.2s |
| 836 |
|
| 837 |
umlal v6.2d, v16.2s, v25.2s |
| 838 |
umlal v1.2d, v16.2s, v27.2s |
| 839 |
umlal v3.2d, v16.2s, v28.2s |
| 840 |
umlal v9.2d, v16.2s, v20.2s |
| 841 |
umlal v15.2d, v16.2s, v22.2s |
| 842 |
umlal v17.2d, v16.2s, v24.2s |
| 843 |
umlal v18.2d, v16.2s, v26.2s |
| 844 |
umlal v10.2d, v16.2s, v21.2s |
| 845 |
umull v12.2d, v16.2s, v23.2s |
| 846 |
|
| 847 |
umlal v1.2d, v11.2s, v25.2s |
| 848 |
umlal v3.2d, v11.2s, v27.2s |
| 849 |
umlal v9.2d, v11.2s, v28.2s |
| 850 |
umlal v15.2d, v11.2s, v20.2s |
| 851 |
umlal v17.2d, v11.2s, v22.2s |
| 852 |
umlal v18.2d, v11.2s, v24.2s |
| 853 |
umlal v10.2d, v11.2s, v26.2s |
| 854 |
umlal v12.2d, v11.2s, v21.2s |
| 855 |
umull v14.2d, v11.2s, v23.2s |
| 856 |
|
| 857 |
umlal v3.2d, v13.2s, v25.2s |
| 858 |
umlal v9.2d, v13.2s, v27.2s |
| 859 |
umlal v15.2d, v13.2s, v28.2s |
| 860 |
umlal v17.2d, v13.2s, v20.2s |
| 861 |
umlal v18.2d, v13.2s, v22.2s |
| 862 |
umlal v10.2d, v13.2s, v24.2s |
| 863 |
umlal v12.2d, v13.2s, v26.2s |
| 864 |
umlal v14.2d, v13.2s, v21.2s |
| 865 |
umull v16.2d, v13.2s, v23.2s |
| 866 |
|
| 867 |
usra v15.2d, v9.2d, #29 |
| 868 |
and v9.16b, v9.16b, v29.16b |
| 869 |
xtn v9.2s, v9.2d |
| 870 |
umull v9.2d, v9.2s, v30.2s |
| 871 |
add v5.2d, v5.2d, v9.2d |
| 872 |
|
| 873 |
usra v17.2d, v15.2d, #29 |
| 874 |
and v15.16b, v15.16b, v29.16b |
| 875 |
xtn v15.2s, v15.2d |
| 876 |
umull v15.2d, v15.2s, v30.2s |
| 877 |
add v7.2d, v7.2d, v15.2d |
| 878 |
|
| 879 |
usra v18.2d, v17.2d, #29 |
| 880 |
and v17.16b, v17.16b, v29.16b |
| 881 |
xtn v17.2s, v17.2d |
| 882 |
umull v17.2d, v17.2s, v30.2s |
| 883 |
add v8.2d, v8.2d, v17.2d |
| 884 |
|
| 885 |
usra v10.2d, v18.2d, #29 |
| 886 |
and v18.16b, v18.16b, v29.16b |
| 887 |
xtn v18.2s, v18.2d |
| 888 |
umull v18.2d, v18.2s, v30.2s |
| 889 |
add v0.2d, v0.2d, v18.2d |
| 890 |
|
| 891 |
usra v12.2d, v10.2d, #29 |
| 892 |
and v10.16b, v10.16b, v29.16b |
| 893 |
xtn v10.2s, v10.2d |
| 894 |
umull v10.2d, v10.2s, v30.2s |
| 895 |
add v2.2d, v2.2d, v10.2d |
| 896 |
|
| 897 |
usra v14.2d, v12.2d, #29 |
| 898 |
and v12.16b, v12.16b, v29.16b |
| 899 |
xtn v12.2s, v12.2d |
| 900 |
umull v12.2d, v12.2s, v30.2s |
| 901 |
add v4.2d, v4.2d, v12.2d |
| 902 |
|
| 903 |
usra v16.2d, v14.2d, #29 |
| 904 |
and v14.16b, v14.16b, v29.16b |
| 905 |
xtn v14.2s, v14.2d |
| 906 |
umull v14.2d, v14.2s, v30.2s |
| 907 |
add v6.2d, v6.2d, v14.2d |
| 908 |
|
| 909 |
ushr v9.2d, v16.2d, #29 |
| 910 |
and v16.16b, v16.16b, v29.16b |
| 911 |
xtn v16.2s, v16.2d |
| 912 |
umull v16.2d, v16.2s, v30.2s |
| 913 |
add v1.2d, v1.2d, v16.2d |
| 914 |
|
| 915 |
xtn v9.2s, v9.2d |
| 916 |
umull v9.2d, v9.2s, v30.2s |
| 917 |
add v3.2d, v3.2d, v9.2d |
| 918 |
|
| 919 |
lsr x19, x28, #6 |
| 920 |
dup v30.2d, x19 |
| 921 |
|
| 922 |
usra v4.2d, v2.2d, #29 |
| 923 |
and v2.16b, v2.16b, v29.16b |
| 924 |
|
| 925 |
usra v7.2d, v5.2d, #29 |
| 926 |
and v5.16b, v5.16b, v29.16b |
| 927 |
|
| 928 |
usra v6.2d, v4.2d, #29 |
| 929 |
and v4.16b, v4.16b, v29.16b |
| 930 |
|
| 931 |
usra v8.2d, v7.2d, #29 |
| 932 |
and v7.16b, v7.16b, v29.16b |
| 933 |
|
| 934 |
usra v1.2d, v6.2d, #29 |
| 935 |
and v6.16b, v6.16b, v29.16b |
| 936 |
|
| 937 |
usra v0.2d, v8.2d, #29 |
| 938 |
and v8.16b, v8.16b, v29.16b |
| 939 |
|
| 940 |
usra v3.2d, v1.2d, #29 |
| 941 |
and v1.16b, v1.16b, v29.16b |
| 942 |
|
| 943 |
usra v2.2d, v0.2d, #29 |
| 944 |
and v0.16b, v0.16b, v29.16b |
| 945 |
|
| 946 |
bic v15.16b, v3.16b, v30.16b |
| 947 |
usra v5.2d, v15.2d, #23 |
| 948 |
usra v5.2d, v15.2d, #22 |
| 949 |
usra v5.2d, v15.2d, #19 |
| 950 |
and v3.16b, v3.16b, v30.16b |
| 951 |
|
| 952 |
usra v4.2d, v2.2d, #29 |
| 953 |
and v2.16b, v2.16b, v29.16b |
| 954 |
|
| 955 |
usra v7.2d, v5.2d, #29 |
| 956 |
and v5.16b, v5.16b, v29.16b |
| 957 |
|
| 958 |
add x11, sp, #432 |
| 959 |
add x12, sp, #312 |
| 960 |
st2 {v0.s, v1.s}[0], [x11], #8 |
| 961 |
st2 {v0.s, v1.s}[2], [x12], #8 |
| 962 |
st2 {v2.s, v3.s}[0], [x11], #8 |
| 963 |
st2 {v2.s, v3.s}[2], [x12], #8 |
| 964 |
st2 {v4.s, v5.s}[0], [x11], #8 |
| 965 |
st2 {v4.s, v5.s}[2], [x12], #8 |
| 966 |
st2 {v6.s, v7.s}[0], [x11], #8 |
| 967 |
st2 {v6.s, v7.s}[2], [x12], #8 |
| 968 |
st1 {v8.2s}, [x11], #8 |
| 969 |
mov x19, v8.d[1] |
| 970 |
str x19, [x12], #8 |
| 971 |
|
| 972 |
// sub |
| 973 |
ldp x3, x4, [sp, #312] |
| 974 |
ldp x5, x6, [sp, #328] |
| 975 |
ldr x2, [sp, #344] |
| 976 |
|
| 977 |
ldp x13, x14, [sp, #432] |
| 978 |
ldp x15, x16, [sp, #448] |
| 979 |
ldr x17, [sp, #464] |
| 980 |
|
| 981 |
ldp x21, x22, [sp, #120] |
| 982 |
ldp x23, x24, [sp, #136] |
| 983 |
|
| 984 |
add x0, x3, x21 |
| 985 |
sub x0, x0, x13 |
| 986 |
add x1, x4, x22 |
| 987 |
sub x1, x1, x14 |
| 988 |
add x7, x5, x23 |
| 989 |
sub x7, x7, x15 |
| 990 |
add x8, x6, x21 |
| 991 |
sub x8, x8, x16 |
| 992 |
add x9, x2, x24 |
| 993 |
sub x9, x9, x17 |
| 994 |
|
| 995 |
stp x0, x1, [sp, #472] |
| 996 |
stp x7, x8, [sp, #488] |
| 997 |
str x9, [sp, #504] |
| 998 |
|
| 999 |
// add |
| 1000 |
add x0, x3, x13 |
| 1001 |
add x1, x4, x14 |
| 1002 |
add x7, x5, x15 |
| 1003 |
add x8, x6, x16 |
| 1004 |
add x9, x2, x17 |
| 1005 |
|
| 1006 |
stp x0, x1, [sp, #432] |
| 1007 |
stp x7, x8, [sp, #448] |
| 1008 |
str x9, [sp, #464] |
| 1009 |
|
| 1010 |
// mul |
| 1011 |
add x19, sp, #272 |
| 1012 |
ldp w13, w17, [x19, #0] |
| 1013 |
ldp w14, w18, [x19, #8] |
| 1014 |
ldp w15, w10, [x19, #16] |
| 1015 |
ldp w16, w11, [x19, #24] |
| 1016 |
ldr w12, [x19, #32] |
| 1017 |
|
| 1018 |
ldp w23, w27, [x19, #120] |
| 1019 |
ldp w24, w28, [x19, #128] |
| 1020 |
ldp w25, w20, [x19, #136] |
| 1021 |
ldp w26, w21, [x19, #144] |
| 1022 |
ldr w22, [x19, #152] |
| 1023 |
|
| 1024 |
umull x0, w10, w20 |
| 1025 |
umull x1, w10, w21 |
| 1026 |
umull x2, w10, w22 |
| 1027 |
umull x3, w10, w23 |
| 1028 |
umull x4, w10, w24 |
| 1029 |
umull x5, w10, w25 |
| 1030 |
umull x6, w10, w26 |
| 1031 |
umull x7, w10, w27 |
| 1032 |
umull x8, w10, w28 |
| 1033 |
|
| 1034 |
umaddl x1, w11, w20, x1 |
| 1035 |
umaddl x2, w11, w21, x2 |
| 1036 |
umaddl x3, w11, w22, x3 |
| 1037 |
umaddl x4, w11, w23, x4 |
| 1038 |
umaddl x5, w11, w24, x5 |
| 1039 |
umaddl x6, w11, w25, x6 |
| 1040 |
umaddl x7, w11, w26, x7 |
| 1041 |
umaddl x8, w11, w27, x8 |
| 1042 |
umull x9, w11, w28 |
| 1043 |
|
| 1044 |
umaddl x2, w12, w20, x2 |
| 1045 |
umaddl x3, w12, w21, x3 |
| 1046 |
umaddl x4, w12, w22, x4 |
| 1047 |
umaddl x5, w12, w23, x5 |
| 1048 |
umaddl x6, w12, w24, x6 |
| 1049 |
umaddl x7, w12, w25, x7 |
| 1050 |
umaddl x8, w12, w26, x8 |
| 1051 |
umaddl x9, w12, w27, x9 |
| 1052 |
umull x10, w12, w28 |
| 1053 |
|
| 1054 |
umaddl x3, w13, w20, x3 |
| 1055 |
umaddl x4, w13, w21, x4 |
| 1056 |
umaddl x5, w13, w22, x5 |
| 1057 |
umaddl x6, w13, w23, x6 |
| 1058 |
umaddl x7, w13, w24, x7 |
| 1059 |
umaddl x8, w13, w25, x8 |
| 1060 |
umaddl x9, w13, w26, x9 |
| 1061 |
umaddl x10, w13, w27, x10 |
| 1062 |
umull x11, w13, w28 |
| 1063 |
|
| 1064 |
umaddl x4, w14, w20, x4 |
| 1065 |
umaddl x5, w14, w21, x5 |
| 1066 |
umaddl x6, w14, w22, x6 |
| 1067 |
umaddl x7, w14, w23, x7 |
| 1068 |
umaddl x8, w14, w24, x8 |
| 1069 |
umaddl x9, w14, w25, x9 |
| 1070 |
umaddl x10, w14, w26, x10 |
| 1071 |
umaddl x11, w14, w27, x11 |
| 1072 |
umull x12, w14, w28 |
| 1073 |
|
| 1074 |
umaddl x5, w15, w20, x5 |
| 1075 |
umaddl x6, w15, w21, x6 |
| 1076 |
umaddl x7, w15, w22, x7 |
| 1077 |
umaddl x8, w15, w23, x8 |
| 1078 |
umaddl x9, w15, w24, x9 |
| 1079 |
umaddl x10, w15, w25, x10 |
| 1080 |
umaddl x11, w15, w26, x11 |
| 1081 |
umaddl x12, w15, w27, x12 |
| 1082 |
umull x13, w15, w28 |
| 1083 |
|
| 1084 |
umaddl x6, w16, w20, x6 |
| 1085 |
umaddl x7, w16, w21, x7 |
| 1086 |
umaddl x8, w16, w22, x8 |
| 1087 |
umaddl x9, w16, w23, x9 |
| 1088 |
umaddl x10, w16, w24, x10 |
| 1089 |
umaddl x11, w16, w25, x11 |
| 1090 |
umaddl x12, w16, w26, x12 |
| 1091 |
umaddl x13, w16, w27, x13 |
| 1092 |
umull x14, w16, w28 |
| 1093 |
|
| 1094 |
umaddl x7, w17, w20, x7 |
| 1095 |
umaddl x8, w17, w21, x8 |
| 1096 |
umaddl x9, w17, w22, x9 |
| 1097 |
umaddl x10, w17, w23, x10 |
| 1098 |
umaddl x11, w17, w24, x11 |
| 1099 |
umaddl x12, w17, w25, x12 |
| 1100 |
umaddl x13, w17, w26, x13 |
| 1101 |
umaddl x14, w17, w27, x14 |
| 1102 |
umull x15, w17, w28 |
| 1103 |
|
| 1104 |
umaddl x8, w18, w20, x8 |
| 1105 |
umaddl x9, w18, w21, x9 |
| 1106 |
umaddl x10, w18, w22, x10 |
| 1107 |
umaddl x11, w18, w23, x11 |
| 1108 |
umaddl x12, w18, w24, x12 |
| 1109 |
umaddl x13, w18, w25, x13 |
| 1110 |
umaddl x14, w18, w26, x14 |
| 1111 |
umaddl x15, w18, w27, x15 |
| 1112 |
umull x16, w18, w28 |
| 1113 |
|
| 1114 |
add x10, x10, x9, lsr #29 |
| 1115 |
and x9, x9, #0x1fffffff |
| 1116 |
umull x9, w9, w29 |
| 1117 |
add x0, x0, x9 |
| 1118 |
|
| 1119 |
add x11, x11, x10, lsr #29 |
| 1120 |
and x10, x10, #0x1fffffff |
| 1121 |
umull x10, w10, w29 |
| 1122 |
add x1, x1, x10 |
| 1123 |
|
| 1124 |
add x12, x12, x11, lsr #29 |
| 1125 |
and x11, x11, #0x1fffffff |
| 1126 |
umull x11, w11, w29 |
| 1127 |
add x2, x2, x11 |
| 1128 |
|
| 1129 |
add x13, x13, x12, lsr #29 |
| 1130 |
and x12, x12, #0x1fffffff |
| 1131 |
umull x12, w12, w29 |
| 1132 |
add x3, x3, x12 |
| 1133 |
|
| 1134 |
add x14, x14, x13, lsr #29 |
| 1135 |
and x13, x13, #0x1fffffff |
| 1136 |
umull x13, w13, w29 |
| 1137 |
add x4, x4, x13 |
| 1138 |
|
| 1139 |
add x15, x15, x14, lsr #29 |
| 1140 |
and x14, x14, #0x1fffffff |
| 1141 |
umull x14, w14, w29 |
| 1142 |
add x5, x5, x14 |
| 1143 |
|
| 1144 |
add x16, x16, x15, lsr #29 |
| 1145 |
and x15, x15, #0x1fffffff |
| 1146 |
umull x15, w15, w29 |
| 1147 |
add x6, x6, x15 |
| 1148 |
|
| 1149 |
lsr x9, x16, #29 |
| 1150 |
and x16, x16, #0x1fffffff |
| 1151 |
umull x16, w16, w29 |
| 1152 |
add x7, x7, x16 |
| 1153 |
|
| 1154 |
umull x9, w9, w29 |
| 1155 |
add x8, x8, x9 |
| 1156 |
|
| 1157 |
add x5, x5, x4, lsr #29 |
| 1158 |
and x4, x4, 0x1fffffff |
| 1159 |
|
| 1160 |
add x1, x1, x0, lsr #29 |
| 1161 |
and x0, x0, 0x1fffffff |
| 1162 |
|
| 1163 |
add x6, x6, x5, lsr #29 |
| 1164 |
and x5, x5, 0x1fffffff |
| 1165 |
|
| 1166 |
add x2, x2, x1, lsr #29 |
| 1167 |
and x1, x1, 0x1fffffff |
| 1168 |
|
| 1169 |
add x7, x7, x6, lsr #29 |
| 1170 |
and x6, x6, 0x1fffffff |
| 1171 |
|
| 1172 |
add x3, x3, x2, lsr #29 |
| 1173 |
and x2, x2, 0x1fffffff |
| 1174 |
|
| 1175 |
add x8, x8, x7, lsr #29 |
| 1176 |
and x7, x7, 0x1fffffff |
| 1177 |
|
| 1178 |
add x4, x4, x3, lsr #29 |
| 1179 |
and x3, x3, 0x1fffffff |
| 1180 |
bfi x3, x7, #32, #29 |
| 1181 |
|
| 1182 |
bic x10, x8, #0x7fffff |
| 1183 |
add x0, x0, x10, lsr #23 |
| 1184 |
add x0, x0, x10, lsr #22 |
| 1185 |
add x0, x0, x10, lsr #19 |
| 1186 |
and x8, x8, #0x7fffff |
| 1187 |
|
| 1188 |
add x5, x5, x4, lsr #29 |
| 1189 |
and x4, x4, 0x1fffffff |
| 1190 |
bfi x4, x8, #32, #23 |
| 1191 |
|
| 1192 |
add x1, x1, x0, lsr #29 |
| 1193 |
bfi x6, x1, #32, #30 |
| 1194 |
and x0, x0, 0x1fffffff |
| 1195 |
bfi x5, x0, #32, #29 |
| 1196 |
|
| 1197 |
ldp x23, x24, [sp, #232] |
| 1198 |
ldp x25, x26, [sp, #248] |
| 1199 |
ldr x22, [sp, #264] |
| 1200 |
|
| 1201 |
// double |
| 1202 |
add x23, x23, x23 |
| 1203 |
lsr x27, x23, #32 |
| 1204 |
mov w23, w23 |
| 1205 |
add x24, x24, x24 |
| 1206 |
lsr x28, x24, #32 |
| 1207 |
mov w24, w24 |
| 1208 |
add x25, x25, x25 |
| 1209 |
lsr x20, x25, #32 |
| 1210 |
mov w25, w25 |
| 1211 |
add x26, x26, x26 |
| 1212 |
lsr x21, x26, #32 |
| 1213 |
mov w26, w26 |
| 1214 |
add x22, x22, x22 |
| 1215 |
|
| 1216 |
add x25, x25, x24, lsr #29 |
| 1217 |
and x24, x24, 0x1fffffff |
| 1218 |
|
| 1219 |
add x21, x21, x20, lsr #29 |
| 1220 |
and x20, x20, 0x1fffffff |
| 1221 |
|
| 1222 |
add x26, x26, x25, lsr #29 |
| 1223 |
and x25, x25, 0x1fffffff |
| 1224 |
|
| 1225 |
add x22, x22, x21, lsr #29 |
| 1226 |
and x21, x21, 0x1fffffff |
| 1227 |
|
| 1228 |
add x27, x27, x26, lsr #29 |
| 1229 |
and x26, x26, 0x1fffffff |
| 1230 |
|
| 1231 |
add x23, x23, x22, lsr #29 |
| 1232 |
and x22, x22, 0x1fffffff |
| 1233 |
|
| 1234 |
add x28, x28, x27, lsr #29 |
| 1235 |
and x27, x27, 0x1fffffff |
| 1236 |
|
| 1237 |
add x24, x24, x23, lsr #29 |
| 1238 |
and x23, x23, 0x1fffffff |
| 1239 |
bfi x23, x27, #32, #29 |
| 1240 |
|
| 1241 |
bic x10, x28, #0x7fffff |
| 1242 |
add x20, x20, x10, lsr #23 |
| 1243 |
add x20, x20, x10, lsr #22 |
| 1244 |
add x20, x20, x10, lsr #19 |
| 1245 |
and x28, x28, #0x7fffff |
| 1246 |
|
| 1247 |
add x25, x25, x24, lsr #29 |
| 1248 |
and x24, x24, 0x1fffffff |
| 1249 |
bfi x24, x28, #32, #23 |
| 1250 |
|
| 1251 |
add x21, x21, x20, lsr #29 |
| 1252 |
bfi x26, x21, #32, #30 |
| 1253 |
and x20, x20, 0x1fffffff |
| 1254 |
bfi x25, x20, #32, #29 |
| 1255 |
|
| 1256 |
// sub |
| 1257 |
ldp x0, x7, [sp, #120] |
| 1258 |
ldp x8, x9, [sp, #136] |
| 1259 |
|
| 1260 |
add x13, x23, x0 |
| 1261 |
sub x13, x13, x3 |
| 1262 |
add x14, x24, x7 |
| 1263 |
sub x14, x14, x4 |
| 1264 |
add x15, x25, x8 |
| 1265 |
sub x15, x15, x5 |
| 1266 |
add x16, x26, x0 |
| 1267 |
sub x16, x16, x6 |
| 1268 |
add x17, x22, x9 |
| 1269 |
sub x17, x17, x2 |
| 1270 |
|
| 1271 |
add x19, sp, #472 |
| 1272 |
stp x13, x14, [x19, #80] |
| 1273 |
stp x15, x16, [x19, #96] |
| 1274 |
str x17, [x19, #112] |
| 1275 |
|
| 1276 |
// add |
| 1277 |
add x8, x3, x23 |
| 1278 |
add x9, x4, x24 |
| 1279 |
add x10, x5, x25 |
| 1280 |
add x11, x6, x26 |
| 1281 |
add x12, x2, x22 |
| 1282 |
|
| 1283 |
stp x8, x9, [x19, #40] |
| 1284 |
stp x10, x11, [x19, #56] |
| 1285 |
str x12, [x19, #72] |
| 1286 |
|
| 1287 |
/* p1p1 to p3 */ |
| 1288 |
|
| 1289 |
// inputs <472,432> and <552,512> |
| 1290 |
add x11, sp, #472 |
| 1291 |
add x12, sp, #432 |
| 1292 |
ld2 {v10.s, v11.s}[0], [x11], #8 |
| 1293 |
ld2 {v10.s, v11.s}[1], [x12], #8 |
| 1294 |
ld2 {v12.s, v13.s}[0], [x11], #8 |
| 1295 |
ld2 {v12.s, v13.s}[1], [x12], #8 |
| 1296 |
ld2 {v14.s, v15.s}[0], [x11], #8 |
| 1297 |
ld2 {v14.s, v15.s}[1], [x12], #8 |
| 1298 |
ld2 {v16.s, v17.s}[0], [x11], #8 |
| 1299 |
ld2 {v16.s, v17.s}[1], [x12], #8 |
| 1300 |
ld2 {v18.s, v19.s}[0], [x11], #8 |
| 1301 |
ld2 {v18.s, v19.s}[1], [x12], #8 |
| 1302 |
|
| 1303 |
add x11, sp, #552 |
| 1304 |
add x12, sp, #512 |
| 1305 |
ld2 {v20.s, v21.s}[0], [x11], #8 |
| 1306 |
ld2 {v20.s, v21.s}[1], [x12], #8 |
| 1307 |
ld2 {v22.s, v23.s}[0], [x11], #8 |
| 1308 |
ld2 {v22.s, v23.s}[1], [x12], #8 |
| 1309 |
ld2 {v24.s, v25.s}[0], [x11], #8 |
| 1310 |
ld2 {v24.s, v25.s}[1], [x12], #8 |
| 1311 |
ld2 {v26.s, v27.s}[0], [x11], #8 |
| 1312 |
ld2 {v26.s, v27.s}[1], [x12], #8 |
| 1313 |
ld2 {v28.s, v29.s}[0], [x11], #8 |
| 1314 |
ld2 {v28.s, v29.s}[1], [x12], #8 |
| 1315 |
|
| 1316 |
// <152,192> ← Mul(<472,432>,<552,512>) |
| 1317 |
mov x28, #0x1fffffff |
| 1318 |
dup v29.2d, x28 |
| 1319 |
dup v30.2s, w29 |
| 1320 |
|
| 1321 |
umull v5.2d, v15.2s, v25.2s |
| 1322 |
umull v7.2d, v15.2s, v27.2s |
| 1323 |
umull v8.2d, v15.2s, v28.2s |
| 1324 |
umull v0.2d, v15.2s, v20.2s |
| 1325 |
umull v2.2d, v15.2s, v22.2s |
| 1326 |
umull v4.2d, v15.2s, v24.2s |
| 1327 |
umull v6.2d, v15.2s, v26.2s |
| 1328 |
umull v1.2d, v15.2s, v21.2s |
| 1329 |
umull v3.2d, v15.2s, v23.2s |
| 1330 |
|
| 1331 |
umlal v7.2d, v17.2s, v25.2s |
| 1332 |
umlal v8.2d, v17.2s, v27.2s |
| 1333 |
umlal v0.2d, v17.2s, v28.2s |
| 1334 |
umlal v2.2d, v17.2s, v20.2s |
| 1335 |
umlal v4.2d, v17.2s, v22.2s |
| 1336 |
umlal v6.2d, v17.2s, v24.2s |
| 1337 |
umlal v1.2d, v17.2s, v26.2s |
| 1338 |
umlal v3.2d, v17.2s, v21.2s |
| 1339 |
umull v9.2d, v17.2s, v23.2s |
| 1340 |
|
| 1341 |
umlal v8.2d, v18.2s, v25.2s |
| 1342 |
umlal v0.2d, v18.2s, v27.2s |
| 1343 |
umlal v2.2d, v18.2s, v28.2s |
| 1344 |
umlal v4.2d, v18.2s, v20.2s |
| 1345 |
umlal v6.2d, v18.2s, v22.2s |
| 1346 |
umlal v1.2d, v18.2s, v24.2s |
| 1347 |
umlal v3.2d, v18.2s, v26.2s |
| 1348 |
umlal v9.2d, v18.2s, v21.2s |
| 1349 |
umull v15.2d, v18.2s, v23.2s |
| 1350 |
|
| 1351 |
umlal v0.2d, v10.2s, v25.2s |
| 1352 |
umlal v2.2d, v10.2s, v27.2s |
| 1353 |
umlal v4.2d, v10.2s, v28.2s |
| 1354 |
umlal v6.2d, v10.2s, v20.2s |
| 1355 |
umlal v1.2d, v10.2s, v22.2s |
| 1356 |
umlal v3.2d, v10.2s, v24.2s |
| 1357 |
umlal v9.2d, v10.2s, v26.2s |
| 1358 |
umlal v15.2d, v10.2s, v21.2s |
| 1359 |
umull v17.2d, v10.2s, v23.2s |
| 1360 |
|
| 1361 |
umlal v2.2d, v12.2s, v25.2s |
| 1362 |
umlal v4.2d, v12.2s, v27.2s |
| 1363 |
umlal v6.2d, v12.2s, v28.2s |
| 1364 |
umlal v1.2d, v12.2s, v20.2s |
| 1365 |
umlal v3.2d, v12.2s, v22.2s |
| 1366 |
umlal v9.2d, v12.2s, v24.2s |
| 1367 |
umlal v15.2d, v12.2s, v26.2s |
| 1368 |
umlal v17.2d, v12.2s, v21.2s |
| 1369 |
umull v18.2d, v12.2s, v23.2s |
| 1370 |
|
| 1371 |
umlal v4.2d, v14.2s, v25.2s |
| 1372 |
umlal v6.2d, v14.2s, v27.2s |
| 1373 |
umlal v1.2d, v14.2s, v28.2s |
| 1374 |
umlal v3.2d, v14.2s, v20.2s |
| 1375 |
umlal v9.2d, v14.2s, v22.2s |
| 1376 |
umlal v15.2d, v14.2s, v24.2s |
| 1377 |
umlal v17.2d, v14.2s, v26.2s |
| 1378 |
umlal v18.2d, v14.2s, v21.2s |
| 1379 |
umull v10.2d, v14.2s, v23.2s |
| 1380 |
|
| 1381 |
umlal v6.2d, v16.2s, v25.2s |
| 1382 |
umlal v1.2d, v16.2s, v27.2s |
| 1383 |
umlal v3.2d, v16.2s, v28.2s |
| 1384 |
umlal v9.2d, v16.2s, v20.2s |
| 1385 |
umlal v15.2d, v16.2s, v22.2s |
| 1386 |
umlal v17.2d, v16.2s, v24.2s |
| 1387 |
umlal v18.2d, v16.2s, v26.2s |
| 1388 |
umlal v10.2d, v16.2s, v21.2s |
| 1389 |
umull v12.2d, v16.2s, v23.2s |
| 1390 |
|
| 1391 |
umlal v1.2d, v11.2s, v25.2s |
| 1392 |
umlal v3.2d, v11.2s, v27.2s |
| 1393 |
umlal v9.2d, v11.2s, v28.2s |
| 1394 |
umlal v15.2d, v11.2s, v20.2s |
| 1395 |
umlal v17.2d, v11.2s, v22.2s |
| 1396 |
umlal v18.2d, v11.2s, v24.2s |
| 1397 |
umlal v10.2d, v11.2s, v26.2s |
| 1398 |
umlal v12.2d, v11.2s, v21.2s |
| 1399 |
umull v14.2d, v11.2s, v23.2s |
| 1400 |
|
| 1401 |
umlal v3.2d, v13.2s, v25.2s |
| 1402 |
umlal v9.2d, v13.2s, v27.2s |
| 1403 |
umlal v15.2d, v13.2s, v28.2s |
| 1404 |
umlal v17.2d, v13.2s, v20.2s |
| 1405 |
umlal v18.2d, v13.2s, v22.2s |
| 1406 |
umlal v10.2d, v13.2s, v24.2s |
| 1407 |
umlal v12.2d, v13.2s, v26.2s |
| 1408 |
umlal v14.2d, v13.2s, v21.2s |
| 1409 |
umull v16.2d, v13.2s, v23.2s |
| 1410 |
|
| 1411 |
usra v15.2d, v9.2d, #29 |
| 1412 |
and v9.16b, v9.16b, v29.16b |
| 1413 |
xtn v9.2s, v9.2d |
| 1414 |
umull v9.2d, v9.2s, v30.2s |
| 1415 |
add v5.2d, v5.2d, v9.2d |
| 1416 |
|
| 1417 |
usra v17.2d, v15.2d, #29 |
| 1418 |
and v15.16b, v15.16b, v29.16b |
| 1419 |
xtn v15.2s, v15.2d |
| 1420 |
umull v15.2d, v15.2s, v30.2s |
| 1421 |
add v7.2d, v7.2d, v15.2d |
| 1422 |
|
| 1423 |
usra v18.2d, v17.2d, #29 |
| 1424 |
and v17.16b, v17.16b, v29.16b |
| 1425 |
xtn v17.2s, v17.2d |
| 1426 |
umull v17.2d, v17.2s, v30.2s |
| 1427 |
add v8.2d, v8.2d, v17.2d |
| 1428 |
|
| 1429 |
usra v10.2d, v18.2d, #29 |
| 1430 |
and v18.16b, v18.16b, v29.16b |
| 1431 |
xtn v18.2s, v18.2d |
| 1432 |
umull v18.2d, v18.2s, v30.2s |
| 1433 |
add v0.2d, v0.2d, v18.2d |
| 1434 |
|
| 1435 |
usra v12.2d, v10.2d, #29 |
| 1436 |
and v10.16b, v10.16b, v29.16b |
| 1437 |
xtn v10.2s, v10.2d |
| 1438 |
umull v10.2d, v10.2s, v30.2s |
| 1439 |
add v2.2d, v2.2d, v10.2d |
| 1440 |
|
| 1441 |
usra v14.2d, v12.2d, #29 |
| 1442 |
and v12.16b, v12.16b, v29.16b |
| 1443 |
xtn v12.2s, v12.2d |
| 1444 |
umull v12.2d, v12.2s, v30.2s |
| 1445 |
add v4.2d, v4.2d, v12.2d |
| 1446 |
|
| 1447 |
usra v16.2d, v14.2d, #29 |
| 1448 |
and v14.16b, v14.16b, v29.16b |
| 1449 |
xtn v14.2s, v14.2d |
| 1450 |
umull v14.2d, v14.2s, v30.2s |
| 1451 |
add v6.2d, v6.2d, v14.2d |
| 1452 |
|
| 1453 |
ushr v9.2d, v16.2d, #29 |
| 1454 |
and v16.16b, v16.16b, v29.16b |
| 1455 |
xtn v16.2s, v16.2d |
| 1456 |
umull v16.2d, v16.2s, v30.2s |
| 1457 |
add v1.2d, v1.2d, v16.2d |
| 1458 |
|
| 1459 |
xtn v9.2s, v9.2d |
| 1460 |
umull v9.2d, v9.2s, v30.2s |
| 1461 |
add v3.2d, v3.2d, v9.2d |
| 1462 |
|
| 1463 |
lsr x19, x28, #6 |
| 1464 |
dup v30.2d, x19 |
| 1465 |
|
| 1466 |
usra v4.2d, v2.2d, #29 |
| 1467 |
and v2.16b, v2.16b, v29.16b |
| 1468 |
|
| 1469 |
usra v7.2d, v5.2d, #29 |
| 1470 |
and v5.16b, v5.16b, v29.16b |
| 1471 |
|
| 1472 |
usra v6.2d, v4.2d, #29 |
| 1473 |
and v4.16b, v4.16b, v29.16b |
| 1474 |
|
| 1475 |
usra v8.2d, v7.2d, #29 |
| 1476 |
and v7.16b, v7.16b, v29.16b |
| 1477 |
|
| 1478 |
usra v1.2d, v6.2d, #29 |
| 1479 |
and v6.16b, v6.16b, v29.16b |
| 1480 |
|
| 1481 |
usra v0.2d, v8.2d, #29 |
| 1482 |
and v8.16b, v8.16b, v29.16b |
| 1483 |
|
| 1484 |
usra v3.2d, v1.2d, #29 |
| 1485 |
and v1.16b, v1.16b, v29.16b |
| 1486 |
|
| 1487 |
usra v2.2d, v0.2d, #29 |
| 1488 |
and v0.16b, v0.16b, v29.16b |
| 1489 |
|
| 1490 |
bic v15.16b, v3.16b, v30.16b |
| 1491 |
usra v5.2d, v15.2d, #23 |
| 1492 |
usra v5.2d, v15.2d, #22 |
| 1493 |
usra v5.2d, v15.2d, #19 |
| 1494 |
and v3.16b, v3.16b, v30.16b |
| 1495 |
|
| 1496 |
usra v4.2d, v2.2d, #29 |
| 1497 |
and v2.16b, v2.16b, v29.16b |
| 1498 |
|
| 1499 |
usra v7.2d, v5.2d, #29 |
| 1500 |
and v5.16b, v5.16b, v29.16b |
| 1501 |
|
| 1502 |
add x11, sp, #152 |
| 1503 |
add x12, sp, #192 |
| 1504 |
st2 {v0.s, v1.s}[0], [x11], #8 |
| 1505 |
st2 {v0.s, v1.s}[2], [x12], #8 |
| 1506 |
st2 {v2.s, v3.s}[0], [x11], #8 |
| 1507 |
st2 {v2.s, v3.s}[2], [x12], #8 |
| 1508 |
st2 {v4.s, v5.s}[0], [x11], #8 |
| 1509 |
st2 {v4.s, v5.s}[2], [x12], #8 |
| 1510 |
st2 {v6.s, v7.s}[0], [x11], #8 |
| 1511 |
st2 {v6.s, v7.s}[2], [x12], #8 |
| 1512 |
st1 {v8.2s}, [x11], #8 |
| 1513 |
mov x19, v8.d[1] |
| 1514 |
str x19, [x12], #8 |
| 1515 |
|
| 1516 |
// inputs <512,432> and <552,472> |
| 1517 |
add x11, sp, #512 |
| 1518 |
add x12, sp, #432 |
| 1519 |
ld2 {v10.s, v11.s}[0], [x11], #8 |
| 1520 |
ld2 {v10.s, v11.s}[1], [x12], #8 |
| 1521 |
ld2 {v12.s, v13.s}[0], [x11], #8 |
| 1522 |
ld2 {v12.s, v13.s}[1], [x12], #8 |
| 1523 |
ld2 {v14.s, v15.s}[0], [x11], #8 |
| 1524 |
ld2 {v14.s, v15.s}[1], [x12], #8 |
| 1525 |
ld2 {v16.s, v17.s}[0], [x11], #8 |
| 1526 |
ld2 {v16.s, v17.s}[1], [x12], #8 |
| 1527 |
ld2 {v18.s, v19.s}[0], [x11], #8 |
| 1528 |
ld2 {v18.s, v19.s}[1], [x12], #8 |
| 1529 |
|
| 1530 |
add x11, sp, #552 |
| 1531 |
add x12, sp, #472 |
| 1532 |
ld2 {v20.s, v21.s}[0], [x11], #8 |
| 1533 |
ld2 {v20.s, v21.s}[1], [x12], #8 |
| 1534 |
ld2 {v22.s, v23.s}[0], [x11], #8 |
| 1535 |
ld2 {v22.s, v23.s}[1], [x12], #8 |
| 1536 |
ld2 {v24.s, v25.s}[0], [x11], #8 |
| 1537 |
ld2 {v24.s, v25.s}[1], [x12], #8 |
| 1538 |
ld2 {v26.s, v27.s}[0], [x11], #8 |
| 1539 |
ld2 {v26.s, v27.s}[1], [x12], #8 |
| 1540 |
ld2 {v28.s, v29.s}[0], [x11], #8 |
| 1541 |
ld2 {v28.s, v29.s}[1], [x12], #8 |
| 1542 |
|
| 1543 |
// <232,272> ← Mul(<512,432>,<552,472>) |
| 1544 |
mov x28, #0x1fffffff |
| 1545 |
dup v29.2d, x28 |
| 1546 |
dup v30.2s, w29 |
| 1547 |
|
| 1548 |
umull v5.2d, v15.2s, v25.2s |
| 1549 |
umull v7.2d, v15.2s, v27.2s |
| 1550 |
umull v8.2d, v15.2s, v28.2s |
| 1551 |
umull v0.2d, v15.2s, v20.2s |
| 1552 |
umull v2.2d, v15.2s, v22.2s |
| 1553 |
umull v4.2d, v15.2s, v24.2s |
| 1554 |
umull v6.2d, v15.2s, v26.2s |
| 1555 |
umull v1.2d, v15.2s, v21.2s |
| 1556 |
umull v3.2d, v15.2s, v23.2s |
| 1557 |
|
| 1558 |
umlal v7.2d, v17.2s, v25.2s |
| 1559 |
umlal v8.2d, v17.2s, v27.2s |
| 1560 |
umlal v0.2d, v17.2s, v28.2s |
| 1561 |
umlal v2.2d, v17.2s, v20.2s |
| 1562 |
umlal v4.2d, v17.2s, v22.2s |
| 1563 |
umlal v6.2d, v17.2s, v24.2s |
| 1564 |
umlal v1.2d, v17.2s, v26.2s |
| 1565 |
umlal v3.2d, v17.2s, v21.2s |
| 1566 |
umull v9.2d, v17.2s, v23.2s |
| 1567 |
|
| 1568 |
umlal v8.2d, v18.2s, v25.2s |
| 1569 |
umlal v0.2d, v18.2s, v27.2s |
| 1570 |
umlal v2.2d, v18.2s, v28.2s |
| 1571 |
umlal v4.2d, v18.2s, v20.2s |
| 1572 |
umlal v6.2d, v18.2s, v22.2s |
| 1573 |
umlal v1.2d, v18.2s, v24.2s |
| 1574 |
umlal v3.2d, v18.2s, v26.2s |
| 1575 |
umlal v9.2d, v18.2s, v21.2s |
| 1576 |
umull v15.2d, v18.2s, v23.2s |
| 1577 |
|
| 1578 |
umlal v0.2d, v10.2s, v25.2s |
| 1579 |
umlal v2.2d, v10.2s, v27.2s |
| 1580 |
umlal v4.2d, v10.2s, v28.2s |
| 1581 |
umlal v6.2d, v10.2s, v20.2s |
| 1582 |
umlal v1.2d, v10.2s, v22.2s |
| 1583 |
umlal v3.2d, v10.2s, v24.2s |
| 1584 |
umlal v9.2d, v10.2s, v26.2s |
| 1585 |
umlal v15.2d, v10.2s, v21.2s |
| 1586 |
umull v17.2d, v10.2s, v23.2s |
| 1587 |
|
| 1588 |
umlal v2.2d, v12.2s, v25.2s |
| 1589 |
umlal v4.2d, v12.2s, v27.2s |
| 1590 |
umlal v6.2d, v12.2s, v28.2s |
| 1591 |
umlal v1.2d, v12.2s, v20.2s |
| 1592 |
umlal v3.2d, v12.2s, v22.2s |
| 1593 |
umlal v9.2d, v12.2s, v24.2s |
| 1594 |
umlal v15.2d, v12.2s, v26.2s |
| 1595 |
umlal v17.2d, v12.2s, v21.2s |
| 1596 |
umull v18.2d, v12.2s, v23.2s |
| 1597 |
|
| 1598 |
umlal v4.2d, v14.2s, v25.2s |
| 1599 |
umlal v6.2d, v14.2s, v27.2s |
| 1600 |
umlal v1.2d, v14.2s, v28.2s |
| 1601 |
umlal v3.2d, v14.2s, v20.2s |
| 1602 |
umlal v9.2d, v14.2s, v22.2s |
| 1603 |
umlal v15.2d, v14.2s, v24.2s |
| 1604 |
umlal v17.2d, v14.2s, v26.2s |
| 1605 |
umlal v18.2d, v14.2s, v21.2s |
| 1606 |
umull v10.2d, v14.2s, v23.2s |
| 1607 |
|
| 1608 |
umlal v6.2d, v16.2s, v25.2s |
| 1609 |
umlal v1.2d, v16.2s, v27.2s |
| 1610 |
umlal v3.2d, v16.2s, v28.2s |
| 1611 |
umlal v9.2d, v16.2s, v20.2s |
| 1612 |
umlal v15.2d, v16.2s, v22.2s |
| 1613 |
umlal v17.2d, v16.2s, v24.2s |
| 1614 |
umlal v18.2d, v16.2s, v26.2s |
| 1615 |
umlal v10.2d, v16.2s, v21.2s |
| 1616 |
umull v12.2d, v16.2s, v23.2s |
| 1617 |
|
| 1618 |
umlal v1.2d, v11.2s, v25.2s |
| 1619 |
umlal v3.2d, v11.2s, v27.2s |
| 1620 |
umlal v9.2d, v11.2s, v28.2s |
| 1621 |
umlal v15.2d, v11.2s, v20.2s |
| 1622 |
umlal v17.2d, v11.2s, v22.2s |
| 1623 |
umlal v18.2d, v11.2s, v24.2s |
| 1624 |
umlal v10.2d, v11.2s, v26.2s |
| 1625 |
umlal v12.2d, v11.2s, v21.2s |
| 1626 |
umull v14.2d, v11.2s, v23.2s |
| 1627 |
|
| 1628 |
umlal v3.2d, v13.2s, v25.2s |
| 1629 |
umlal v9.2d, v13.2s, v27.2s |
| 1630 |
umlal v15.2d, v13.2s, v28.2s |
| 1631 |
umlal v17.2d, v13.2s, v20.2s |
| 1632 |
umlal v18.2d, v13.2s, v22.2s |
| 1633 |
umlal v10.2d, v13.2s, v24.2s |
| 1634 |
umlal v12.2d, v13.2s, v26.2s |
| 1635 |
umlal v14.2d, v13.2s, v21.2s |
| 1636 |
umull v16.2d, v13.2s, v23.2s |
| 1637 |
|
| 1638 |
usra v15.2d, v9.2d, #29 |
| 1639 |
and v9.16b, v9.16b, v29.16b |
| 1640 |
xtn v9.2s, v9.2d |
| 1641 |
umull v9.2d, v9.2s, v30.2s |
| 1642 |
add v5.2d, v5.2d, v9.2d |
| 1643 |
|
| 1644 |
usra v17.2d, v15.2d, #29 |
| 1645 |
and v15.16b, v15.16b, v29.16b |
| 1646 |
xtn v15.2s, v15.2d |
| 1647 |
umull v15.2d, v15.2s, v30.2s |
| 1648 |
add v7.2d, v7.2d, v15.2d |
| 1649 |
|
| 1650 |
usra v18.2d, v17.2d, #29 |
| 1651 |
and v17.16b, v17.16b, v29.16b |
| 1652 |
xtn v17.2s, v17.2d |
| 1653 |
umull v17.2d, v17.2s, v30.2s |
| 1654 |
add v8.2d, v8.2d, v17.2d |
| 1655 |
|
| 1656 |
usra v10.2d, v18.2d, #29 |
| 1657 |
and v18.16b, v18.16b, v29.16b |
| 1658 |
xtn v18.2s, v18.2d |
| 1659 |
umull v18.2d, v18.2s, v30.2s |
| 1660 |
add v0.2d, v0.2d, v18.2d |
| 1661 |
|
| 1662 |
usra v12.2d, v10.2d, #29 |
| 1663 |
and v10.16b, v10.16b, v29.16b |
| 1664 |
xtn v10.2s, v10.2d |
| 1665 |
umull v10.2d, v10.2s, v30.2s |
| 1666 |
add v2.2d, v2.2d, v10.2d |
| 1667 |
|
| 1668 |
usra v14.2d, v12.2d, #29 |
| 1669 |
and v12.16b, v12.16b, v29.16b |
| 1670 |
xtn v12.2s, v12.2d |
| 1671 |
umull v12.2d, v12.2s, v30.2s |
| 1672 |
add v4.2d, v4.2d, v12.2d |
| 1673 |
|
| 1674 |
usra v16.2d, v14.2d, #29 |
| 1675 |
and v14.16b, v14.16b, v29.16b |
| 1676 |
xtn v14.2s, v14.2d |
| 1677 |
umull v14.2d, v14.2s, v30.2s |
| 1678 |
add v6.2d, v6.2d, v14.2d |
| 1679 |
|
| 1680 |
ushr v9.2d, v16.2d, #29 |
| 1681 |
and v16.16b, v16.16b, v29.16b |
| 1682 |
xtn v16.2s, v16.2d |
| 1683 |
umull v16.2d, v16.2s, v30.2s |
| 1684 |
add v1.2d, v1.2d, v16.2d |
| 1685 |
|
| 1686 |
xtn v9.2s, v9.2d |
| 1687 |
umull v9.2d, v9.2s, v30.2s |
| 1688 |
add v3.2d, v3.2d, v9.2d |
| 1689 |
|
| 1690 |
lsr x19, x28, #6 |
| 1691 |
dup v30.2d, x19 |
| 1692 |
|
| 1693 |
usra v4.2d, v2.2d, #29 |
| 1694 |
and v2.16b, v2.16b, v29.16b |
| 1695 |
|
| 1696 |
usra v7.2d, v5.2d, #29 |
| 1697 |
and v5.16b, v5.16b, v29.16b |
| 1698 |
|
| 1699 |
usra v6.2d, v4.2d, #29 |
| 1700 |
and v4.16b, v4.16b, v29.16b |
| 1701 |
|
| 1702 |
usra v8.2d, v7.2d, #29 |
| 1703 |
and v7.16b, v7.16b, v29.16b |
| 1704 |
|
| 1705 |
usra v1.2d, v6.2d, #29 |
| 1706 |
and v6.16b, v6.16b, v29.16b |
| 1707 |
|
| 1708 |
usra v0.2d, v8.2d, #29 |
| 1709 |
and v8.16b, v8.16b, v29.16b |
| 1710 |
|
| 1711 |
usra v3.2d, v1.2d, #29 |
| 1712 |
and v1.16b, v1.16b, v29.16b |
| 1713 |
|
| 1714 |
usra v2.2d, v0.2d, #29 |
| 1715 |
and v0.16b, v0.16b, v29.16b |
| 1716 |
|
| 1717 |
bic v15.16b, v3.16b, v30.16b |
| 1718 |
usra v5.2d, v15.2d, #23 |
| 1719 |
usra v5.2d, v15.2d, #22 |
| 1720 |
usra v5.2d, v15.2d, #19 |
| 1721 |
and v3.16b, v3.16b, v30.16b |
| 1722 |
|
| 1723 |
usra v4.2d, v2.2d, #29 |
| 1724 |
and v2.16b, v2.16b, v29.16b |
| 1725 |
|
| 1726 |
usra v7.2d, v5.2d, #29 |
| 1727 |
and v5.16b, v5.16b, v29.16b |
| 1728 |
|
| 1729 |
add x11, sp, #232 |
| 1730 |
add x12, sp, #272 |
| 1731 |
st2 {v0.s, v1.s}[0], [x11], #8 |
| 1732 |
st2 {v0.s, v1.s}[2], [x12], #8 |
| 1733 |
st2 {v2.s, v3.s}[0], [x11], #8 |
| 1734 |
st2 {v2.s, v3.s}[2], [x12], #8 |
| 1735 |
st2 {v4.s, v5.s}[0], [x11], #8 |
| 1736 |
st2 {v4.s, v5.s}[2], [x12], #8 |
| 1737 |
st2 {v6.s, v7.s}[0], [x11], #8 |
| 1738 |
st2 {v6.s, v7.s}[2], [x12], #8 |
| 1739 |
st1 {v8.2s}, [x11], #8 |
| 1740 |
mov x19, v8.d[1] |
| 1741 |
str x19, [x12], #8 |
| 1742 |
|
| 1743 |
add w30, w30, #1 |
| 1744 |
cmp w30, #63 |
| 1745 |
ble .L |
| 1746 |
|
| 1747 |
ldr x0, [sp, #96] |
| 1748 |
|
| 1749 |
// x |
| 1750 |
ldp x3, x4, [sp, #152] |
| 1751 |
ldp x5, x6, [sp, #168] |
| 1752 |
ldr x2, [sp, #184] |
| 1753 |
|
| 1754 |
stp x3, x4, [x0, #0] |
| 1755 |
stp x5, x6, [x0, #16] |
| 1756 |
str x2, [x0, #32] |
| 1757 |
|
| 1758 |
// y |
| 1759 |
ldp x3, x4, [sp, #192] |
| 1760 |
ldp x5, x6, [sp, #208] |
| 1761 |
ldr x2, [sp, #224] |
| 1762 |
|
| 1763 |
// z |
| 1764 |
ldp x13, x14, [sp, #232] |
| 1765 |
ldp x15, x16, [sp, #248] |
| 1766 |
ldr x12, [sp, #264] |
| 1767 |
|
| 1768 |
// z+y |
| 1769 |
add x10, x13, x3 |
| 1770 |
add x11, x14, x4 |
| 1771 |
add x17, x15, x5 |
| 1772 |
add x18, x16, x6 |
| 1773 |
add x19, x12, x2 |
| 1774 |
|
| 1775 |
// z-y |
| 1776 |
ldp x1, x7, [sp, #120] |
| 1777 |
ldp x8, x9, [sp, #136] |
| 1778 |
|
| 1779 |
add x23, x13, x1 |
| 1780 |
add x24, x14, x7 |
| 1781 |
add x25, x15, x8 |
| 1782 |
add x26, x16, x1 |
| 1783 |
add x22, x12, x9 |
| 1784 |
|
| 1785 |
sub x23, x23, x3 |
| 1786 |
sub x24, x24, x4 |
| 1787 |
sub x25, x25, x5 |
| 1788 |
sub x26, x26, x6 |
| 1789 |
sub x22, x22, x2 |
| 1790 |
|
| 1791 |
ldr w30, [sp, #592] |
| 1792 |
cmp w30, #1 |
| 1793 |
|
| 1794 |
// cselect(y,z+y,wantmont) |
| 1795 |
csel x3, x10, x3, eq |
| 1796 |
csel x4, x11, x4, eq |
| 1797 |
csel x5, x17, x5, eq |
| 1798 |
csel x6, x18, x6, eq |
| 1799 |
csel x2, x19, x2, eq |
| 1800 |
|
| 1801 |
stp x3, x4, [x0, #40] |
| 1802 |
stp x5, x6, [x0, #56] |
| 1803 |
str x2, [x0, #72] |
| 1804 |
|
| 1805 |
// cselect(z,z-y,wantmont) |
| 1806 |
csel x13, x23, x13, eq |
| 1807 |
csel x14, x24, x14, eq |
| 1808 |
csel x15, x25, x15, eq |
| 1809 |
csel x16, x26, x16, eq |
| 1810 |
csel x12, x22, x12, eq |
| 1811 |
|
| 1812 |
stp x13, x14, [x0, #80] |
| 1813 |
stp x15, x16, [x0, #96] |
| 1814 |
str x12, [x0, #112] |
| 1815 |
|
| 1816 |
ldp x29, x30, [sp, #80] |
| 1817 |
ldp x27, x28, [sp, #64] |
| 1818 |
ldp x25, x26, [sp, #48] |
| 1819 |
ldp x23, x24, [sp, #32] |
| 1820 |
ldp x21, x22, [sp, #16] |
| 1821 |
ldp x19, x20, [sp, #0] |
| 1822 |
add sp, sp, #608 |
| 1823 |
|
| 1824 |
ret |
| 1825 |
.section .note.GNU-stack,"",@progbits |