aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeng Zhuo <mzh@golangcn.org>2023-06-14 20:31:08 +0800
committerGopher Robot <gobot@golang.org>2023-06-15 15:16:20 +0000
commitb7e74678657680a0eb31679623f90b539666c5f4 (patch)
treefb1ce828a587174a81b585858d1eb837856e8d0d
parentbefec5ddbbfbd81ec84e74e15a38044d67f8785b (diff)
downloadgo-b7e74678657680a0eb31679623f90b539666c5f4.tar.gz
go-b7e74678657680a0eb31679623f90b539666c5f4.zip
test/codegen: add fsqrt test for riscv64
Add FSQRTD FSQRTS codegen tests for riscv64 Change-Id: I16ca3753ad1ba37afbd9d0f887b078e33f98fda0 Reviewed-on: https://go-review.googlesource.com/c/go/+/503275 Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> Run-TryBot: M Zhuo <mzh@golangcn.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Keith Randall <khr@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
-rw-r--r--test/codegen/math.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/codegen/math.go b/test/codegen/math.go
index e630530965..6a7d304afd 100644
--- a/test/codegen/math.go
+++ b/test/codegen/math.go
@@ -57,6 +57,7 @@ func sqrt(x float64) float64 {
// mips64/hardfloat:"SQRTD" mips64/softfloat:-"SQRTD"
// wasm:"F64Sqrt"
// ppc64x:"FSQRT"
+ // riscv64: "FSQRTD"
return math.Sqrt(x)
}
@@ -69,6 +70,7 @@ func sqrt32(x float32) float32 {
// mips64/hardfloat:"SQRTF" mips64/softfloat:-"SQRTF"
// wasm:"F32Sqrt"
// ppc64x:"FSQRTS"
+ // riscv64: "FSQRTS"
return float32(math.Sqrt(float64(x)))
}