]> Cypherpunks repositories - gostls13.git/commit
runtime: unify C->Go ABI transitions on arm64
authoreric fang <eric.fang@arm.com>
Thu, 23 Dec 2021 06:53:50 +0000 (06:53 +0000)
committerEric Fang <eric.fang@arm.com>
Wed, 30 Mar 2022 01:28:43 +0000 (01:28 +0000)
commiteee6f9f825596a769ff163e098d2656cbed09d4f
treec29366047ae3a2e380580ae2513042cf1eac7e08
parent63169c8bdf3e7ac5006c8976b0631b281eb49394
runtime: unify C->Go ABI transitions on arm64

There are several of places that save and restore the C callee-saved registers,
the operation is the same everywhere, so this CL defines several macros
to do this, which will help reduce code redundancy and unify the operation.

This CL also replaced consecutive MOVD instructions with STP and LDP instructions
in several places where these macros do not apply.

Change-Id: I815f39fe484a9ab9b6bd157dfcbc8ad99c1420fe
Reviewed-on: https://go-review.googlesource.com/c/go/+/374397
Trust: Eric Fang <eric.fang@arm.com>
Run-TryBot: Eric Fang <eric.fang@arm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
15 files changed:
src/runtime/asm_arm64.s
src/runtime/cgo/abi_arm64.h [new file with mode: 0644]
src/runtime/cgo/asm_arm64.s
src/runtime/race_arm64.s
src/runtime/rt0_darwin_arm64.s
src/runtime/rt0_freebsd_arm64.s
src/runtime/rt0_linux_arm64.s
src/runtime/rt0_netbsd_arm64.s
src/runtime/rt0_openbsd_arm64.s
src/runtime/sys_darwin_arm64.s
src/runtime/sys_freebsd_arm64.s
src/runtime/sys_linux_arm64.s
src/runtime/sys_netbsd_arm64.s
src/runtime/sys_openbsd_arm64.s
src/runtime/sys_windows_arm64.s