aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul E. Murphy <murp@ibm.com>2024-03-22 11:41:58 -0500
committerPaul Murphy <murp@ibm.com>2024-04-01 18:50:29 +0000
commitdfb17c126cdfddc57ba929e50354b6b025779117 (patch)
treed31688840423f4c539d78dc251de8f872b4df395 /test
parenta49952445f81cc9a6bd5158f00768fc1846460f4 (diff)
downloadgo-dfb17c126cdfddc57ba929e50354b6b025779117.tar.gz
go-dfb17c126cdfddc57ba929e50354b6b025779117.zip
cmd/compile: support float min/max instructions on PPC64
This enables efficient use of the builtin min/max function for float64 and float32 types on GOPPC64 >= power9. Extend the assembler to support xsminjdp/xsmaxjdp and use them to implement float min/max. Simplify the VSX xx3 opcode rules to allow FPR arguments, if all arguments are an FPR. Change-Id: I15882a4ce5dc46eba71d683cf1d184dc4236a328 Reviewed-on: https://go-review.googlesource.com/c/go/+/574535 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Paul Murphy <murp@ibm.com> Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'test')
-rw-r--r--test/codegen/floats.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/codegen/floats.go b/test/codegen/floats.go
index 54dc87ecfd..d5c5475567 100644
--- a/test/codegen/floats.go
+++ b/test/codegen/floats.go
@@ -165,6 +165,8 @@ func Float64Min(a, b float64) float64 {
// amd64:"MINSD"
// arm64:"FMIND"
// riscv64:"FMIN"
+ // ppc64/power9:"XSMINJDP"
+ // ppc64/power10:"XSMINJDP"
return min(a, b)
}
@@ -172,6 +174,8 @@ func Float64Max(a, b float64) float64 {
// amd64:"MINSD"
// arm64:"FMAXD"
// riscv64:"FMAX"
+ // ppc64/power9:"XSMAXJDP"
+ // ppc64/power10:"XSMAXJDP"
return max(a, b)
}
@@ -179,6 +183,8 @@ func Float32Min(a, b float32) float32 {
// amd64:"MINSS"
// arm64:"FMINS"
// riscv64:"FMINS"
+ // ppc64/power9:"XSMINJDP"
+ // ppc64/power10:"XSMINJDP"
return min(a, b)
}
@@ -186,5 +192,7 @@ func Float32Max(a, b float32) float32 {
// amd64:"MINSS"
// arm64:"FMAXS"
// riscv64:"FMAXS"
+ // ppc64/power9:"XSMAXJDP"
+ // ppc64/power10:"XSMAXJDP"
return max(a, b)
}