diff options
Diffstat (limited to 'test/codegen')
| -rw-r--r-- | test/codegen/math.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/codegen/math.go b/test/codegen/math.go index 04cb4e577d..cd573db7b3 100644 --- a/test/codegen/math.go +++ b/test/codegen/math.go @@ -125,9 +125,25 @@ func fma(x, y, z float64) float64 { // s390x:"FMADD" // ppc64:"FMADD" // ppc64le:"FMADD" + // riscv64:"FMADDD" return math.FMA(x, y, z) } +func fms(x, y, z float64) float64 { + // riscv64:"FMSUBD" + return math.FMA(x, y, -z) +} + +func fnma(x, y, z float64) float64 { + // riscv64:"FNMADDD" + return math.FMA(-x, y, z) +} + +func fnms(x, y, z float64) float64 { + // riscv64:"FNMSUBD" + return math.FMA(x, -y, -z) +} + func fromFloat64(f64 float64) uint64 { // amd64:"MOVQ\tX.*, [^X].*" // arm64:"FMOVD\tF.*, R.*" |
