diff options
| author | Michael Munday <mndygolang+git@gmail.com> | 2025-06-27 21:05:38 +0100 |
|---|---|---|
| committer | Michael Munday <mndygolang+git@gmail.com> | 2025-07-30 12:29:15 -0700 |
| commit | cedf63616a00c8a6a69f6bbe4bc93b6865cec842 (patch) | |
| tree | e94c1a8afe63304f07725460363f7957325566b3 /src/cmd/asm/internal | |
| parent | 82a1921c3b6b493c4ff358f063c2ffffabba9fd5 (diff) | |
| download | go-cedf63616a00c8a6a69f6bbe4bc93b6865cec842.tar.xz | |
cmd/compile: add floating point min/max intrinsics on s390x
Add the VECTOR FP (MINIMUM|MAXIMUM) instructions to the assembler and
use them in the compiler to implement min and max.
Note: I've allowed floating point registers to be used with the single
element instructions (those with the W instead of V prefix) to allow
easier integration into the compiler.
Change-Id: I5f80a510bd248cf483cce95f1979bf63fbae7de6
Reviewed-on: https://go-review.googlesource.com/c/go/+/684715
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Freeman <mark@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Diffstat (limited to 'src/cmd/asm/internal')
| -rw-r--r-- | src/cmd/asm/internal/asm/testdata/s390x.s | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cmd/asm/internal/asm/testdata/s390x.s b/src/cmd/asm/internal/asm/testdata/s390x.s index a19292b263..93c3ec9ea7 100644 --- a/src/cmd/asm/internal/asm/testdata/s390x.s +++ b/src/cmd/asm/internal/asm/testdata/s390x.s @@ -540,6 +540,18 @@ TEXT main·foo(SB),DUPOK|NOSPLIT,$16-0 // TEXT main.foo(SB), DUPOK|NOSPLIT, $16- VSTRCZBS V18, V20, V22, V24 // e78240306f8a VSTRCZHS V18, V20, V22, V24 // e78241306f8a VSTRCZFS V18, V20, V22, V24 // e78242306f8a + VFMAXSB $1, V2, V3, V4 // e742301020ef + WFMAXSB $2, V5, V6, V7 // e775602820ef + WFMAXSB $2, F5, F6, F7 // e775602820ef + VFMAXDB $3, V8, V9, V10 // e7a8903030ef + WFMAXDB $4, V11, V12, V13 // e7dbc04830ef + WFMAXDB $4, F11, F12, F13 // e7dbc04830ef + VFMINSB $7, V14, V15, V16 // e70ef07028ee + WFMINSB $8, V17, V18, V19 // e73120882eee + WFMINSB $8, F1, F2, F3 // e731208820ee + VFMINDB $9, V20, V21, V22 // e76450903eee + WFMINDB $10, V23, V24, V25 // e79780a83eee + WFMINDB $10, F7, F8, F9 // e79780a830ee RET RET foo(SB) |
