aboutsummaryrefslogtreecommitdiff
path: root/test/codegen/mathbits.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/codegen/mathbits.go')
-rw-r--r--test/codegen/mathbits.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/codegen/mathbits.go b/test/codegen/mathbits.go
index 28354ed651..834b08f101 100644
--- a/test/codegen/mathbits.go
+++ b/test/codegen/mathbits.go
@@ -302,3 +302,19 @@ func IterateBits8(n uint8) int {
}
return i
}
+
+// --------------- //
+// bits.Mul* //
+// --------------- //
+
+func Mul(x, y uint) (hi, lo uint) {
+ // amd64:"MULQ"
+ // arm64:"UMULH","MUL"
+ return bits.Mul(x, y)
+}
+
+func Mul64(x, y uint64) (hi, lo uint64) {
+ // amd64:"MULQ"
+ // arm64:"UMULH","MUL"
+ return bits.Mul64(x, y)
+}