aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'test/codegen')
-rw-r--r--test/codegen/mathbits.go5
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)
}