summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-08-09 20:17:43 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-08-09 20:17:43 +0000
commit39238e8a293a375e3b9f8476a0dd57dc56eb2116 (patch)
tree9d505daad9f162700df1ebbaf3e7a05e2569a614
parent3a2883db4582a9a095fa02cc8f3636fab7e3cc7b (diff)
builtins: add signature to some assembly routines
Add a helpful description and a signature for the functions implemented in assembly for the integral math routines. NFC. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@215296 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/builtins/arm/divmodsi4.S4
-rw-r--r--lib/builtins/arm/divsi3.S4
-rw-r--r--lib/builtins/arm/modsi3.S3
-rw-r--r--lib/builtins/arm/udivmodsi4.S5
-rw-r--r--lib/builtins/arm/udivsi3.S4
-rw-r--r--lib/builtins/arm/umodsi3.S3
6 files changed, 23 insertions, 0 deletions
diff --git a/lib/builtins/arm/divmodsi4.S b/lib/builtins/arm/divmodsi4.S
index 91bb2a5c7..96527f7c5 100644
--- a/lib/builtins/arm/divmodsi4.S
+++ b/lib/builtins/arm/divmodsi4.S
@@ -27,6 +27,10 @@
.thumb
#endif
+@ int __divmodsi4(int divident, int divisor, int *remainder)
+@ Calculate the quotient and remainder of the (signed) division. The return
+@ value is the quotient, the remainder is placed in the variable.
+
.p2align 3
DEFINE_COMPILERRT_FUNCTION(__divmodsi4)
#if __ARM_ARCH_EXT_IDIV__
diff --git a/lib/builtins/arm/divsi3.S b/lib/builtins/arm/divsi3.S
index db47165af..73ee78d9c 100644
--- a/lib/builtins/arm/divsi3.S
+++ b/lib/builtins/arm/divsi3.S
@@ -29,6 +29,10 @@
.p2align 3
// Ok, APCS and AAPCS agree on 32 bit args, so it's safe to use the same routine.
DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_idiv, __divsi3)
+
+@ int __divsi3(int divident, int divisor)
+@ Calculate and return the quotient of the (signed) division.
+
DEFINE_COMPILERRT_FUNCTION(__divsi3)
#if __ARM_ARCH_EXT_IDIV__
tst r1,r1
diff --git a/lib/builtins/arm/modsi3.S b/lib/builtins/arm/modsi3.S
index 7ed305ea6..57ffa3b41 100644
--- a/lib/builtins/arm/modsi3.S
+++ b/lib/builtins/arm/modsi3.S
@@ -26,6 +26,9 @@
.thumb
#endif
+@ int __modsi3(int divident, int divisor)
+@ Calculate and return the remainder of the (signed) division.
+
.p2align 3
DEFINE_COMPILERRT_FUNCTION(__modsi3)
#if __ARM_ARCH_EXT_IDIV__
diff --git a/lib/builtins/arm/udivmodsi4.S b/lib/builtins/arm/udivmodsi4.S
index aaece9727..d04cb9890 100644
--- a/lib/builtins/arm/udivmodsi4.S
+++ b/lib/builtins/arm/udivmodsi4.S
@@ -21,6 +21,11 @@
.thumb
#endif
+@ unsigned int __udivmodsi4(unsigned int divident, unsigned int divisor,
+@ unsigned int *remainder)
+@ Calculate the quotient and remainder of the (unsigned) division. The return
+@ value is the quotient, the remainder is placed in the variable.
+
.p2align 2
DEFINE_COMPILERRT_FUNCTION(__udivmodsi4)
#if __ARM_ARCH_EXT_IDIV__
diff --git a/lib/builtins/arm/udivsi3.S b/lib/builtins/arm/udivsi3.S
index 34bd713fb..afe34e0cd 100644
--- a/lib/builtins/arm/udivsi3.S
+++ b/lib/builtins/arm/udivsi3.S
@@ -23,6 +23,10 @@
.p2align 2
DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_uidiv, __udivsi3)
+
+@ unsigned int __udivsi3(unsigned int divident, unsigned int divisor)
+@ Calculate and return the quotient of the (unsigned) division.
+
DEFINE_COMPILERRT_FUNCTION(__udivsi3)
#if __ARM_ARCH_EXT_IDIV__
tst r1, r1
diff --git a/lib/builtins/arm/umodsi3.S b/lib/builtins/arm/umodsi3.S
index b0c62d73c..f9327aced 100644
--- a/lib/builtins/arm/umodsi3.S
+++ b/lib/builtins/arm/umodsi3.S
@@ -20,6 +20,9 @@
.thumb
#endif
+@ unsigned int __umodsi3(unsigned int divident, unsigned int divisor)
+@ Calculate and return the remainder of the (unsigned) division.
+
.p2align 2
DEFINE_COMPILERRT_FUNCTION(__umodsi3)
#if __ARM_ARCH_EXT_IDIV__