]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.typeparams] reflect: support big endian architectures in callMethod
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 16 Jun 2021 19:08:52 +0000 (19:08 +0000)
committerMichael Knyszek <mknyszek@google.com>
Thu, 17 Jun 2021 21:30:24 +0000 (21:30 +0000)
commitfb84d213a8551526913647b7dea6103233f550db
tree08a547d4f9b3d46afad24e53a931a0da3ba5e654
parent9f50d9a0b41bc0618272535f84c3e518e74f2fea
[dev.typeparams] reflect: support big endian architectures in callMethod

Currently, callMethod has some ABI translation code that is not agnostic
of endianness. This change rectifies that by adding a method to
internal/abi.RegArgs for safely returning an offset into a register slot
that's endianness-dependent.

No tests for this because it's just best-effort. There's no actual way
to test this because we don't support a register ABI on any big endian
architectures yet.

Change-Id: Ic68d9ee1bfdea0fc2992d467d749e2b083e92de3
Reviewed-on: https://go-review.googlesource.com/c/go/+/328348
Trust: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/go/build/deps_test.go
src/internal/abi/abi.go
src/reflect/value.go