]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/abi-internal: declare X15 scratch in function bodies
authorAustin Clements <austin@google.com>
Thu, 8 Apr 2021 21:38:25 +0000 (17:38 -0400)
committerAustin Clements <austin@google.com>
Fri, 9 Apr 2021 17:56:50 +0000 (17:56 +0000)
commit0ad46889a140c3b2e72b8aa4a47ac242571c521f
treebf88bdf3f1d2d7db0738a0f40ae39022917f0cbd
parent2698be4905c9d54a0d6a7d7d6e90284a9d76b82a
cmd/compile/abi-internal: declare X15 scratch in function bodies

X15 must be zero at function calls and returns, but can be used as
scratch in the middle of a function. This allows things like memmove
and the hashing functions to use X15 temporarily, as long as they set
it back to 0 before returning.

This CL also clarifies the distinction between register meanings on
function call versus function return, since some of them have fixed
meanings at both call and return, while others only have a fixed
meaning at calls.

Updates #40724.

Change-Id: I9dad3abde42cd4d2788e8435cde6d55073dd75a3
Reviewed-on: https://go-review.googlesource.com/c/go/+/308929
Trust: Austin Clements <austin@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/abi-internal.md