aboutsummaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/builtins/riscv/mulsi3.S
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-06-27 18:34:17 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-06-27 18:34:17 +0000
commitdbb6490749e2bb2a514a8a305b8fadc3495183e6 (patch)
treedd42cfd6d9813d5640a01083bdc0eedcb3f862c2 /compiler-rt/lib/builtins/riscv/mulsi3.S
parent483b61a50e7423b063fc26985325f594560b3f7e (diff)
downloadsrc-dbb6490749e2bb2a514a8a305b8fadc3495183e6.tar.gz
src-dbb6490749e2bb2a514a8a305b8fadc3495183e6.zip
llvmorg-10.0.1-rc2-0-g77d76b71d7d.
Notes
Notes: svn path=/vendor/llvm-project/release-10.x/; revision=362703 svn path=/vendor/llvm-project/llvmorg-10.0.1-0-gef32c611aa2/; revision=363400; tag=vendor/llvm-project/llvmorg-10.0.1-0-gef32c611aa2
Diffstat (limited to 'compiler-rt/lib/builtins/riscv/mulsi3.S')
-rw-r--r--compiler-rt/lib/builtins/riscv/mulsi3.S23
1 files changed, 4 insertions, 19 deletions
diff --git a/compiler-rt/lib/builtins/riscv/mulsi3.S b/compiler-rt/lib/builtins/riscv/mulsi3.S
index 5464919b26b9..cfafb7a0d7b3 100644
--- a/compiler-rt/lib/builtins/riscv/mulsi3.S
+++ b/compiler-rt/lib/builtins/riscv/mulsi3.S
@@ -1,4 +1,4 @@
-//===--- mulsi3.S - Integer multiplication routines routines ---===//
+//===--- mulsi3.S - Integer multiplication routines -----------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -6,22 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#if !defined(__riscv_mul) && __riscv_xlen == 32
- .text
- .align 2
-
- .globl __mulsi3
- .type __mulsi3, @function
-__mulsi3:
- mv a2, a0
- mv a0, zero
-.L1:
- andi a3, a1, 1
- beqz a3, .L2
- add a0, a0, a2
-.L2:
- srli a1, a1, 1
- slli a2, a2, 1
- bnez a1, .L1
- ret
+#if __riscv_xlen == 32
+#define __mulxi3 __mulsi3
+#include "int_mul_impl.inc"
#endif