mirror of https://github.com/golang/go.git
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>
This commit is contained in:
parent
befec5ddbb
commit
b7e7467865
|
|
@ -57,6 +57,7 @@ func sqrt(x float64) float64 {
|
||||||
// mips64/hardfloat:"SQRTD" mips64/softfloat:-"SQRTD"
|
// mips64/hardfloat:"SQRTD" mips64/softfloat:-"SQRTD"
|
||||||
// wasm:"F64Sqrt"
|
// wasm:"F64Sqrt"
|
||||||
// ppc64x:"FSQRT"
|
// ppc64x:"FSQRT"
|
||||||
|
// riscv64: "FSQRTD"
|
||||||
return math.Sqrt(x)
|
return math.Sqrt(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -69,6 +70,7 @@ func sqrt32(x float32) float32 {
|
||||||
// mips64/hardfloat:"SQRTF" mips64/softfloat:-"SQRTF"
|
// mips64/hardfloat:"SQRTF" mips64/softfloat:-"SQRTF"
|
||||||
// wasm:"F32Sqrt"
|
// wasm:"F32Sqrt"
|
||||||
// ppc64x:"FSQRTS"
|
// ppc64x:"FSQRTS"
|
||||||
|
// riscv64: "FSQRTS"
|
||||||
return float32(math.Sqrt(float64(x)))
|
return float32(math.Sqrt(float64(x)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue