Skip to content

Commit

Permalink
test/codegen: add fsqrt test for riscv64
Browse files Browse the repository at this point in the history
Add FSQRTD FSQRTS codegen tests for riscv64

Change-Id: I16ca3753ad1ba37afbd9d0f887b078e33f98fda0
Reviewed-on: https://go-review.googlesource.com/c/go/+/503275
Reviewed-by: Keith Randall <[email protected]>
Auto-Submit: Keith Randall <[email protected]>
Run-TryBot: M Zhuo <[email protected]>
Reviewed-by: David Chase <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
  • Loading branch information
mengzhuo authored and gopherbot committed Jun 15, 2023
1 parent befec5d commit b7e7467
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/codegen/math.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -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)))
}

Expand Down

0 comments on commit b7e7467

Please sign in to comment.