Skip to content

Commit 44c5956

Browse files
sophie-zhaoabner-chenc
authored andcommitted
test/codegen: add Mul2 and DivPow2 test for loong64
Change-Id: I29ccd105c5418955146a3f4873162963da489a70 Reviewed-on: https://go-review.googlesource.com/c/go/+/697935 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
1 parent 0aa8019 commit 44c5956

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/codegen/floats.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ func Mul2(f float64) float64 {
1919
// amd64:"ADDSD",-"MULSD"
2020
// arm/7:"ADDD",-"MULD"
2121
// arm64:"FADDD",-"FMULD"
22+
// loong64:"ADDD",-"MULD"
2223
// ppc64x:"FADD",-"FMUL"
2324
// riscv64:"FADDD",-"FMULD"
2425
return f * 2.0
@@ -29,6 +30,7 @@ func DivPow2(f1, f2, f3 float64) (float64, float64, float64) {
2930
// amd64:"MULSD",-"DIVSD"
3031
// arm/7:"MULD",-"DIVD"
3132
// arm64:"FMULD",-"FDIVD"
33+
// loong64:"MULD",-"DIVD"
3234
// ppc64x:"FMUL",-"FDIV"
3335
// riscv64:"FMULD",-"FDIVD"
3436
x := f1 / 16.0
@@ -37,6 +39,7 @@ func DivPow2(f1, f2, f3 float64) (float64, float64, float64) {
3739
// amd64:"MULSD",-"DIVSD"
3840
// arm/7:"MULD",-"DIVD"
3941
// arm64:"FMULD",-"FDIVD"
42+
// loong64:"MULD",-"DIVD"
4043
// ppc64x:"FMUL",-"FDIVD"
4144
// riscv64:"FMULD",-"FDIVD"
4245
y := f2 / 0.125
@@ -45,6 +48,7 @@ func DivPow2(f1, f2, f3 float64) (float64, float64, float64) {
4548
// amd64:"ADDSD",-"DIVSD",-"MULSD"
4649
// arm/7:"ADDD",-"MULD",-"DIVD"
4750
// arm64:"FADDD",-"FMULD",-"FDIVD"
51+
// loong64:"ADDD",-"MULD",-"DIVD"
4852
// ppc64x:"FADD",-"FMUL",-"FDIV"
4953
// riscv64:"FADDD",-"FMULD",-"FDIVD"
5054
z := f3 / 0.5

0 commit comments

Comments
 (0)