]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: intrinsify math/big.mulWW on MIPS64(LE),RISCV64
authorWayne Zuo <wdvxdr@golangcn.org>
Wed, 27 Apr 2022 13:34:48 +0000 (21:34 +0800)
committerKeith Randall <khr@google.com>
Thu, 28 Apr 2022 15:11:42 +0000 (15:11 +0000)
Change-Id: Ib8b18a892b0b1a59229ebc97a38200b53e701a77
Reviewed-on: https://go-review.googlesource.com/c/go/+/402574
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

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

index adb95445c43969a6f8fd282217398f6ee89f6802..f6176c4f0595be416211d00637053393f6bfc160 100644 (file)
@@ -4675,8 +4675,8 @@ func InitTables() {
                        return s.newValue2(ssa.OpMul64uhilo, types.NewTuple(types.Types[types.TUINT64], types.Types[types.TUINT64]), args[0], args[1])
                },
                sys.AMD64, sys.ARM64, sys.PPC64, sys.S390X, sys.MIPS64, sys.RISCV64)
-       alias("math/bits", "Mul", "math/bits", "Mul64", sys.ArchAMD64, sys.ArchARM64, sys.ArchPPC64, sys.ArchPPC64LE, sys.ArchS390X, sys.ArchMIPS64, sys.ArchMIPS64LE, sys.ArchRISCV64)
-       alias("runtime/internal/math", "Mul64", "math/bits", "Mul64", sys.ArchAMD64, sys.ArchARM64, sys.ArchPPC64, sys.ArchPPC64LE, sys.ArchS390X, sys.ArchMIPS64, sys.ArchMIPS64LE, sys.ArchRISCV64)
+       alias("math/bits", "Mul", "math/bits", "Mul64", p8...)
+       alias("runtime/internal/math", "Mul64", "math/bits", "Mul64", p8...)
        addF("math/bits", "Add64",
                func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value {
                        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() {
        alias("sync/atomic", "AddUintptr", "runtime/internal/atomic", "Xadd64", p8...)
 
        /******** math/big ********/
-       add("math/big", "mulWW",
-               func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value {
-                       return s.newValue2(ssa.OpMul64uhilo, types.NewTuple(types.Types[types.TUINT64], types.Types[types.TUINT64]), args[0], args[1])
-               },
-               sys.ArchAMD64, sys.ArchARM64, sys.ArchPPC64LE, sys.ArchPPC64, sys.ArchS390X)
+       alias("math/big", "mulWW", "math/bits", "Mul64", p8...)
 }
 
 // findIntrinsic returns a function which builds the SSA equivalent of the