From b7e74678657680a0eb31679623f90b539666c5f4 Mon Sep 17 00:00:00 2001 From: Meng Zhuo Date: Wed, 14 Jun 2023 20:31:08 +0800 Subject: [PATCH] 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 Auto-Submit: Keith Randall Run-TryBot: M Zhuo Reviewed-by: David Chase Reviewed-by: Keith Randall TryBot-Result: Gopher Robot --- test/codegen/math.go | 2 ++ 1 file changed, 2 insertions(+) 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))) } -- 2.44.0