[compiler-rt] r215296 - builtins: add signature to some assembly routines

Saleem Abdulrasool compnerd at compnerd.org
Sat Aug 9 13:17:44 PDT 2014


Author: compnerd
Date: Sat Aug  9 15:17:43 2014
New Revision: 215296

URL: http://llvm.org/viewvc/llvm-project?rev=215296&view=rev
Log:
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.

Modified:
    compiler-rt/trunk/lib/builtins/arm/divmodsi4.S
    compiler-rt/trunk/lib/builtins/arm/divsi3.S
    compiler-rt/trunk/lib/builtins/arm/modsi3.S
    compiler-rt/trunk/lib/builtins/arm/udivmodsi4.S
    compiler-rt/trunk/lib/builtins/arm/udivsi3.S
    compiler-rt/trunk/lib/builtins/arm/umodsi3.S

Modified: compiler-rt/trunk/lib/builtins/arm/divmodsi4.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/arm/divmodsi4.S?rev=215296&r1=215295&r2=215296&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/arm/divmodsi4.S (original)
+++ compiler-rt/trunk/lib/builtins/arm/divmodsi4.S Sat Aug  9 15:17:43 2014
@@ -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__

Modified: compiler-rt/trunk/lib/builtins/arm/divsi3.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/arm/divsi3.S?rev=215296&r1=215295&r2=215296&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/arm/divsi3.S (original)
+++ compiler-rt/trunk/lib/builtins/arm/divsi3.S Sat Aug  9 15:17:43 2014
@@ -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

Modified: compiler-rt/trunk/lib/builtins/arm/modsi3.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/arm/modsi3.S?rev=215296&r1=215295&r2=215296&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/arm/modsi3.S (original)
+++ compiler-rt/trunk/lib/builtins/arm/modsi3.S Sat Aug  9 15:17:43 2014
@@ -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__

Modified: compiler-rt/trunk/lib/builtins/arm/udivmodsi4.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/arm/udivmodsi4.S?rev=215296&r1=215295&r2=215296&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/arm/udivmodsi4.S (original)
+++ compiler-rt/trunk/lib/builtins/arm/udivmodsi4.S Sat Aug  9 15:17:43 2014
@@ -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__

Modified: compiler-rt/trunk/lib/builtins/arm/udivsi3.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/arm/udivsi3.S?rev=215296&r1=215295&r2=215296&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/arm/udivsi3.S (original)
+++ compiler-rt/trunk/lib/builtins/arm/udivsi3.S Sat Aug  9 15:17:43 2014
@@ -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

Modified: compiler-rt/trunk/lib/builtins/arm/umodsi3.S
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/arm/umodsi3.S?rev=215296&r1=215295&r2=215296&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/arm/umodsi3.S (original)
+++ compiler-rt/trunk/lib/builtins/arm/umodsi3.S Sat Aug  9 15:17:43 2014
@@ -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__





More information about the llvm-commits mailing list