| // Copyright (c) 2020 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| //go:build arm64 && gc && !purego |
| // +build arm64,gc,!purego |
| // carryPropagate works exactly like carryPropagateGeneric and uses the |
| // same AND, ADD, and LSR+MADD instructions emitted by the compiler, but |
| // avoids loading R0-R4 twice and uses LDP and STP. |
| // See https://golang.org/issues/43145 for the main compiler issue. |
| // func carryPropagate(v *Element) |
| TEXT ·carryPropagate(SB),NOFRAME|NOSPLIT,$0-8 |
| AND $0x7ffffffffffff, R0, R10 |
| AND $0x7ffffffffffff, R1, R11 |
| AND $0x7ffffffffffff, R2, R12 |
| AND $0x7ffffffffffff, R3, R13 |
| AND $0x7ffffffffffff, R4, R14 |
| // R4>>51 * 19 + R10 -> R10 |