]> Cypherpunks repositories - gostls13.git/commit
runtime/internal/syscall: new package for linux
authorMichael Pratt <mpratt@google.com>
Tue, 8 Feb 2022 21:45:14 +0000 (16:45 -0500)
committerMichael Pratt <mpratt@google.com>
Tue, 15 Feb 2022 15:40:29 +0000 (15:40 +0000)
commit0b321c9a7c0055dfd3f875dea930a28690659211
treef4504789261c7f1ee34ea3e5cd47c3f3ecdc0582
parent7a132d6f4e319b307f185c73a8492bfa706fe678
runtime/internal/syscall: new package for linux

Add a generic syscall package for use by the runtime. Eventually we'd
like to clean up system calls in the runtime to use more code generation
and be moved out of the main runtime package.

The implementations of the assembly functions are based on copies of
syscall.RawSyscall6, modified slightly for more consistency between
arches. e.g., renamed trap to num, always set syscall num register
first.

For now, this package is just the bare minimum needed for
doAllThreadsSyscall to make an arbitrary syscall.

For #51087.
For #50113.

Change-Id: Ibecb5e6303279ce15286759e1cd6a2ddc52f7c72
Reviewed-on: https://go-review.googlesource.com/c/go/+/383999
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
12 files changed:
src/cmd/compile/internal/base/base.go
src/go/build/deps_test.go
src/runtime/internal/syscall/asm_linux_386.s [new file with mode: 0644]
src/runtime/internal/syscall/asm_linux_amd64.s [new file with mode: 0644]
src/runtime/internal/syscall/asm_linux_arm.s [new file with mode: 0644]
src/runtime/internal/syscall/asm_linux_arm64.s [new file with mode: 0644]
src/runtime/internal/syscall/asm_linux_mips64x.s [new file with mode: 0644]
src/runtime/internal/syscall/asm_linux_mipsx.s [new file with mode: 0644]
src/runtime/internal/syscall/asm_linux_ppc64x.s [new file with mode: 0644]
src/runtime/internal/syscall/asm_linux_riscv64.s [new file with mode: 0644]
src/runtime/internal/syscall/asm_linux_s390x.s [new file with mode: 0644]
src/runtime/internal/syscall/syscall_linux.go [new file with mode: 0644]