diff options
| author | Xiaolin Zhao <zhaoxiaolin@loongson.cn> | 2025-08-21 10:36:34 +0800 |
|---|---|---|
| committer | abner chenc <chenguoqi@loongson.cn> | 2025-08-24 18:14:22 -0700 |
| commit | 0aa8019e943ce49afc2b655ea8d5f55cbaa72cef (patch) | |
| tree | 8c5c5bcaf2ca89f0a61e9d9e62e036541a776b07 /test/codegen/mathbits.go | |
| parent | 83420974b7b70fdd39b2b95fde37278af26513b7 (diff) | |
| download | go-0aa8019e943ce49afc2b655ea8d5f55cbaa72cef.tar.xz | |
test/codegen: add Mul* test for loong64
Change-Id: Ica285212e4884a96fe9738b53cdc789b223bf2e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/697895
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
Diffstat (limited to 'test/codegen/mathbits.go')
| -rw-r--r-- | test/codegen/mathbits.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/codegen/mathbits.go b/test/codegen/mathbits.go index c7ba357d09..ba5387d2c3 100644 --- a/test/codegen/mathbits.go +++ b/test/codegen/mathbits.go @@ -938,6 +938,7 @@ func Sub64MPanicOnOverflowGT(a, b [2]uint64) [2]uint64 { func Mul(x, y uint) (hi, lo uint) { // amd64:"MULQ" // arm64:"UMULH","MUL" + // loong64:"MULV","MULHVU" // ppc64x:"MULHDU","MULLD" // s390x:"MLGR" // mips64: "MULVU" @@ -948,6 +949,7 @@ func Mul(x, y uint) (hi, lo uint) { func Mul64(x, y uint64) (hi, lo uint64) { // amd64:"MULQ" // arm64:"UMULH","MUL" + // loong64:"MULV","MULHVU" // ppc64x:"MULHDU","MULLD" // s390x:"MLGR" // mips64: "MULVU" @@ -957,6 +959,7 @@ func Mul64(x, y uint64) (hi, lo uint64) { func Mul64HiOnly(x, y uint64) uint64 { // arm64:"UMULH",-"MUL" + // loong64:"MULHVU",-"MULV" // riscv64:"MULHU",-"MUL\t" hi, _ := bits.Mul64(x, y) return hi @@ -964,6 +967,7 @@ func Mul64HiOnly(x, y uint64) uint64 { func Mul64LoOnly(x, y uint64) uint64 { // arm64:"MUL",-"UMULH" + // loong64:"MULV",-"MULHVU" // riscv64:"MUL\t",-"MULHU" _, lo := bits.Mul64(x, y) return lo @@ -972,6 +976,7 @@ func Mul64LoOnly(x, y uint64) uint64 { func Mul64Const() (uint64, uint64) { // 7133701809754865664 == 99<<56 // arm64:"MOVD\t[$]7133701809754865664, R1", "MOVD\t[$]88, R0" + // loong64:"MOVV\t[$]88, R4","MOVV\t[$]7133701809754865664, R5",-"MUL" return bits.Mul64(99+88<<8, 1<<56) } |
