Skip to content

Commit 4d35071

Browse files
wdvxdr1123randall77
authored andcommitted
cmd/compile: intrinsify math/big.mulWW on MIPS64(LE),RISCV64
Change-Id: Ib8b18a892b0b1a59229ebc97a38200b53e701a77 Reviewed-on: https://go-review.googlesource.com/c/go/+/402574 Reviewed-by: Keith Randall <[email protected]> Run-TryBot: Wayne Zuo <[email protected]> Reviewed-by: Cherry Mui <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 89044b6 commit 4d35071

File tree

1 file changed

+3
-7
lines changed
  • src/cmd/compile/internal/ssagen

1 file changed

+3
-7
lines changed

src/cmd/compile/internal/ssagen/ssa.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4675,8 +4675,8 @@ func InitTables() {
46754675
return s.newValue2(ssa.OpMul64uhilo, types.NewTuple(types.Types[types.TUINT64], types.Types[types.TUINT64]), args[0], args[1])
46764676
},
46774677
sys.AMD64, sys.ARM64, sys.PPC64, sys.S390X, sys.MIPS64, sys.RISCV64)
4678-
alias("math/bits", "Mul", "math/bits", "Mul64", sys.ArchAMD64, sys.ArchARM64, sys.ArchPPC64, sys.ArchPPC64LE, sys.ArchS390X, sys.ArchMIPS64, sys.ArchMIPS64LE, sys.ArchRISCV64)
4679-
alias("runtime/internal/math", "Mul64", "math/bits", "Mul64", sys.ArchAMD64, sys.ArchARM64, sys.ArchPPC64, sys.ArchPPC64LE, sys.ArchS390X, sys.ArchMIPS64, sys.ArchMIPS64LE, sys.ArchRISCV64)
4678+
alias("math/bits", "Mul", "math/bits", "Mul64", p8...)
4679+
alias("runtime/internal/math", "Mul64", "math/bits", "Mul64", p8...)
46804680
addF("math/bits", "Add64",
46814681
func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value {
46824682
return s.newValue3(ssa.OpAdd64carry, types.NewTuple(types.Types[types.TUINT64], types.Types[types.TUINT64]), args[0], args[1], args[2])
@@ -4749,11 +4749,7 @@ func InitTables() {
47494749
alias("sync/atomic", "AddUintptr", "runtime/internal/atomic", "Xadd64", p8...)
47504750

47514751
/******** math/big ********/
4752-
add("math/big", "mulWW",
4753-
func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value {
4754-
return s.newValue2(ssa.OpMul64uhilo, types.NewTuple(types.Types[types.TUINT64], types.Types[types.TUINT64]), args[0], args[1])
4755-
},
4756-
sys.ArchAMD64, sys.ArchARM64, sys.ArchPPC64LE, sys.ArchPPC64, sys.ArchS390X)
4752+
alias("math/big", "mulWW", "math/bits", "Mul64", p8...)
47574753
}
47584754

47594755
// findIntrinsic returns a function which builds the SSA equivalent of the

0 commit comments

Comments
 (0)