mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: clean up windows a bit
Document the various hard-coded architecture checks or remove them in favor of more general checks. This should be a no-op now but will make the arm64 port have fewer diffs. This CL is part of a stack adding windows/arm64 support (#36439), intended to land in the Go 1.17 cycle. This CL is, however, not windows/arm64-specific. It is cleanup meant to make the port (and future ports) easier. Change-Id: Ifd6b19e44e8c9ca4a0d2590f314928ce235821b3 Reviewed-on: https://go-review.googlesource.com/c/go/+/288813 Trust: Russ Cox <rsc@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
This commit is contained in:
parent
5421c37a1d
commit
b19e7b518e
3 changed files with 16 additions and 12 deletions
|
|
@ -116,13 +116,14 @@ func compileCallback(fn eface, cdecl bool) (code uintptr) {
|
|||
// registers and the stack.
|
||||
panic("compileCallback: argument size is larger than uintptr")
|
||||
}
|
||||
if k := t.kind & kindMask; (GOARCH == "amd64" || GOARCH == "arm") && (k == kindFloat32 || k == kindFloat64) {
|
||||
if k := t.kind & kindMask; GOARCH != "386" && (k == kindFloat32 || k == kindFloat64) {
|
||||
// In fastcall, floating-point arguments in
|
||||
// the first four positions are passed in
|
||||
// floating-point registers, which we don't
|
||||
// currently spill. arm passes floating-point
|
||||
// arguments in VFP registers, which we also
|
||||
// don't support.
|
||||
// So basically we only support 386.
|
||||
panic("compileCallback: float arguments not supported")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue