]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: unify C->Go ABI transitions
authorAustin Clements <austin@google.com>
Wed, 14 Apr 2021 03:30:19 +0000 (23:30 -0400)
committerAustin Clements <austin@google.com>
Thu, 15 Apr 2021 12:38:13 +0000 (12:38 +0000)
commit7ad496b6f5300131d6f1fbafe44ac882897889e4
tree99f5c84ae8cebe176f35097effee24bc5e93e4bb
parentdba2eab8267599f5f59f1f586b47f31b6552938c
runtime: unify C->Go ABI transitions

The previous CL introduced macros for transitions from the Windows ABI
to the Go ABI. This CL does the same for SysV and uses them in almost
all places where we transition from the C ABI to the Go ABI.

Compared to Windows, this transition is much simpler and I didn't find
any places that were getting it wrong. But this does let us unify a
lot of code nicely and introduces some degree of abstraction around
these ABI transitions.

Change-Id: Ib6bdecafce587ce18fca4c8300fcf401284a2bcd
Reviewed-on: https://go-review.googlesource.com/c/go/+/309930
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
12 files changed:
src/runtime/asm_amd64.s
src/runtime/cgo/abi_amd64.h
src/runtime/cgo/asm_amd64.s
src/runtime/os_linux.go
src/runtime/race_amd64.s
src/runtime/sys_darwin_amd64.s
src/runtime/sys_dragonfly_amd64.s
src/runtime/sys_freebsd_amd64.s
src/runtime/sys_linux_386.s
src/runtime/sys_linux_amd64.s
src/runtime/sys_netbsd_amd64.s
src/runtime/sys_openbsd_amd64.s