aboutsummaryrefslogtreecommitdiff
path: root/test/codegen/arithmetic.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/codegen/arithmetic.go')
-rw-r--r--test/codegen/arithmetic.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/codegen/arithmetic.go b/test/codegen/arithmetic.go
index 6b2c5529e1..9443d812dc 100644
--- a/test/codegen/arithmetic.go
+++ b/test/codegen/arithmetic.go
@@ -333,6 +333,15 @@ func Fold2NegMul(a, b int) int {
return -a * -b
}
+func Mul32(a, b int32) int64 {
+ // arm64:"SMULL" -"MOVW"
+ return int64(a) * int64(b)
+}
+func Mul32U(a, b uint32) uint64 {
+ // arm64:"UMULL" -"MOVWU"
+ return uint64(a) * uint64(b)
+}
+
// -------------- //
// Division //
// -------------- //