summaryrefslogtreecommitdiffstats
path: root/contrib/compiler-rt
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-06-03 17:49:16 +0000
committered <ed@FreeBSD.org>2011-06-03 17:49:16 +0000
commit72c50e51a578d789a06bec5ad77c3ee4fc24db00 (patch)
tree2e1a6ef12bc713fe873a2f9620225f5e07e45cf2 /contrib/compiler-rt
parent9c392f3f9121f469140929d45260ed31420f7126 (diff)
parentee2dbb0f7e84d908ac62aecc178992c9be1ca636 (diff)
downloadFreeBSD-src-72c50e51a578d789a06bec5ad77c3ee4fc24db00.zip
FreeBSD-src-72c50e51a578d789a06bec5ad77c3ee4fc24db00.tar.gz
Upgrade libcompiler_rt from revision 117047 to 132478.
It seems there have only been a small amount to the compiler-rt source code in the mean time. I'd rather have the code in sync as much as possible by the time we release 9.0. Changes: - The libcompiler_rt library is now dual licensed under both the University of Illinois "BSD-Like" license and the MIT license. - Our local modifications for using .hidden instead of .private_extern have been upstreamed, meaning our changes to lib/assembly.h can now be reverted. - A possible endless recursion in __modsi3() has been fixed. - Support for ARM EABI has been added, but it has no effect on FreeBSD (yet). - The functions __udivmodsi4 and __divmodsi4 have been added. Requested by: many, including bf@ and Pedro Giffuni
Diffstat (limited to 'contrib/compiler-rt')
-rw-r--r--contrib/compiler-rt/CREDITS.TXT3
-rw-r--r--contrib/compiler-rt/LICENSE.TXT53
-rw-r--r--contrib/compiler-rt/README.txt8
-rw-r--r--contrib/compiler-rt/lib/abi.h23
-rw-r--r--contrib/compiler-rt/lib/absvdi2.c7
-rw-r--r--contrib/compiler-rt/lib/absvsi2.c9
-rw-r--r--contrib/compiler-rt/lib/absvti2.c4
-rw-r--r--contrib/compiler-rt/lib/adddf3.c22
-rw-r--r--contrib/compiler-rt/lib/addsf3.c29
-rw-r--r--contrib/compiler-rt/lib/addvdi3.c7
-rw-r--r--contrib/compiler-rt/lib/addvsi3.c7
-rw-r--r--contrib/compiler-rt/lib/addvti3.c4
-rw-r--r--contrib/compiler-rt/lib/apple_versioning.c145
-rw-r--r--contrib/compiler-rt/lib/arm/adddf3vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/addsf3vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/bswapdi2.S4
-rw-r--r--contrib/compiler-rt/lib/arm/bswapsi2.S4
-rw-r--r--contrib/compiler-rt/lib/arm/comparesf2.S4
-rw-r--r--contrib/compiler-rt/lib/arm/divdf3vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/divmodsi4.S47
-rw-r--r--contrib/compiler-rt/lib/arm/divsf3vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/divsi3.S41
-rw-r--r--contrib/compiler-rt/lib/arm/eqdf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/eqsf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/extendsfdf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/fixdfsivfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/fixsfsivfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/fixunsdfsivfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/fixunssfsivfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/floatsidfvfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/floatsisfvfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/floatunssidfvfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/floatunssisfvfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/gedf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/gesf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/gtdf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/gtsf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/ledf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/lesf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/ltdf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/ltsf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/modsi3.S67
-rw-r--r--contrib/compiler-rt/lib/arm/muldf3vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/mulsf3vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/nedf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/negdf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/negsf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/nesf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/restore_vfp_d8_d15_regs.S4
-rw-r--r--contrib/compiler-rt/lib/arm/save_vfp_d8_d15_regs.S4
-rw-r--r--contrib/compiler-rt/lib/arm/softfloat-alias.list21
-rw-r--r--contrib/compiler-rt/lib/arm/subdf3vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/subsf3vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/switch16.S4
-rw-r--r--contrib/compiler-rt/lib/arm/switch32.S4
-rw-r--r--contrib/compiler-rt/lib/arm/switch8.S4
-rw-r--r--contrib/compiler-rt/lib/arm/switchu8.S4
-rw-r--r--contrib/compiler-rt/lib/arm/sync_synchronize.S4
-rw-r--r--contrib/compiler-rt/lib/arm/truncdfsf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/udivmodsi4.S80
-rw-r--r--contrib/compiler-rt/lib/arm/udivsi3.S80
-rw-r--r--contrib/compiler-rt/lib/arm/umodsi3.S58
-rw-r--r--contrib/compiler-rt/lib/arm/unorddf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/arm/unordsf2vfp.S4
-rw-r--r--contrib/compiler-rt/lib/ashldi3.c9
-rw-r--r--contrib/compiler-rt/lib/ashlti3.c4
-rw-r--r--contrib/compiler-rt/lib/ashrdi3.c9
-rw-r--r--contrib/compiler-rt/lib/ashrti3.c4
-rw-r--r--contrib/compiler-rt/lib/assembly.h47
-rw-r--r--contrib/compiler-rt/lib/clear_cache.c4
-rw-r--r--contrib/compiler-rt/lib/clzdi2.c9
-rw-r--r--contrib/compiler-rt/lib/clzsi2.c9
-rw-r--r--contrib/compiler-rt/lib/clzti2.c4
-rw-r--r--contrib/compiler-rt/lib/cmpdi2.c11
-rw-r--r--contrib/compiler-rt/lib/cmpti2.c4
-rw-r--r--contrib/compiler-rt/lib/comparedf2.c4
-rw-r--r--contrib/compiler-rt/lib/comparesf2.c4
-rw-r--r--contrib/compiler-rt/lib/ctzdi2.c7
-rw-r--r--contrib/compiler-rt/lib/ctzsi2.c7
-rw-r--r--contrib/compiler-rt/lib/ctzti2.c4
-rw-r--r--contrib/compiler-rt/lib/divdc3.c4
-rw-r--r--contrib/compiler-rt/lib/divdf3.c7
-rw-r--r--contrib/compiler-rt/lib/divdi3.c9
-rw-r--r--contrib/compiler-rt/lib/divmoddi4.c30
-rw-r--r--contrib/compiler-rt/lib/divmodsi4.c31
-rw-r--r--contrib/compiler-rt/lib/divsc3.c4
-rw-r--r--contrib/compiler-rt/lib/divsf3.c7
-rw-r--r--contrib/compiler-rt/lib/divsi3.c11
-rw-r--r--contrib/compiler-rt/lib/divti3.c4
-rw-r--r--contrib/compiler-rt/lib/divxc3.c4
-rw-r--r--contrib/compiler-rt/lib/enable_execute_stack.c4
-rw-r--r--contrib/compiler-rt/lib/endianness.h4
-rw-r--r--contrib/compiler-rt/lib/eprintf.c4
-rw-r--r--contrib/compiler-rt/lib/extendsfdf2.c8
-rw-r--r--contrib/compiler-rt/lib/ffsdi2.c7
-rw-r--r--contrib/compiler-rt/lib/ffsti2.c4
-rw-r--r--contrib/compiler-rt/lib/fixdfdi.c7
-rw-r--r--contrib/compiler-rt/lib/fixdfsi.c9
-rw-r--r--contrib/compiler-rt/lib/fixdfti.c4
-rw-r--r--contrib/compiler-rt/lib/fixsfdi.c9
-rw-r--r--contrib/compiler-rt/lib/fixsfsi.c11
-rw-r--r--contrib/compiler-rt/lib/fixsfti.c4
-rw-r--r--contrib/compiler-rt/lib/fixunsdfdi.c9
-rw-r--r--contrib/compiler-rt/lib/fixunsdfsi.c9
-rw-r--r--contrib/compiler-rt/lib/fixunsdfti.c4
-rw-r--r--contrib/compiler-rt/lib/fixunssfdi.c10
-rw-r--r--contrib/compiler-rt/lib/fixunssfsi.c9
-rw-r--r--contrib/compiler-rt/lib/fixunssfti.c4
-rw-r--r--contrib/compiler-rt/lib/fixunsxfdi.c4
-rw-r--r--contrib/compiler-rt/lib/fixunsxfsi.c4
-rw-r--r--contrib/compiler-rt/lib/fixunsxfti.c4
-rw-r--r--contrib/compiler-rt/lib/fixxfdi.c4
-rw-r--r--contrib/compiler-rt/lib/fixxfti.c4
-rw-r--r--contrib/compiler-rt/lib/floatdidf.c11
-rw-r--r--contrib/compiler-rt/lib/floatdisf.c12
-rw-r--r--contrib/compiler-rt/lib/floatdixf.c4
-rw-r--r--contrib/compiler-rt/lib/floatsidf.c9
-rw-r--r--contrib/compiler-rt/lib/floatsisf.c9
-rw-r--r--contrib/compiler-rt/lib/floattidf.c4
-rw-r--r--contrib/compiler-rt/lib/floattisf.c4
-rw-r--r--contrib/compiler-rt/lib/floattixf.c4
-rw-r--r--contrib/compiler-rt/lib/floatundidf.c14
-rw-r--r--contrib/compiler-rt/lib/floatundisf.c12
-rw-r--r--contrib/compiler-rt/lib/floatundixf.c4
-rw-r--r--contrib/compiler-rt/lib/floatunsidf.c9
-rw-r--r--contrib/compiler-rt/lib/floatunsisf.c9
-rw-r--r--contrib/compiler-rt/lib/floatuntidf.c4
-rw-r--r--contrib/compiler-rt/lib/floatuntisf.c4
-rw-r--r--contrib/compiler-rt/lib/floatuntixf.c4
-rw-r--r--contrib/compiler-rt/lib/fp_lib.h4
-rw-r--r--contrib/compiler-rt/lib/gcc_personality_v0.c4
-rw-r--r--contrib/compiler-rt/lib/i386/ashldi3.S4
-rw-r--r--contrib/compiler-rt/lib/i386/ashrdi3.S4
-rw-r--r--contrib/compiler-rt/lib/i386/divdi3.S4
-rw-r--r--contrib/compiler-rt/lib/i386/floatdidf.S4
-rw-r--r--contrib/compiler-rt/lib/i386/floatdisf.S4
-rw-r--r--contrib/compiler-rt/lib/i386/floatdixf.S4
-rw-r--r--contrib/compiler-rt/lib/i386/floatundidf.S4
-rw-r--r--contrib/compiler-rt/lib/i386/floatundisf.S4
-rw-r--r--contrib/compiler-rt/lib/i386/floatundixf.S4
-rw-r--r--contrib/compiler-rt/lib/i386/lshrdi3.S4
-rw-r--r--contrib/compiler-rt/lib/i386/moddi3.S4
-rw-r--r--contrib/compiler-rt/lib/i386/muldi3.S4
-rw-r--r--contrib/compiler-rt/lib/i386/udivdi3.S4
-rw-r--r--contrib/compiler-rt/lib/i386/umoddi3.S4
-rw-r--r--contrib/compiler-rt/lib/int_lib.h5
-rw-r--r--contrib/compiler-rt/lib/lshrdi3.c9
-rw-r--r--contrib/compiler-rt/lib/lshrti3.c4
-rw-r--r--contrib/compiler-rt/lib/moddi3.c9
-rw-r--r--contrib/compiler-rt/lib/modsi3.c11
-rw-r--r--contrib/compiler-rt/lib/modti3.c4
-rw-r--r--contrib/compiler-rt/lib/muldc3.c4
-rw-r--r--contrib/compiler-rt/lib/muldf3.c10
-rw-r--r--contrib/compiler-rt/lib/muldi3.c11
-rw-r--r--contrib/compiler-rt/lib/mulsc3.c4
-rw-r--r--contrib/compiler-rt/lib/mulsf3.c10
-rw-r--r--contrib/compiler-rt/lib/multi3.c4
-rw-r--r--contrib/compiler-rt/lib/mulvdi3.c4
-rw-r--r--contrib/compiler-rt/lib/mulvsi3.c4
-rw-r--r--contrib/compiler-rt/lib/mulvti3.c4
-rw-r--r--contrib/compiler-rt/lib/mulxc3.c4
-rw-r--r--contrib/compiler-rt/lib/negdf2.c7
-rw-r--r--contrib/compiler-rt/lib/negdi2.c4
-rw-r--r--contrib/compiler-rt/lib/negsf2.c10
-rw-r--r--contrib/compiler-rt/lib/negti2.c4
-rw-r--r--contrib/compiler-rt/lib/negvdi2.c7
-rw-r--r--contrib/compiler-rt/lib/negvsi2.c7
-rw-r--r--contrib/compiler-rt/lib/negvti2.c4
-rw-r--r--contrib/compiler-rt/lib/paritydi2.c9
-rw-r--r--contrib/compiler-rt/lib/paritysi2.c7
-rw-r--r--contrib/compiler-rt/lib/parityti2.c4
-rw-r--r--contrib/compiler-rt/lib/popcountdi2.c7
-rw-r--r--contrib/compiler-rt/lib/popcountsi2.c7
-rw-r--r--contrib/compiler-rt/lib/popcountti2.c4
-rw-r--r--contrib/compiler-rt/lib/powidf2.c7
-rw-r--r--contrib/compiler-rt/lib/powisf2.c7
-rw-r--r--contrib/compiler-rt/lib/powitf2.c4
-rw-r--r--contrib/compiler-rt/lib/powixf2.c4
-rw-r--r--contrib/compiler-rt/lib/ppc/restFP.S4
-rw-r--r--contrib/compiler-rt/lib/ppc/saveFP.S4
-rw-r--r--contrib/compiler-rt/lib/subdf3.c30
-rw-r--r--contrib/compiler-rt/lib/subsf3.c29
-rw-r--r--contrib/compiler-rt/lib/subvdi3.c9
-rw-r--r--contrib/compiler-rt/lib/subvsi3.c9
-rw-r--r--contrib/compiler-rt/lib/subvti3.c4
-rw-r--r--contrib/compiler-rt/lib/trampoline_setup.c4
-rw-r--r--contrib/compiler-rt/lib/truncdfsf2.c11
-rw-r--r--contrib/compiler-rt/lib/ucmpdi2.c7
-rw-r--r--contrib/compiler-rt/lib/ucmpti2.c4
-rw-r--r--contrib/compiler-rt/lib/udivdi3.c9
-rw-r--r--contrib/compiler-rt/lib/udivmoddi4.c9
-rw-r--r--contrib/compiler-rt/lib/udivmodsi4.c31
-rw-r--r--contrib/compiler-rt/lib/udivmodti4.c4
-rw-r--r--contrib/compiler-rt/lib/udivsi3.c9
-rw-r--r--contrib/compiler-rt/lib/udivti3.c4
-rw-r--r--contrib/compiler-rt/lib/umoddi3.c9
-rw-r--r--contrib/compiler-rt/lib/umodsi3.c9
-rw-r--r--contrib/compiler-rt/lib/umodti3.c4
-rw-r--r--contrib/compiler-rt/lib/x86_64/floatundidf.S4
-rw-r--r--contrib/compiler-rt/lib/x86_64/floatundisf.S4
-rw-r--r--contrib/compiler-rt/lib/x86_64/floatundixf.S4
201 files changed, 1346 insertions, 536 deletions
diff --git a/contrib/compiler-rt/CREDITS.TXT b/contrib/compiler-rt/CREDITS.TXT
index 8b07b82..818f4fa 100644
--- a/contrib/compiler-rt/CREDITS.TXT
+++ b/contrib/compiler-rt/CREDITS.TXT
@@ -19,3 +19,6 @@ W: http://www.auroraux.org
D: CMake'ify Compiler-RT build system
D: Maintain Solaris & AuroraUX ports of Compiler-RT
+N: Howard Hinnant
+E: hhinnant@apple.com
+D: Architect and primary author of compiler-rt
diff --git a/contrib/compiler-rt/LICENSE.TXT b/contrib/compiler-rt/LICENSE.TXT
index a5e1345..2552e8c 100644
--- a/contrib/compiler-rt/LICENSE.TXT
+++ b/contrib/compiler-rt/LICENSE.TXT
@@ -1,10 +1,21 @@
==============================================================================
-LLVM Release License
+compiler_rt License
==============================================================================
+
+The compiler_rt library is dual licensed under both the University of Illinois
+"BSD-Like" license and the MIT license. As a user of this code you may choose
+to use it under either license. As a contributor, you agree to allow your code
+to be used under both.
+
+Full text of the relevant licenses is included below.
+
+==============================================================================
+
University of Illinois/NCSA
Open Source License
-Copyright (c) 2003-2009 University of Illinois at Urbana-Champaign.
+Copyright (c) 2009-2010 by the contributors listed in CREDITS.TXT
+
All rights reserved.
Developed by:
@@ -43,21 +54,23 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
SOFTWARE.
==============================================================================
-Copyrights and Licenses for Third Party Software Distributed with LLVM:
-==============================================================================
-The LLVM software contains code written by third parties. Such software will
-have its own individual LICENSE.TXT file in the directory in which it appears.
-This file will describe the copyrights, license, and restrictions which apply
-to that code.
-
-The disclaimer of warranty in the University of Illinois Open Source License
-applies to all code in the LLVM Distribution, and nothing in any of the
-other licenses gives permission to use the names of the LLVM Team or the
-University of Illinois to endorse or promote products derived from this
-Software.
-
-The following pieces of software have additional or alternate copyrights,
-licenses, and/or restrictions:
-
-Program Directory
-------- ---------
+
+Copyright (c) 2009-2010 by the contributors listed in CREDITS.TXT
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/contrib/compiler-rt/README.txt b/contrib/compiler-rt/README.txt
index ab389d2..cbeb10c 100644
--- a/contrib/compiler-rt/README.txt
+++ b/contrib/compiler-rt/README.txt
@@ -77,8 +77,12 @@ ti_int __modti3 (ti_int a, ti_int b); // a % b signed
su_int __umodsi3 (su_int a, su_int b); // a % b unsigned
du_int __umoddi3 (du_int a, du_int b); // a % b unsigned
tu_int __umodti3 (tu_int a, tu_int b); // a % b unsigned
-du_int __udivmoddi4(du_int a, du_int b, du_int* rem); // a / b, *rem = a % b
-tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem); // a / b, *rem = a % b
+du_int __udivmoddi4(du_int a, du_int b, du_int* rem); // a / b, *rem = a % b unsigned
+tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem); // a / b, *rem = a % b unsigned
+su_int __udivmodsi4(su_int a, su_int b, su_int* rem); // a / b, *rem = a % b unsigned
+si_int __divmodsi4(si_int a, si_int b, si_int* rem); // a / b, *rem = a % b signed
+
+
// Integral arithmetic with trapping overflow
diff --git a/contrib/compiler-rt/lib/abi.h b/contrib/compiler-rt/lib/abi.h
new file mode 100644
index 0000000..2534317
--- /dev/null
+++ b/contrib/compiler-rt/lib/abi.h
@@ -0,0 +1,23 @@
+/* ===------ abi.h - configuration header for compiler-rt -----------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file is a configuration header for compiler-rt.
+ * This file is not part of the interface of this library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+
+#if __ARM_EABI__
+# define ARM_EABI_FNALIAS(aeabi_name, name) \
+ void __aeabi_##aeabi_name() __attribute__((alias("__" #name)));
+# define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
+#else
+# define ARM_EABI_FNALIAS(aeabi_name, name)
+# define COMPILER_RT_ABI
+#endif
diff --git a/contrib/compiler-rt/lib/absvdi2.c b/contrib/compiler-rt/lib/absvdi2.c
index 919afd1..9c5d4a2 100644
--- a/contrib/compiler-rt/lib/absvdi2.c
+++ b/contrib/compiler-rt/lib/absvdi2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
*===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
*===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
#include <stdlib.h>
@@ -19,7 +20,7 @@
/* Effects: aborts if abs(x) < 0 */
-di_int
+COMPILER_RT_ABI di_int
__absvdi2(di_int a)
{
const int N = (int)(sizeof(di_int) * CHAR_BIT);
diff --git a/contrib/compiler-rt/lib/absvsi2.c b/contrib/compiler-rt/lib/absvsi2.c
index a2c8e3f..80a1a78 100644
--- a/contrib/compiler-rt/lib/absvsi2.c
+++ b/contrib/compiler-rt/lib/absvsi2.c
@@ -2,15 +2,16 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
* This file implements __absvsi2 for the compiler_rt library.
*
* ===----------------------------------------------------------------------===
- */
+ */
+#include "abi.h"
#include "int_lib.h"
#include <stdlib.h>
@@ -19,7 +20,7 @@
/* Effects: aborts if abs(x) < 0 */
-si_int
+COMPILER_RT_ABI si_int
__absvsi2(si_int a)
{
const int N = (int)(sizeof(si_int) * CHAR_BIT);
diff --git a/contrib/compiler-rt/lib/absvti2.c b/contrib/compiler-rt/lib/absvti2.c
index 0978122..9e73a26 100644
--- a/contrib/compiler-rt/lib/absvti2.c
+++ b/contrib/compiler-rt/lib/absvti2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/adddf3.c b/contrib/compiler-rt/lib/adddf3.c
index 1ec43dc..3cc997b 100644
--- a/contrib/compiler-rt/lib/adddf3.c
+++ b/contrib/compiler-rt/lib/adddf3.c
@@ -1,21 +1,26 @@
-//===-- lib/adddf3.c - Double-precision addition and subtraction --*- C -*-===//
+//===-- lib/adddf3.c - Double-precision addition ------------------*- C -*-===//
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
-// This file implements double-precision soft-float addition and subtraction
-// with the IEEE-754 default rounding (to nearest, ties to even).
+// This file implements double-precision soft-float addition with the IEEE-754
+// default rounding (to nearest, ties to even).
//
//===----------------------------------------------------------------------===//
+#include "abi.h"
+
#define DOUBLE_PRECISION
#include "fp_lib.h"
-fp_t __adddf3(fp_t a, fp_t b) {
+ARM_EABI_FNALIAS(dadd, adddf3);
+
+COMPILER_RT_ABI fp_t
+__adddf3(fp_t a, fp_t b) {
rep_t aRep = toRep(a);
rep_t bRep = toRep(b);
@@ -147,8 +152,3 @@ fp_t __adddf3(fp_t a, fp_t b) {
if (roundGuardSticky == 0x4) result += result & 1;
return fromRep(result);
}
-
-// Subtraction; flip the sign bit of b and add.
-fp_t __subdf3(fp_t a, fp_t b) {
- return __adddf3(a, fromRep(toRep(b) ^ signBit));
-}
diff --git a/contrib/compiler-rt/lib/addsf3.c b/contrib/compiler-rt/lib/addsf3.c
index fec14e8..20610ef 100644
--- a/contrib/compiler-rt/lib/addsf3.c
+++ b/contrib/compiler-rt/lib/addsf3.c
@@ -1,20 +1,24 @@
-//===-- lib/addsf3.c - Single-precision addition and subtraction --*- C -*-===//
+//===-- lib/addsf3.c - Single-precision addition ------------------*- C -*-===//
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
-// This file implements single-precision soft-float addition and subtraction
-// with the IEEE-754 default rounding (to nearest, ties to even).
+// This file implements single-precision soft-float addition with the IEEE-754
+// default rounding (to nearest, ties to even).
//
//===----------------------------------------------------------------------===//
+#include "abi.h"
+
#define SINGLE_PRECISION
#include "fp_lib.h"
+ARM_EABI_FNALIAS(fadd, addsf3);
+
fp_t __addsf3(fp_t a, fp_t b) {
rep_t aRep = toRep(a);
@@ -147,18 +151,3 @@ fp_t __addsf3(fp_t a, fp_t b) {
if (roundGuardSticky == 0x4) result += result & 1;
return fromRep(result);
}
-
-// Subtraction; flip the sign bit of b and add.
-fp_t __subsf3(fp_t a, fp_t b) {
- return __addsf3(a, fromRep(toRep(b) ^ signBit));
-}
-
-
-
-
-
-
-
-
-
-
diff --git a/contrib/compiler-rt/lib/addvdi3.c b/contrib/compiler-rt/lib/addvdi3.c
index 53ab102..51ad397 100644
--- a/contrib/compiler-rt/lib/addvdi3.c
+++ b/contrib/compiler-rt/lib/addvdi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
#include <stdlib.h>
@@ -19,7 +20,7 @@
/* Effects: aborts if a + b overflows */
-di_int
+COMPILER_RT_ABI di_int
__addvdi3(di_int a, di_int b)
{
di_int s = a + b;
diff --git a/contrib/compiler-rt/lib/addvsi3.c b/contrib/compiler-rt/lib/addvsi3.c
index 22cd315..c18f7bd 100644
--- a/contrib/compiler-rt/lib/addvsi3.c
+++ b/contrib/compiler-rt/lib/addvsi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
#include <stdlib.h>
@@ -19,7 +20,7 @@
/* Effects: aborts if a + b overflows */
-si_int
+COMPILER_RT_ABI si_int
__addvsi3(si_int a, si_int b)
{
si_int s = a + b;
diff --git a/contrib/compiler-rt/lib/addvti3.c b/contrib/compiler-rt/lib/addvti3.c
index 3df1a74..ba220f5 100644
--- a/contrib/compiler-rt/lib/addvti3.c
+++ b/contrib/compiler-rt/lib/addvti3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/apple_versioning.c b/contrib/compiler-rt/lib/apple_versioning.c
index 0360026..e838d72 100644
--- a/contrib/compiler-rt/lib/apple_versioning.c
+++ b/contrib/compiler-rt/lib/apple_versioning.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*/
@@ -143,6 +143,147 @@ NOT_HERE_BEFORE_10_6(__gcc_qsub)
NOT_HERE_BEFORE_10_6(__trampoline_setup)
#endif /* __ppc__ */
+#if __arm__ && __DYNAMIC__
+ #define NOT_HERE_UNTIL_AFTER_4_3(sym) \
+ extern const char sym##_tmp1 __asm("$ld$hide$os3.0$_" #sym ); \
+ __attribute__((visibility("default"))) const char sym##_tmp1 = 0; \
+ extern const char sym##_tmp2 __asm("$ld$hide$os3.1$_" #sym ); \
+ __attribute__((visibility("default"))) const char sym##_tmp2 = 0; \
+ extern const char sym##_tmp3 __asm("$ld$hide$os3.2$_" #sym ); \
+ __attribute__((visibility("default"))) const char sym##_tmp3 = 0; \
+ extern const char sym##_tmp4 __asm("$ld$hide$os4.0$_" #sym ); \
+ __attribute__((visibility("default"))) const char sym##_tmp4 = 0; \
+ extern const char sym##_tmp5 __asm("$ld$hide$os4.1$_" #sym ); \
+ __attribute__((visibility("default"))) const char sym##_tmp5 = 0; \
+ extern const char sym##_tmp6 __asm("$ld$hide$os4.2$_" #sym ); \
+ __attribute__((visibility("default"))) const char sym##_tmp6 = 0; \
+ extern const char sym##_tmp7 __asm("$ld$hide$os4.3$_" #sym ); \
+ __attribute__((visibility("default"))) const char sym##_tmp7 = 0;
+
+NOT_HERE_UNTIL_AFTER_4_3(__absvdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__absvsi2)
+NOT_HERE_UNTIL_AFTER_4_3(__adddf3)
+NOT_HERE_UNTIL_AFTER_4_3(__adddf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__addsf3)
+NOT_HERE_UNTIL_AFTER_4_3(__addsf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__addvdi3)
+NOT_HERE_UNTIL_AFTER_4_3(__addvsi3)
+NOT_HERE_UNTIL_AFTER_4_3(__ashldi3)
+NOT_HERE_UNTIL_AFTER_4_3(__ashrdi3)
+NOT_HERE_UNTIL_AFTER_4_3(__bswapdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__bswapsi2)
+NOT_HERE_UNTIL_AFTER_4_3(__clzdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__clzsi2)
+NOT_HERE_UNTIL_AFTER_4_3(__cmpdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__ctzdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__ctzsi2)
+NOT_HERE_UNTIL_AFTER_4_3(__divdc3)
+NOT_HERE_UNTIL_AFTER_4_3(__divdf3)
+NOT_HERE_UNTIL_AFTER_4_3(__divdf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__divdi3)
+NOT_HERE_UNTIL_AFTER_4_3(__divsc3)
+NOT_HERE_UNTIL_AFTER_4_3(__divsf3)
+NOT_HERE_UNTIL_AFTER_4_3(__divsf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__divsi3)
+NOT_HERE_UNTIL_AFTER_4_3(__eqdf2)
+NOT_HERE_UNTIL_AFTER_4_3(__eqdf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__eqsf2)
+NOT_HERE_UNTIL_AFTER_4_3(__eqsf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__extendsfdf2)
+NOT_HERE_UNTIL_AFTER_4_3(__extendsfdf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__ffsdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__fixdfdi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixdfsi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixdfsivfp)
+NOT_HERE_UNTIL_AFTER_4_3(__fixsfdi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixsfsi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixsfsivfp)
+NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfdi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfsi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixunsdfsivfp)
+NOT_HERE_UNTIL_AFTER_4_3(__fixunssfdi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixunssfsi)
+NOT_HERE_UNTIL_AFTER_4_3(__fixunssfsivfp)
+NOT_HERE_UNTIL_AFTER_4_3(__floatdidf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatdisf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatsidf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatsidfvfp)
+NOT_HERE_UNTIL_AFTER_4_3(__floatsisf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatsisfvfp)
+NOT_HERE_UNTIL_AFTER_4_3(__floatundidf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatundisf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatunsidf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatunsisf)
+NOT_HERE_UNTIL_AFTER_4_3(__floatunssidfvfp)
+NOT_HERE_UNTIL_AFTER_4_3(__floatunssisfvfp)
+NOT_HERE_UNTIL_AFTER_4_3(__gedf2)
+NOT_HERE_UNTIL_AFTER_4_3(__gedf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__gesf2)
+NOT_HERE_UNTIL_AFTER_4_3(__gesf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__gtdf2)
+NOT_HERE_UNTIL_AFTER_4_3(__gtdf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__gtsf2)
+NOT_HERE_UNTIL_AFTER_4_3(__gtsf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__ledf2)
+NOT_HERE_UNTIL_AFTER_4_3(__ledf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__lesf2)
+NOT_HERE_UNTIL_AFTER_4_3(__lesf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__lshrdi3)
+NOT_HERE_UNTIL_AFTER_4_3(__ltdf2)
+NOT_HERE_UNTIL_AFTER_4_3(__ltdf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__ltsf2)
+NOT_HERE_UNTIL_AFTER_4_3(__ltsf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__moddi3)
+NOT_HERE_UNTIL_AFTER_4_3(__modsi3)
+NOT_HERE_UNTIL_AFTER_4_3(__muldc3)
+NOT_HERE_UNTIL_AFTER_4_3(__muldf3)
+NOT_HERE_UNTIL_AFTER_4_3(__muldf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__muldi3)
+NOT_HERE_UNTIL_AFTER_4_3(__mulsc3)
+NOT_HERE_UNTIL_AFTER_4_3(__mulsf3)
+NOT_HERE_UNTIL_AFTER_4_3(__mulsf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__mulvdi3)
+NOT_HERE_UNTIL_AFTER_4_3(__mulvsi3)
+NOT_HERE_UNTIL_AFTER_4_3(__nedf2)
+NOT_HERE_UNTIL_AFTER_4_3(__nedf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__negdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__negvdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__negvsi2)
+NOT_HERE_UNTIL_AFTER_4_3(__nesf2)
+NOT_HERE_UNTIL_AFTER_4_3(__nesf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__paritydi2)
+NOT_HERE_UNTIL_AFTER_4_3(__paritysi2)
+NOT_HERE_UNTIL_AFTER_4_3(__popcountdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__popcountsi2)
+NOT_HERE_UNTIL_AFTER_4_3(__powidf2)
+NOT_HERE_UNTIL_AFTER_4_3(__powisf2)
+NOT_HERE_UNTIL_AFTER_4_3(__subdf3)
+NOT_HERE_UNTIL_AFTER_4_3(__subdf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__subsf3)
+NOT_HERE_UNTIL_AFTER_4_3(__subsf3vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__subvdi3)
+NOT_HERE_UNTIL_AFTER_4_3(__subvsi3)
+NOT_HERE_UNTIL_AFTER_4_3(__truncdfsf2)
+NOT_HERE_UNTIL_AFTER_4_3(__truncdfsf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__ucmpdi2)
+NOT_HERE_UNTIL_AFTER_4_3(__udivdi3)
+NOT_HERE_UNTIL_AFTER_4_3(__udivmoddi4)
+NOT_HERE_UNTIL_AFTER_4_3(__udivsi3)
+NOT_HERE_UNTIL_AFTER_4_3(__umoddi3)
+NOT_HERE_UNTIL_AFTER_4_3(__umodsi3)
+NOT_HERE_UNTIL_AFTER_4_3(__unorddf2)
+NOT_HERE_UNTIL_AFTER_4_3(__unorddf2vfp)
+NOT_HERE_UNTIL_AFTER_4_3(__unordsf2)
+NOT_HERE_UNTIL_AFTER_4_3(__unordsf2vfp)
+
+NOT_HERE_UNTIL_AFTER_4_3(__divmodsi4)
+NOT_HERE_UNTIL_AFTER_4_3(__udivmodsi4)
+#endif // __arm__ && __DYNAMIC__
+
+
+
+
+
#else /* !__APPLE__ */
extern int avoid_empty_file;
diff --git a/contrib/compiler-rt/lib/arm/adddf3vfp.S b/contrib/compiler-rt/lib/arm/adddf3vfp.S
index 5e705e3..cced1e0 100644
--- a/contrib/compiler-rt/lib/arm/adddf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/adddf3vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/addsf3vfp.S b/contrib/compiler-rt/lib/arm/addsf3vfp.S
index 36d509c..b747528 100644
--- a/contrib/compiler-rt/lib/arm/addsf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/addsf3vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/bswapdi2.S b/contrib/compiler-rt/lib/arm/bswapdi2.S
index d3ca33a..a0283e1 100644
--- a/contrib/compiler-rt/lib/arm/bswapdi2.S
+++ b/contrib/compiler-rt/lib/arm/bswapdi2.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/bswapsi2.S b/contrib/compiler-rt/lib/arm/bswapsi2.S
index 0a0c073..4c3af1f 100644
--- a/contrib/compiler-rt/lib/arm/bswapsi2.S
+++ b/contrib/compiler-rt/lib/arm/bswapsi2.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/comparesf2.S b/contrib/compiler-rt/lib/arm/comparesf2.S
index f21e0bcd..ee18203 100644
--- a/contrib/compiler-rt/lib/arm/comparesf2.S
+++ b/contrib/compiler-rt/lib/arm/comparesf2.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
diff --git a/contrib/compiler-rt/lib/arm/divdf3vfp.S b/contrib/compiler-rt/lib/arm/divdf3vfp.S
index e43baa3..74ef0ea 100644
--- a/contrib/compiler-rt/lib/arm/divdf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/divdf3vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/divmodsi4.S b/contrib/compiler-rt/lib/arm/divmodsi4.S
new file mode 100644
index 0000000..cec39a7
--- /dev/null
+++ b/contrib/compiler-rt/lib/arm/divmodsi4.S
@@ -0,0 +1,47 @@
+/*===-- divmodsi4.S - 32-bit signed integer divide and modulus ------------===//
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===//
+ *
+ * This file implements the __divmodsi4 (32-bit signed integer divide and
+ * modulus) function for the ARM architecture. A naive digit-by-digit
+ * computation is employed for simplicity.
+ *
+ *===----------------------------------------------------------------------===*/
+
+#include "../assembly.h"
+
+#define ESTABLISH_FRAME \
+ push {r4-r7, lr} ;\
+ add r7, sp, #12
+#define CLEAR_FRAME_AND_RETURN \
+ pop {r4-r7, pc}
+
+.syntax unified
+.align 3
+DEFINE_COMPILERRT_FUNCTION(__divmodsi4)
+ ESTABLISH_FRAME
+// Set aside the sign of the quotient and modulus, and the address for the
+// modulus.
+ eor r4, r0, r1
+ mov r5, r0
+ mov r6, r2
+// Take the absolute value of a and b via abs(x) = (x^(x >> 31)) - (x >> 31).
+ eor ip, r0, r0, asr #31
+ eor lr, r1, r1, asr #31
+ sub r0, ip, r0, asr #31
+ sub r1, lr, r1, asr #31
+// Unsigned divmod:
+ bl SYMBOL_NAME(__udivmodsi4)
+// Apply the sign of quotient and modulus
+ ldr r1, [r6]
+ eor r0, r0, r4, asr #31
+ eor r1, r1, r5, asr #31
+ sub r0, r0, r4, asr #31
+ sub r1, r1, r5, asr #31
+ str r1, [r6]
+ CLEAR_FRAME_AND_RETURN
diff --git a/contrib/compiler-rt/lib/arm/divsf3vfp.S b/contrib/compiler-rt/lib/arm/divsf3vfp.S
index d96c930..9eefcf31e 100644
--- a/contrib/compiler-rt/lib/arm/divsf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/divsf3vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/divsi3.S b/contrib/compiler-rt/lib/arm/divsi3.S
new file mode 100644
index 0000000..00e6181
--- /dev/null
+++ b/contrib/compiler-rt/lib/arm/divsi3.S
@@ -0,0 +1,41 @@
+/*===-- divsi3.S - 32-bit signed integer divide ---------------------------===//
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===//
+ *
+ * This file implements the __divsi3 (32-bit signed integer divide) function
+ * for the ARM architecture as a wrapper around the unsigned routine.
+ *
+ *===----------------------------------------------------------------------===*/
+
+#include "../assembly.h"
+
+#define ESTABLISH_FRAME \
+ push {r4, r7, lr} ;\
+ add r7, sp, #4
+#define CLEAR_FRAME_AND_RETURN \
+ pop {r4, r7, pc}
+
+.syntax unified
+.align 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)
+DEFINE_COMPILERRT_FUNCTION(__divsi3)
+ ESTABLISH_FRAME
+// Set aside the sign of the quotient.
+ eor r4, r0, r1
+// Take absolute value of a and b via abs(x) = (x^(x >> 31)) - (x >> 31).
+ eor r2, r0, r0, asr #31
+ eor r3, r1, r1, asr #31
+ sub r0, r2, r0, asr #31
+ sub r1, r3, r1, asr #31
+// abs(a) / abs(b)
+ bl SYMBOL_NAME(__udivsi3)
+// Apply sign of quotient to result and return.
+ eor r0, r0, r4, asr #31
+ sub r0, r0, r4, asr #31
+ CLEAR_FRAME_AND_RETURN
diff --git a/contrib/compiler-rt/lib/arm/eqdf2vfp.S b/contrib/compiler-rt/lib/arm/eqdf2vfp.S
index d4384ec..2998a76 100644
--- a/contrib/compiler-rt/lib/arm/eqdf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/eqdf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/eqsf2vfp.S b/contrib/compiler-rt/lib/arm/eqsf2vfp.S
index 07355a3..927566e 100644
--- a/contrib/compiler-rt/lib/arm/eqsf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/eqsf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S b/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S
index 4343a7e..b1aa88e 100644
--- a/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/fixdfsivfp.S b/contrib/compiler-rt/lib/arm/fixdfsivfp.S
index 30458cc..0285a17 100644
--- a/contrib/compiler-rt/lib/arm/fixdfsivfp.S
+++ b/contrib/compiler-rt/lib/arm/fixdfsivfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/fixsfsivfp.S b/contrib/compiler-rt/lib/arm/fixsfsivfp.S
index ce6f18e..d05ba74 100644
--- a/contrib/compiler-rt/lib/arm/fixsfsivfp.S
+++ b/contrib/compiler-rt/lib/arm/fixsfsivfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S b/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S
index 7e766c0..ddb703c 100644
--- a/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S
+++ b/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/fixunssfsivfp.S b/contrib/compiler-rt/lib/arm/fixunssfsivfp.S
index ba2344f..afbb64f 100644
--- a/contrib/compiler-rt/lib/arm/fixunssfsivfp.S
+++ b/contrib/compiler-rt/lib/arm/fixunssfsivfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/floatsidfvfp.S b/contrib/compiler-rt/lib/arm/floatsidfvfp.S
index 5ed4ace..fe3366a 100644
--- a/contrib/compiler-rt/lib/arm/floatsidfvfp.S
+++ b/contrib/compiler-rt/lib/arm/floatsidfvfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/floatsisfvfp.S b/contrib/compiler-rt/lib/arm/floatsisfvfp.S
index 0114c78..5b41610 100644
--- a/contrib/compiler-rt/lib/arm/floatsisfvfp.S
+++ b/contrib/compiler-rt/lib/arm/floatsisfvfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/floatunssidfvfp.S b/contrib/compiler-rt/lib/arm/floatunssidfvfp.S
index d1bfe3a..9b22a6f 100644
--- a/contrib/compiler-rt/lib/arm/floatunssidfvfp.S
+++ b/contrib/compiler-rt/lib/arm/floatunssidfvfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/floatunssisfvfp.S b/contrib/compiler-rt/lib/arm/floatunssisfvfp.S
index 0b73577..44d5e93 100644
--- a/contrib/compiler-rt/lib/arm/floatunssisfvfp.S
+++ b/contrib/compiler-rt/lib/arm/floatunssisfvfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/gedf2vfp.S b/contrib/compiler-rt/lib/arm/gedf2vfp.S
index 6ab856f..9993f52 100644
--- a/contrib/compiler-rt/lib/arm/gedf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/gedf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/gesf2vfp.S b/contrib/compiler-rt/lib/arm/gesf2vfp.S
index b00d821..9ce1682 100644
--- a/contrib/compiler-rt/lib/arm/gesf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/gesf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/gtdf2vfp.S b/contrib/compiler-rt/lib/arm/gtdf2vfp.S
index 65594c7..8a049c8 100644
--- a/contrib/compiler-rt/lib/arm/gtdf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/gtdf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/gtsf2vfp.S b/contrib/compiler-rt/lib/arm/gtsf2vfp.S
index 53ef2a0..1ffe1ec 100644
--- a/contrib/compiler-rt/lib/arm/gtsf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/gtsf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/ledf2vfp.S b/contrib/compiler-rt/lib/arm/ledf2vfp.S
index 327a7d5..a04d0f2 100644
--- a/contrib/compiler-rt/lib/arm/ledf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/ledf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/lesf2vfp.S b/contrib/compiler-rt/lib/arm/lesf2vfp.S
index b7e05da..3011200 100644
--- a/contrib/compiler-rt/lib/arm/lesf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/lesf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/ltdf2vfp.S b/contrib/compiler-rt/lib/arm/ltdf2vfp.S
index 55dfd80..87144a8 100644
--- a/contrib/compiler-rt/lib/arm/ltdf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/ltdf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/ltsf2vfp.S b/contrib/compiler-rt/lib/arm/ltsf2vfp.S
index 3816a71..ca06ae2 100644
--- a/contrib/compiler-rt/lib/arm/ltsf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/ltsf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/modsi3.S b/contrib/compiler-rt/lib/arm/modsi3.S
index 64a3afd..a4cd2ee 100644
--- a/contrib/compiler-rt/lib/arm/modsi3.S
+++ b/contrib/compiler-rt/lib/arm/modsi3.S
@@ -1,36 +1,39 @@
-//===-------- modsi3.S - Implement modsi3 ---------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
+/*===-- modsi3.S - 32-bit signed integer modulus --------------------------===//
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===//
+ *
+ * This file implements the __modsi3 (32-bit signed integer modulus) function
+ * for the ARM architecture as a wrapper around the unsigned routine.
+ *
+ *===----------------------------------------------------------------------===*/
#include "../assembly.h"
-//
-// extern int32_t __modsi3(int32_t a, int32_t b);
-//
-// Returns the remainder when dividing two 32-bit signed integers.
-// Conceptually, the function is: { return a - (a / b) * b; }
-// But if you write that in C, llvm compiles it to a call to __modsi3...
-//
- .align 2
-DEFINE_COMPILERRT_FUNCTION(__modsi3)
- push {r4, r5, r7, lr}
- add r7, sp, #8 // set stack frame
- mov r5, r0 // save a
- mov r4, r1 // save b
- bl ___divsi3 // compute a/b
-#if __ARM_ARCH_7A__
- mls r0, r4, r0, r5 // mulitple result * b and subtract from a
-#else
- // before armv7, does not have "mls" instruction
- mul r3, r0, r4 // multiple result * b
- sub r0, r5, r3 // a - result
-#endif
- pop {r4, r5, r7, pc}
-
-
+#define ESTABLISH_FRAME \
+ push {r4, r7, lr} ;\
+ add r7, sp, #4
+#define CLEAR_FRAME_AND_RETURN \
+ pop {r4, r7, pc}
+.syntax unified
+.align 3
+DEFINE_COMPILERRT_FUNCTION(__modsi3)
+ ESTABLISH_FRAME
+ // Set aside the sign of the dividend.
+ mov r4, r0
+ // Take absolute value of a and b via abs(x) = (x^(x >> 31)) - (x >> 31).
+ eor r2, r0, r0, asr #31
+ eor r3, r1, r1, asr #31
+ sub r0, r2, r0, asr #31
+ sub r1, r3, r1, asr #31
+ // abs(a) % abs(b)
+ bl SYMBOL_NAME(__umodsi3)
+ // Apply sign of dividend to result and return.
+ eor r0, r0, r4, asr #31
+ sub r0, r0, r4, asr #31
+ CLEAR_FRAME_AND_RETURN
diff --git a/contrib/compiler-rt/lib/arm/muldf3vfp.S b/contrib/compiler-rt/lib/arm/muldf3vfp.S
index cb503d3..96bba06 100644
--- a/contrib/compiler-rt/lib/arm/muldf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/muldf3vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/mulsf3vfp.S b/contrib/compiler-rt/lib/arm/mulsf3vfp.S
index 49b4d1d..c56991d 100644
--- a/contrib/compiler-rt/lib/arm/mulsf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/mulsf3vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/nedf2vfp.S b/contrib/compiler-rt/lib/arm/nedf2vfp.S
index 813864e..a02b09c 100644
--- a/contrib/compiler-rt/lib/arm/nedf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/nedf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/negdf2vfp.S b/contrib/compiler-rt/lib/arm/negdf2vfp.S
index 80139754..100f4fd 100644
--- a/contrib/compiler-rt/lib/arm/negdf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/negdf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/negsf2vfp.S b/contrib/compiler-rt/lib/arm/negsf2vfp.S
index 243c086..f96c8ad 100644
--- a/contrib/compiler-rt/lib/arm/negsf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/negsf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/nesf2vfp.S b/contrib/compiler-rt/lib/arm/nesf2vfp.S
index d470afa..d620549 100644
--- a/contrib/compiler-rt/lib/arm/nesf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/nesf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/restore_vfp_d8_d15_regs.S b/contrib/compiler-rt/lib/arm/restore_vfp_d8_d15_regs.S
index 25404cd..7f441db 100644
--- a/contrib/compiler-rt/lib/arm/restore_vfp_d8_d15_regs.S
+++ b/contrib/compiler-rt/lib/arm/restore_vfp_d8_d15_regs.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/save_vfp_d8_d15_regs.S b/contrib/compiler-rt/lib/arm/save_vfp_d8_d15_regs.S
index 92de61b..fbd21ba 100644
--- a/contrib/compiler-rt/lib/arm/save_vfp_d8_d15_regs.S
+++ b/contrib/compiler-rt/lib/arm/save_vfp_d8_d15_regs.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/softfloat-alias.list b/contrib/compiler-rt/lib/arm/softfloat-alias.list
new file mode 100644
index 0000000..cc6a4b3c
--- /dev/null
+++ b/contrib/compiler-rt/lib/arm/softfloat-alias.list
@@ -0,0 +1,21 @@
+#
+# These are soft float functions which can be
+# aliased to the *vfp functions on arm processors
+# that support floating point instructions.
+#
+___adddf3vfp ___adddf3
+___addsf3vfp ___addsf3
+___divdf3vfp ___divdf3
+___divsf3vfp ___divsf3
+___extendsfdf2vfp ___extendsfdf2
+___fixdfsivfp ___fixdfsi
+___fixsfsivfp ___fixsfsi
+___floatsidfvfp ___floatsidf
+___floatsisfvfp ___floatsisf
+___muldf3vfp ___muldf3
+___mulsf3vfp ___mulsf3
+___subdf3vfp ___subdf3
+___subsf3vfp ___subsf3
+___truncdfsf2vfp ___truncdfsf2
+___floatunssidfvfp ___floatunsidf
+___floatunssisfvfp ___floatunsisf
diff --git a/contrib/compiler-rt/lib/arm/subdf3vfp.S b/contrib/compiler-rt/lib/arm/subdf3vfp.S
index 8841600..ff53b30 100644
--- a/contrib/compiler-rt/lib/arm/subdf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/subdf3vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/subsf3vfp.S b/contrib/compiler-rt/lib/arm/subsf3vfp.S
index 4ead9c23..238f3f0 100644
--- a/contrib/compiler-rt/lib/arm/subsf3vfp.S
+++ b/contrib/compiler-rt/lib/arm/subsf3vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/switch16.S b/contrib/compiler-rt/lib/arm/switch16.S
index 05c7b98..e8f08c4 100644
--- a/contrib/compiler-rt/lib/arm/switch16.S
+++ b/contrib/compiler-rt/lib/arm/switch16.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/switch32.S b/contrib/compiler-rt/lib/arm/switch32.S
index a127cb7..7008fcc 100644
--- a/contrib/compiler-rt/lib/arm/switch32.S
+++ b/contrib/compiler-rt/lib/arm/switch32.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/switch8.S b/contrib/compiler-rt/lib/arm/switch8.S
index d05f6ac..e784b40 100644
--- a/contrib/compiler-rt/lib/arm/switch8.S
+++ b/contrib/compiler-rt/lib/arm/switch8.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/switchu8.S b/contrib/compiler-rt/lib/arm/switchu8.S
index faffddb..19bed2f 100644
--- a/contrib/compiler-rt/lib/arm/switchu8.S
+++ b/contrib/compiler-rt/lib/arm/switchu8.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/sync_synchronize.S b/contrib/compiler-rt/lib/arm/sync_synchronize.S
index 76fdab1..06dade9 100644
--- a/contrib/compiler-rt/lib/arm/sync_synchronize.S
+++ b/contrib/compiler-rt/lib/arm/sync_synchronize.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/truncdfsf2vfp.S b/contrib/compiler-rt/lib/arm/truncdfsf2vfp.S
index 5725e25..6e55c7f 100644
--- a/contrib/compiler-rt/lib/arm/truncdfsf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/truncdfsf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/udivmodsi4.S b/contrib/compiler-rt/lib/arm/udivmodsi4.S
new file mode 100644
index 0000000..d164a75
--- /dev/null
+++ b/contrib/compiler-rt/lib/arm/udivmodsi4.S
@@ -0,0 +1,80 @@
+/*===-- udivmodsi4.S - 32-bit unsigned integer divide and modulus ---------===//
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===//
+ *
+ * This file implements the __udivmodsi4 (32-bit unsigned integer divide and
+ * modulus) function for the ARM architecture. A naive digit-by-digit
+ * computation is employed for simplicity.
+ *
+ *===----------------------------------------------------------------------===*/
+
+#include "../assembly.h"
+
+#define ESTABLISH_FRAME \
+ push {r4, r7, lr} ;\
+ add r7, sp, #4
+#define CLEAR_FRAME_AND_RETURN \
+ pop {r4, r7, pc}
+
+#define a r0
+#define b r1
+#define i r3
+#define r r4
+#define q ip
+#define one lr
+
+.syntax unified
+.align 3
+DEFINE_COMPILERRT_FUNCTION(__udivmodsi4)
+// We use a simple digit by digit algorithm; before we get into the actual
+// divide loop, we must calculate the left-shift amount necessary to align
+// the MSB of the divisor with that of the dividend (If this shift is
+// negative, then the result is zero, and we early out). We also conjure a
+// bit mask of 1 to use in constructing the quotient, and initialize the
+// quotient to zero.
+ ESTABLISH_FRAME
+ clz r4, a
+ tst b, b // detect divide-by-zero
+ clz r3, b
+ mov q, #0
+ beq LOCAL_LABEL(return) // return 0 if b is zero.
+ mov one, #1
+ subs i, r3, r4
+ blt LOCAL_LABEL(return) // return 0 if MSB(a) < MSB(b)
+
+LOCAL_LABEL(mainLoop):
+// This loop basically implements the following:
+//
+// do {
+// if (a >= b << i) {
+// a -= b << i;
+// q |= 1 << i;
+// if (a == 0) break;
+// }
+// } while (--i)
+//
+// Note that this does not perform the final iteration (i == 0); by doing it
+// this way, we can merge the two branches which is a substantial win for
+// such a tight loop on current ARM architectures.
+ subs r, a, b, lsl i
+ orrhs q, q,one, lsl i
+ movhs a, r
+ subsne i, i, #1
+ bhi LOCAL_LABEL(mainLoop)
+
+// Do the final test subtraction and update of quotient (i == 0), as it is
+// not performed in the main loop.
+ subs r, a, b
+ orrhs q, #1
+ movhs a, r
+
+LOCAL_LABEL(return):
+// Store the remainder, and move the quotient to r0, then return.
+ str a, [r2]
+ mov r0, q
+ CLEAR_FRAME_AND_RETURN
diff --git a/contrib/compiler-rt/lib/arm/udivsi3.S b/contrib/compiler-rt/lib/arm/udivsi3.S
new file mode 100644
index 0000000..6d89665
--- /dev/null
+++ b/contrib/compiler-rt/lib/arm/udivsi3.S
@@ -0,0 +1,80 @@
+/*===-- udivsi3.S - 32-bit unsigned integer divide ------------------------===//
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===//
+ *
+ * This file implements the __udivsi3 (32-bit unsigned integer divide)
+ * function for the ARM architecture. A naive digit-by-digit computation is
+ * employed for simplicity.
+ *
+ *===----------------------------------------------------------------------===*/
+
+#include "../assembly.h"
+
+#define ESTABLISH_FRAME \
+ push {r7, lr} ;\
+ mov r7, sp
+#define CLEAR_FRAME_AND_RETURN \
+ pop {r7, pc}
+
+#define a r0
+#define b r1
+#define r r2
+#define i r3
+#define q ip
+#define one lr
+
+.syntax unified
+.align 3
+// Ok, APCS and AAPCS agree on 32 bit args, so it's safe to use the same routine.
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_uidiv, __udivsi3)
+DEFINE_COMPILERRT_FUNCTION(__udivsi3)
+// We use a simple digit by digit algorithm; before we get into the actual
+// divide loop, we must calculate the left-shift amount necessary to align
+// the MSB of the divisor with that of the dividend (If this shift is
+// negative, then the result is zero, and we early out). We also conjure a
+// bit mask of 1 to use in constructing the quotient, and initialize the
+// quotient to zero.
+ ESTABLISH_FRAME
+ clz r2, a
+ tst b, b // detect divide-by-zero
+ clz r3, b
+ mov q, #0
+ beq LOCAL_LABEL(return) // return 0 if b is zero.
+ mov one, #1
+ subs i, r3, r2
+ blt LOCAL_LABEL(return) // return 0 if MSB(a) < MSB(b)
+
+LOCAL_LABEL(mainLoop):
+// This loop basically implements the following:
+//
+// do {
+// if (a >= b << i) {
+// a -= b << i;
+// q |= 1 << i;
+// if (a == 0) break;
+// }
+// } while (--i)
+//
+// Note that this does not perform the final iteration (i == 0); by doing it
+// this way, we can merge the two branches which is a substantial win for
+// such a tight loop on current ARM architectures.
+ subs r, a, b, lsl i
+ orrhs q, q,one, lsl i
+ movhs a, r
+ subsne i, i, #1
+ bhi LOCAL_LABEL(mainLoop)
+
+// Do the final test subtraction and update of quotient (i == 0), as it is
+// not performed in the main loop.
+ subs r, a, b
+ orrhs q, #1
+
+LOCAL_LABEL(return):
+// Move the quotient to r0 and return.
+ mov r0, q
+ CLEAR_FRAME_AND_RETURN
diff --git a/contrib/compiler-rt/lib/arm/umodsi3.S b/contrib/compiler-rt/lib/arm/umodsi3.S
new file mode 100644
index 0000000..3a2ab2b
--- /dev/null
+++ b/contrib/compiler-rt/lib/arm/umodsi3.S
@@ -0,0 +1,58 @@
+/*===-- umodsi3.S - 32-bit unsigned integer modulus -----------------------===//
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ *===----------------------------------------------------------------------===//
+ *
+ * This file implements the __umodsi3 (32-bit unsigned integer modulus)
+ * function for the ARM architecture. A naive digit-by-digit computation is
+ * employed for simplicity.
+ *
+ *===----------------------------------------------------------------------===*/
+
+#include "../assembly.h"
+
+#define a r0
+#define b r1
+#define r r2
+#define i r3
+
+.syntax unified
+.align 3
+DEFINE_COMPILERRT_FUNCTION(__umodsi3)
+// We use a simple digit by digit algorithm; before we get into the actual
+// divide loop, we must calculate the left-shift amount necessary to align
+// the MSB of the divisor with that of the dividend.
+ clz r2, a
+ tst b, b // detect b == 0
+ clz r3, b
+ bxeq lr // return a if b == 0
+ subs i, r3, r2
+ bxlt lr // return a if MSB(a) < MSB(b)
+
+LOCAL_LABEL(mainLoop):
+// This loop basically implements the following:
+//
+// do {
+// if (a >= b << i) {
+// a -= b << i;
+// if (a == 0) break;
+// }
+// } while (--i)
+//
+// Note that this does not perform the final iteration (i == 0); by doing it
+// this way, we can merge the two branches which is a substantial win for
+// such a tight loop on current ARM architectures.
+ subs r, a, b, lsl i
+ movhs a, r
+ subsne i, i, #1
+ bhi LOCAL_LABEL(mainLoop)
+
+// Do the final test subtraction and update of remainder (i == 0), as it is
+// not performed in the main loop.
+ subs r, a, b
+ movhs a, r
+ bx lr
diff --git a/contrib/compiler-rt/lib/arm/unorddf2vfp.S b/contrib/compiler-rt/lib/arm/unorddf2vfp.S
index de00b07..9b52131 100644
--- a/contrib/compiler-rt/lib/arm/unorddf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/unorddf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/arm/unordsf2vfp.S b/contrib/compiler-rt/lib/arm/unordsf2vfp.S
index ab291a8..e486533 100644
--- a/contrib/compiler-rt/lib/arm/unordsf2vfp.S
+++ b/contrib/compiler-rt/lib/arm/unordsf2vfp.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/ashldi3.c b/contrib/compiler-rt/lib/ashldi3.c
index 993f71c..adce4e2 100644
--- a/contrib/compiler-rt/lib/ashldi3.c
+++ b/contrib/compiler-rt/lib/ashldi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -18,7 +19,9 @@
/* Precondition: 0 <= b < bits_in_dword */
-di_int
+ARM_EABI_FNALIAS(llsl, ashldi3);
+
+COMPILER_RT_ABI di_int
__ashldi3(di_int a, si_int b)
{
const int bits_in_word = (int)(sizeof(si_int) * CHAR_BIT);
diff --git a/contrib/compiler-rt/lib/ashlti3.c b/contrib/compiler-rt/lib/ashlti3.c
index 317de66..7042b53 100644
--- a/contrib/compiler-rt/lib/ashlti3.c
+++ b/contrib/compiler-rt/lib/ashlti3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/ashrdi3.c b/contrib/compiler-rt/lib/ashrdi3.c
index 8e27a11..03692a3 100644
--- a/contrib/compiler-rt/lib/ashrdi3.c
+++ b/contrib/compiler-rt/lib/ashrdi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -18,7 +19,9 @@
/* Precondition: 0 <= b < bits_in_dword */
-di_int
+ARM_EABI_FNALIAS(lasr, ashrdi3);
+
+COMPILER_RT_ABI di_int
__ashrdi3(di_int a, si_int b)
{
const int bits_in_word = (int)(sizeof(si_int) * CHAR_BIT);
diff --git a/contrib/compiler-rt/lib/ashrti3.c b/contrib/compiler-rt/lib/ashrti3.c
index 4eab247..4d16230 100644
--- a/contrib/compiler-rt/lib/ashrti3.c
+++ b/contrib/compiler-rt/lib/ashrti3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/assembly.h b/contrib/compiler-rt/lib/assembly.h
index c124e19..0ce83ac 100644
--- a/contrib/compiler-rt/lib/assembly.h
+++ b/contrib/compiler-rt/lib/assembly.h
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -22,33 +22,48 @@
#define SEPARATOR ;
#endif
-/* We can't use __USER_LABEL_PREFIX__ here, it isn't possible to concatenate the
- *values* of two macros. This is quite brittle, though. */
#if defined(__APPLE__)
-#define SYMBOL_NAME(name) _##name
+#define HIDDEN_DIRECTIVE .private_extern
+#define LOCAL_LABEL(name) L_##name
#else
-#define SYMBOL_NAME(name) name
+#define HIDDEN_DIRECTIVE .hidden
+#define LOCAL_LABEL(name) .L_##name
#endif
+#define GLUE2(a, b) a ## b
+#define GLUE(a, b) GLUE2(a, b)
+#define SYMBOL_NAME(name) GLUE(__USER_LABEL_PREFIX__, name)
+
#ifdef VISIBILITY_HIDDEN
-#define DEFINE_COMPILERRT_FUNCTION(name) \
- .globl SYMBOL_NAME(name) SEPARATOR \
- .hidden SYMBOL_NAME(name) SEPARATOR \
+#define DEFINE_COMPILERRT_FUNCTION(name) \
+ .globl SYMBOL_NAME(name) SEPARATOR \
+ HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR \
SYMBOL_NAME(name):
#else
-#define DEFINE_COMPILERRT_FUNCTION(name) \
- .globl SYMBOL_NAME(name) SEPARATOR \
+#define DEFINE_COMPILERRT_FUNCTION(name) \
+ .globl SYMBOL_NAME(name) SEPARATOR \
SYMBOL_NAME(name):
#endif
-#define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \
- .globl SYMBOL_NAME(name) SEPARATOR \
- .hidden SYMBOL_NAME(name) SEPARATOR \
+#define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \
+ .globl SYMBOL_NAME(name) SEPARATOR \
+ HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR \
SYMBOL_NAME(name):
#define DEFINE_COMPILERRT_PRIVATE_FUNCTION_UNMANGLED(name) \
- .globl name SEPARATOR \
- .hidden name SEPARATOR \
+ .globl name SEPARATOR \
+ HIDDEN_DIRECTIVE name SEPARATOR \
name:
+#define DEFINE_COMPILERRT_FUNCTION_ALIAS(name, target) \
+ .globl SYMBOL_NAME(name) SEPARATOR \
+ .set SYMBOL_NAME(name), SYMBOL_NAME(target) SEPARATOR
+
+#if defined (__ARM_EABI__)
+# define DEFINE_AEABI_FUNCTION_ALIAS(aeabi_name, name) \
+ DEFINE_COMPILERRT_FUNCTION_ALIAS(aeabi_name, name)
+#else
+# define DEFINE_AEABI_FUNCTION_ALIAS(aeabi_name, name)
+#endif
+
#endif /* COMPILERRT_ASSEMBLY_H */
diff --git a/contrib/compiler-rt/lib/clear_cache.c b/contrib/compiler-rt/lib/clear_cache.c
index 43db37a..7b59a7f 100644
--- a/contrib/compiler-rt/lib/clear_cache.c
+++ b/contrib/compiler-rt/lib/clear_cache.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*/
diff --git a/contrib/compiler-rt/lib/clzdi2.c b/contrib/compiler-rt/lib/clzdi2.c
index ea95396..c281945 100644
--- a/contrib/compiler-rt/lib/clzdi2.c
+++ b/contrib/compiler-rt/lib/clzdi2.c
@@ -1,9 +1,9 @@
/* ===-- clzdi2.c - Implement __clzdi2 -------------------------------------===
*
- * The LLVM Compiler Infrastructure
+ * The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -18,7 +19,7 @@
/* Precondition: a != 0 */
-si_int
+COMPILER_RT_ABI si_int
__clzdi2(di_int a)
{
dwords x;
diff --git a/contrib/compiler-rt/lib/clzsi2.c b/contrib/compiler-rt/lib/clzsi2.c
index 7e14af2..d0a6aea 100644
--- a/contrib/compiler-rt/lib/clzsi2.c
+++ b/contrib/compiler-rt/lib/clzsi2.c
@@ -1,9 +1,9 @@
/* ===-- clzsi2.c - Implement __clzsi2 -------------------------------------===
*
- * The LLVM Compiler Infrastructure
+ * The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -18,7 +19,7 @@
/* Precondition: a != 0 */
-si_int
+COMPILER_RT_ABI si_int
__clzsi2(si_int a)
{
su_int x = (su_int)a;
diff --git a/contrib/compiler-rt/lib/clzti2.c b/contrib/compiler-rt/lib/clzti2.c
index 805688f..7a650eb 100644
--- a/contrib/compiler-rt/lib/clzti2.c
+++ b/contrib/compiler-rt/lib/clzti2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/cmpdi2.c b/contrib/compiler-rt/lib/cmpdi2.c
index 0b87352..999c3d2 100644
--- a/contrib/compiler-rt/lib/cmpdi2.c
+++ b/contrib/compiler-rt/lib/cmpdi2.c
@@ -2,24 +2,25 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
- *
+ *
* This file implements __cmpdi2 for the compiler_rt library.
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
-/* Returns: if (a < b) returns 0
+/* Returns: if (a < b) returns 0
* if (a == b) returns 1
* if (a > b) returns 2
*/
-si_int
+COMPILER_RT_ABI si_int
__cmpdi2(di_int a, di_int b)
{
dwords x;
diff --git a/contrib/compiler-rt/lib/cmpti2.c b/contrib/compiler-rt/lib/cmpti2.c
index 90b3b75..b156fce 100644
--- a/contrib/compiler-rt/lib/cmpti2.c
+++ b/contrib/compiler-rt/lib/cmpti2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/comparedf2.c b/contrib/compiler-rt/lib/comparedf2.c
index 5c5ee9d..fe35fd8 100644
--- a/contrib/compiler-rt/lib/comparedf2.c
+++ b/contrib/compiler-rt/lib/comparedf2.c
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
diff --git a/contrib/compiler-rt/lib/comparesf2.c b/contrib/compiler-rt/lib/comparesf2.c
index fd05724..3f2e358 100644
--- a/contrib/compiler-rt/lib/comparesf2.c
+++ b/contrib/compiler-rt/lib/comparesf2.c
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
diff --git a/contrib/compiler-rt/lib/ctzdi2.c b/contrib/compiler-rt/lib/ctzdi2.c
index b49f2c7..b3d37d0 100644
--- a/contrib/compiler-rt/lib/ctzdi2.c
+++ b/contrib/compiler-rt/lib/ctzdi2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -18,7 +19,7 @@
/* Precondition: a != 0 */
-si_int
+COMPILER_RT_ABI si_int
__ctzdi2(di_int a)
{
dwords x;
diff --git a/contrib/compiler-rt/lib/ctzsi2.c b/contrib/compiler-rt/lib/ctzsi2.c
index 30d34c8..2ff0e5d 100644
--- a/contrib/compiler-rt/lib/ctzsi2.c
+++ b/contrib/compiler-rt/lib/ctzsi2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -18,7 +19,7 @@
/* Precondition: a != 0 */
-si_int
+COMPILER_RT_ABI si_int
__ctzsi2(si_int a)
{
su_int x = (su_int)a;
diff --git a/contrib/compiler-rt/lib/ctzti2.c b/contrib/compiler-rt/lib/ctzti2.c
index f2d41fe..1c9508f 100644
--- a/contrib/compiler-rt/lib/ctzti2.c
+++ b/contrib/compiler-rt/lib/ctzti2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/divdc3.c b/contrib/compiler-rt/lib/divdc3.c
index c96aefd..5f63298 100644
--- a/contrib/compiler-rt/lib/divdc3.c
+++ b/contrib/compiler-rt/lib/divdc3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/divdf3.c b/contrib/compiler-rt/lib/divdf3.c
index 21b8f09..925abd5 100644
--- a/contrib/compiler-rt/lib/divdf3.c
+++ b/contrib/compiler-rt/lib/divdf3.c
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
@@ -15,10 +15,13 @@
// underflow with correct rounding.
//
//===----------------------------------------------------------------------===//
+#include "abi.h"
#define DOUBLE_PRECISION
#include "fp_lib.h"
+ARM_EABI_FNALIAS(ddiv, divdf3);
+
fp_t __divdf3(fp_t a, fp_t b) {
const unsigned int aExponent = toRep(a) >> significandBits & maxExponent;
diff --git a/contrib/compiler-rt/lib/divdi3.c b/contrib/compiler-rt/lib/divdi3.c
index fccfb8b..d62df56 100644
--- a/contrib/compiler-rt/lib/divdi3.c
+++ b/contrib/compiler-rt/lib/divdi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,14 +11,15 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
-du_int __udivmoddi4(du_int a, du_int b, du_int* rem);
+du_int COMPILER_RT_ABI __udivmoddi4(du_int a, du_int b, du_int* rem);
/* Returns: a / b */
-di_int
+COMPILER_RT_ABI di_int
__divdi3(di_int a, di_int b)
{
const int bits_in_dword_m1 = (int)(sizeof(di_int) * CHAR_BIT) - 1;
diff --git a/contrib/compiler-rt/lib/divmoddi4.c b/contrib/compiler-rt/lib/divmoddi4.c
new file mode 100644
index 0000000..d3ca745
--- /dev/null
+++ b/contrib/compiler-rt/lib/divmoddi4.c
@@ -0,0 +1,30 @@
+/*===-- divmoddi4.c - Implement __divmoddi4 --------------------------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file implements __divmoddi4 for the compiler_rt library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+#include "abi.h"
+
+#include "int_lib.h"
+
+extern COMPILER_RT_ABI di_int __divdi3(di_int a, di_int b);
+
+ARM_EABI_FNALIAS(ldivmod, divmoddi4);
+
+/* Returns: a / b, *rem = a % b */
+
+COMPILER_RT_ABI di_int
+__divmoddi4(di_int a, di_int b, di_int* rem)
+{
+ di_int d = __divdi3(a,b);
+ *rem = a - (d*b);
+ return d;
+}
diff --git a/contrib/compiler-rt/lib/divmodsi4.c b/contrib/compiler-rt/lib/divmodsi4.c
new file mode 100644
index 0000000..4dc1978
--- /dev/null
+++ b/contrib/compiler-rt/lib/divmodsi4.c
@@ -0,0 +1,31 @@
+/*===-- divmodsi4.c - Implement __divmodsi4 --------------------------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file implements __divmodsi4 for the compiler_rt library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+#include "abi.h"
+
+#include "int_lib.h"
+
+extern COMPILER_RT_ABI si_int __divsi3(si_int a, si_int b);
+
+
+/* Returns: a / b, *rem = a % b */
+
+COMPILER_RT_ABI si_int
+__divmodsi4(si_int a, si_int b, si_int* rem)
+{
+ si_int d = __divsi3(a,b);
+ *rem = a - (d*b);
+ return d;
+}
+
+
diff --git a/contrib/compiler-rt/lib/divsc3.c b/contrib/compiler-rt/lib/divsc3.c
index c38c863..a05f429 100644
--- a/contrib/compiler-rt/lib/divsc3.c
+++ b/contrib/compiler-rt/lib/divsc3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/divsf3.c b/contrib/compiler-rt/lib/divsf3.c
index 03b7311..b733307 100644
--- a/contrib/compiler-rt/lib/divsf3.c
+++ b/contrib/compiler-rt/lib/divsf3.c
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
@@ -15,10 +15,13 @@
// underflow with correct rounding.
//
//===----------------------------------------------------------------------===//
+#include "abi.h"
#define SINGLE_PRECISION
#include "fp_lib.h"
+ARM_EABI_FNALIAS(fdiv, divsf3);
+
fp_t __divsf3(fp_t a, fp_t b) {
const unsigned int aExponent = toRep(a) >> significandBits & maxExponent;
diff --git a/contrib/compiler-rt/lib/divsi3.c b/contrib/compiler-rt/lib/divsi3.c
index 0eff6ef..01ef274 100644
--- a/contrib/compiler-rt/lib/divsi3.c
+++ b/contrib/compiler-rt/lib/divsi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,14 +11,17 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
-su_int __udivsi3(su_int n, su_int d);
+su_int COMPILER_RT_ABI __udivsi3(su_int n, su_int d);
/* Returns: a / b */
-si_int
+ARM_EABI_FNALIAS(idiv, divsi3);
+
+COMPILER_RT_ABI si_int
__divsi3(si_int a, si_int b)
{
const int bits_in_word_m1 = (int)(sizeof(si_int) * CHAR_BIT) - 1;
diff --git a/contrib/compiler-rt/lib/divti3.c b/contrib/compiler-rt/lib/divti3.c
index c752f6c..4ec3fa3 100644
--- a/contrib/compiler-rt/lib/divti3.c
+++ b/contrib/compiler-rt/lib/divti3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/divxc3.c b/contrib/compiler-rt/lib/divxc3.c
index 03357ae..f054d40 100644
--- a/contrib/compiler-rt/lib/divxc3.c
+++ b/contrib/compiler-rt/lib/divxc3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/enable_execute_stack.c b/contrib/compiler-rt/lib/enable_execute_stack.c
index 193e7db..7ab8e8d 100644
--- a/contrib/compiler-rt/lib/enable_execute_stack.c
+++ b/contrib/compiler-rt/lib/enable_execute_stack.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*/
diff --git a/contrib/compiler-rt/lib/endianness.h b/contrib/compiler-rt/lib/endianness.h
index 6d2587d..9b7e7c1 100644
--- a/contrib/compiler-rt/lib/endianness.h
+++ b/contrib/compiler-rt/lib/endianness.h
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/eprintf.c b/contrib/compiler-rt/lib/eprintf.c
index 786fe6a..7c79174 100644
--- a/contrib/compiler-rt/lib/eprintf.c
+++ b/contrib/compiler-rt/lib/eprintf.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*/
diff --git a/contrib/compiler-rt/lib/extendsfdf2.c b/contrib/compiler-rt/lib/extendsfdf2.c
index 025eb95..c0b628d 100644
--- a/contrib/compiler-rt/lib/extendsfdf2.c
+++ b/contrib/compiler-rt/lib/extendsfdf2.c
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
@@ -41,6 +41,8 @@
#include <stdint.h>
#include <limits.h>
+#include "abi.h"
+
typedef float src_t;
typedef uint32_t src_rep_t;
#define SRC_REP_C UINT32_C
@@ -67,6 +69,8 @@ static inline dst_t dstFromRep(dst_rep_t x) {
// End helper routines. Conversion implementation follows.
+ARM_EABI_FNALIAS(f2d, extendsfdf2);
+
dst_t __extendsfdf2(src_t a) {
// Various constants whose values follow from the type parameters.
diff --git a/contrib/compiler-rt/lib/ffsdi2.c b/contrib/compiler-rt/lib/ffsdi2.c
index 8c03d19..89f1b7b 100644
--- a/contrib/compiler-rt/lib/ffsdi2.c
+++ b/contrib/compiler-rt/lib/ffsdi2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -18,7 +19,7 @@
* the value zero if a is zero. The least significant bit is index one.
*/
-si_int
+COMPILER_RT_ABI si_int
__ffsdi2(di_int a)
{
dwords x;
diff --git a/contrib/compiler-rt/lib/ffsti2.c b/contrib/compiler-rt/lib/ffsti2.c
index 0139eb1..948c696 100644
--- a/contrib/compiler-rt/lib/ffsti2.c
+++ b/contrib/compiler-rt/lib/ffsti2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/fixdfdi.c b/contrib/compiler-rt/lib/fixdfdi.c
index 3d3116c..85a456d 100644
--- a/contrib/compiler-rt/lib/fixdfdi.c
+++ b/contrib/compiler-rt/lib/fixdfdi.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -23,6 +24,8 @@
/* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */
+ARM_EABI_FNALIAS(d2lz, fixdfdi);
+
di_int
__fixdfdi(double a)
{
diff --git a/contrib/compiler-rt/lib/fixdfsi.c b/contrib/compiler-rt/lib/fixdfsi.c
index 7d17aed..fbcf147 100644
--- a/contrib/compiler-rt/lib/fixdfsi.c
+++ b/contrib/compiler-rt/lib/fixdfsi.c
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
@@ -12,10 +12,15 @@
// conversion is undefined for out of range values in the C standard.
//
//===----------------------------------------------------------------------===//
+#include "abi.h"
#define DOUBLE_PRECISION
#include "fp_lib.h"
+#include "int_lib.h"
+
+ARM_EABI_FNALIAS(d2iz, fixdfsi);
+
int __fixdfsi(fp_t a) {
// Break a into sign, exponent, significand
diff --git a/contrib/compiler-rt/lib/fixdfti.c b/contrib/compiler-rt/lib/fixdfti.c
index 359b84e..4140d14 100644
--- a/contrib/compiler-rt/lib/fixdfti.c
+++ b/contrib/compiler-rt/lib/fixdfti.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/fixsfdi.c b/contrib/compiler-rt/lib/fixsfdi.c
index 08f1524..d80e33e 100644
--- a/contrib/compiler-rt/lib/fixsfdi.c
+++ b/contrib/compiler-rt/lib/fixsfdi.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -23,7 +24,9 @@
/* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */
-di_int
+ARM_EABI_FNALIAS(d2lz, fixsfdi);
+
+COMPILER_RT_ABI di_int
__fixsfdi(float a)
{
float_bits fb;
diff --git a/contrib/compiler-rt/lib/fixsfsi.c b/contrib/compiler-rt/lib/fixsfsi.c
index ff79377..67749a5 100644
--- a/contrib/compiler-rt/lib/fixsfsi.c
+++ b/contrib/compiler-rt/lib/fixsfsi.c
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
@@ -12,12 +12,15 @@
// conversion is undefined for out of range values in the C standard.
//
//===----------------------------------------------------------------------===//
+#include "abi.h"
#define SINGLE_PRECISION
#include "fp_lib.h"
-int __fixsfsi(fp_t a) {
-
+ARM_EABI_FNALIAS(f2iz, fixsfsi);
+
+COMPILER_RT_ABI int
+__fixsfsi(fp_t a) {
// Break a into sign, exponent, significand
const rep_t aRep = toRep(a);
const rep_t aAbs = aRep & absMask;
diff --git a/contrib/compiler-rt/lib/fixsfti.c b/contrib/compiler-rt/lib/fixsfti.c
index 95992fe..c64e5ae 100644
--- a/contrib/compiler-rt/lib/fixsfti.c
+++ b/contrib/compiler-rt/lib/fixsfti.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/fixunsdfdi.c b/contrib/compiler-rt/lib/fixunsdfdi.c
index bdcee13..d80b84a 100644
--- a/contrib/compiler-rt/lib/fixunsdfdi.c
+++ b/contrib/compiler-rt/lib/fixunsdfdi.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -26,7 +27,9 @@
/* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */
-du_int
+ARM_EABI_FNALIAS(d2ulz, fixunsdfdi);
+
+COMPILER_RT_ABI du_int
__fixunsdfdi(double a)
{
double_bits fb;
diff --git a/contrib/compiler-rt/lib/fixunsdfsi.c b/contrib/compiler-rt/lib/fixunsdfsi.c
index a0cba79..ecdfb5d 100644
--- a/contrib/compiler-rt/lib/fixunsdfsi.c
+++ b/contrib/compiler-rt/lib/fixunsdfsi.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -26,7 +27,9 @@
/* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */
-su_int
+ARM_EABI_FNALIAS(d2uiz, fixunsdfsi);
+
+COMPILER_RT_ABI su_int
__fixunsdfsi(double a)
{
double_bits fb;
diff --git a/contrib/compiler-rt/lib/fixunsdfti.c b/contrib/compiler-rt/lib/fixunsdfti.c
index c1cd72d..524a207 100644
--- a/contrib/compiler-rt/lib/fixunsdfti.c
+++ b/contrib/compiler-rt/lib/fixunsdfti.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/fixunssfdi.c b/contrib/compiler-rt/lib/fixunssfdi.c
index 3837bd8..1506420 100644
--- a/contrib/compiler-rt/lib/fixunssfdi.c
+++ b/contrib/compiler-rt/lib/fixunssfdi.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,9 +11,9 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
-
/* Returns: convert a to a unsigned long long, rounding toward zero.
* Negative values all become zero.
*/
@@ -26,7 +26,9 @@
/* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */
-du_int
+ARM_EABI_FNALIAS(f2ulz, fixunssfdi);
+
+COMPILER_RT_ABI du_int
__fixunssfdi(float a)
{
float_bits fb;
diff --git a/contrib/compiler-rt/lib/fixunssfsi.c b/contrib/compiler-rt/lib/fixunssfsi.c
index a001cd4..dbaa511 100644
--- a/contrib/compiler-rt/lib/fixunssfsi.c
+++ b/contrib/compiler-rt/lib/fixunssfsi.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -26,7 +27,9 @@
/* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */
-su_int
+ARM_EABI_FNALIAS(f2uiz, fixunssfsi);
+
+COMPILER_RT_ABI su_int
__fixunssfsi(float a)
{
float_bits fb;
diff --git a/contrib/compiler-rt/lib/fixunssfti.c b/contrib/compiler-rt/lib/fixunssfti.c
index 20b7e76..b807910 100644
--- a/contrib/compiler-rt/lib/fixunssfti.c
+++ b/contrib/compiler-rt/lib/fixunssfti.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/fixunsxfdi.c b/contrib/compiler-rt/lib/fixunsxfdi.c
index 872727b..6c817d8e 100644
--- a/contrib/compiler-rt/lib/fixunsxfdi.c
+++ b/contrib/compiler-rt/lib/fixunsxfdi.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/fixunsxfsi.c b/contrib/compiler-rt/lib/fixunsxfsi.c
index c9a607a..b9da86c 100644
--- a/contrib/compiler-rt/lib/fixunsxfsi.c
+++ b/contrib/compiler-rt/lib/fixunsxfsi.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/fixunsxfti.c b/contrib/compiler-rt/lib/fixunsxfti.c
index d0bd512..f0e16db 100644
--- a/contrib/compiler-rt/lib/fixunsxfti.c
+++ b/contrib/compiler-rt/lib/fixunsxfti.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/fixxfdi.c b/contrib/compiler-rt/lib/fixxfdi.c
index de6f818..9592ce4 100644
--- a/contrib/compiler-rt/lib/fixxfdi.c
+++ b/contrib/compiler-rt/lib/fixxfdi.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/fixxfti.c b/contrib/compiler-rt/lib/fixxfti.c
index c224801..1022770 100644
--- a/contrib/compiler-rt/lib/fixxfti.c
+++ b/contrib/compiler-rt/lib/fixxfti.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/floatdidf.c b/contrib/compiler-rt/lib/floatdidf.c
index a0f501b..5ba9526 100644
--- a/contrib/compiler-rt/lib/floatdidf.c
+++ b/contrib/compiler-rt/lib/floatdidf.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
*===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
*===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
#include <float.h>
@@ -23,13 +24,15 @@
/* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */
+ARM_EABI_FNALIAS(l2d, floatdidf);
+
#ifndef __SOFT_FP__
/* Support for systems that have hardware floating-point; we'll set the inexact flag
* as a side-effect of this computation.
*/
#include <stdint.h>
-double
+COMPILER_RT_ABI double
__floatdidf(di_int a)
{
static const double twop52 = 0x1.0p52;
@@ -49,7 +52,7 @@ __floatdidf(di_int a)
* set, and we don't want to code-gen to an unknown soft-float implementation.
*/
-double
+COMPILER_RT_ABI double
__floatdidf(di_int a)
{
if (a == 0)
diff --git a/contrib/compiler-rt/lib/floatdisf.c b/contrib/compiler-rt/lib/floatdisf.c
index 1925f15..4dc13ca 100644
--- a/contrib/compiler-rt/lib/floatdisf.c
+++ b/contrib/compiler-rt/lib/floatdisf.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
*===----------------------------------------------------------------------===
*
@@ -12,7 +12,7 @@
*===----------------------------------------------------------------------===
*/
-#include "int_lib.h"
+#include "abi.h"
#include <float.h>
/* Returns: convert a to a float, rounding toward even.*/
@@ -23,7 +23,11 @@
/* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */
-float
+#include "int_lib.h"
+
+ARM_EABI_FNALIAS(l2f, floatdisf);
+
+COMPILER_RT_ABI float
__floatdisf(di_int a)
{
if (a == 0)
diff --git a/contrib/compiler-rt/lib/floatdixf.c b/contrib/compiler-rt/lib/floatdixf.c
index bfda367..ebf62db 100644
--- a/contrib/compiler-rt/lib/floatdixf.c
+++ b/contrib/compiler-rt/lib/floatdixf.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/floatsidf.c b/contrib/compiler-rt/lib/floatsidf.c
index a13ab8f..7227335 100644
--- a/contrib/compiler-rt/lib/floatsidf.c
+++ b/contrib/compiler-rt/lib/floatsidf.c
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
@@ -12,10 +12,15 @@
// mode.
//
//===----------------------------------------------------------------------===//
+#include "abi.h"
#define DOUBLE_PRECISION
#include "fp_lib.h"
+#include "int_lib.h"
+
+ARM_EABI_FNALIAS(i2d, floatsidf);
+
fp_t __floatsidf(int a) {
const int aWidth = sizeof a * CHAR_BIT;
diff --git a/contrib/compiler-rt/lib/floatsisf.c b/contrib/compiler-rt/lib/floatsisf.c
index 4a62975..e5250ff 100644
--- a/contrib/compiler-rt/lib/floatsisf.c
+++ b/contrib/compiler-rt/lib/floatsisf.c
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
@@ -12,10 +12,15 @@
// mode.
//
//===----------------------------------------------------------------------===//
+#include "abi.h"
#define SINGLE_PRECISION
#include "fp_lib.h"
+#include "int_lib.h"
+
+ARM_EABI_FNALIAS(i2f, floatsisf);
+
fp_t __floatsisf(int a) {
const int aWidth = sizeof a * CHAR_BIT;
diff --git a/contrib/compiler-rt/lib/floattidf.c b/contrib/compiler-rt/lib/floattidf.c
index 274f585..f61844d 100644
--- a/contrib/compiler-rt/lib/floattidf.c
+++ b/contrib/compiler-rt/lib/floattidf.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/floattisf.c b/contrib/compiler-rt/lib/floattisf.c
index 72f3748..7eb761d 100644
--- a/contrib/compiler-rt/lib/floattisf.c
+++ b/contrib/compiler-rt/lib/floattisf.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/floattixf.c b/contrib/compiler-rt/lib/floattixf.c
index 77d9060..e4bcb5f 100644
--- a/contrib/compiler-rt/lib/floattixf.c
+++ b/contrib/compiler-rt/lib/floattixf.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/floatundidf.c b/contrib/compiler-rt/lib/floatundidf.c
index 1f304c5..e74e9d8 100644
--- a/contrib/compiler-rt/lib/floatundidf.c
+++ b/contrib/compiler-rt/lib/floatundidf.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -12,7 +12,7 @@
* ===----------------------------------------------------------------------===
*/
-#include "int_lib.h"
+#include "abi.h"
#include <float.h>
/* Returns: convert a to a double, rounding toward even. */
@@ -23,6 +23,10 @@
/* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */
+#include "int_lib.h"
+
+ARM_EABI_FNALIAS(ul2d, floatundidf);
+
#ifndef __SOFT_FP__
/* Support for systems that have hardware floating-point; we'll set the inexact flag
* as a side-effect of this computation.
@@ -30,7 +34,7 @@
#include <stdint.h>
-double
+COMPILER_RT_ABI double
__floatundidf(du_int a)
{
static const double twop52 = 0x1.0p52;
@@ -52,7 +56,7 @@ __floatundidf(du_int a)
* set, and we don't want to code-gen to an unknown soft-float implementation.
*/
-double
+COMPILER_RT_ABI double
__floatundidf(du_int a)
{
if (a == 0)
diff --git a/contrib/compiler-rt/lib/floatundisf.c b/contrib/compiler-rt/lib/floatundisf.c
index 79b4b82..eea45a7 100644
--- a/contrib/compiler-rt/lib/floatundisf.c
+++ b/contrib/compiler-rt/lib/floatundisf.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -12,7 +12,7 @@
*===----------------------------------------------------------------------===
*/
-#include "int_lib.h"
+#include "abi.h"
#include <float.h>
/* Returns: convert a to a float, rounding toward even. */
@@ -23,7 +23,11 @@
/* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */
-float
+#include "int_lib.h"
+
+ARM_EABI_FNALIAS(ul2f, floatundisf);
+
+COMPILER_RT_ABI float
__floatundisf(du_int a)
{
if (a == 0)
diff --git a/contrib/compiler-rt/lib/floatundixf.c b/contrib/compiler-rt/lib/floatundixf.c
index bc9582f..64f7662 100644
--- a/contrib/compiler-rt/lib/floatundixf.c
+++ b/contrib/compiler-rt/lib/floatundixf.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/floatunsidf.c b/contrib/compiler-rt/lib/floatunsidf.c
index 05242c1..3756299 100644
--- a/contrib/compiler-rt/lib/floatunsidf.c
+++ b/contrib/compiler-rt/lib/floatunsidf.c
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
@@ -12,10 +12,15 @@
// mode.
//
//===----------------------------------------------------------------------===//
+#include "abi.h"
#define DOUBLE_PRECISION
#include "fp_lib.h"
+#include "int_lib.h"
+
+ARM_EABI_FNALIAS(ui2d, floatunsidf);
+
fp_t __floatunsidf(unsigned int a) {
const int aWidth = sizeof a * CHAR_BIT;
diff --git a/contrib/compiler-rt/lib/floatunsisf.c b/contrib/compiler-rt/lib/floatunsisf.c
index 31c0644..14ef103 100644
--- a/contrib/compiler-rt/lib/floatunsisf.c
+++ b/contrib/compiler-rt/lib/floatunsisf.c
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
@@ -12,10 +12,15 @@
// mode.
//
//===----------------------------------------------------------------------===//
+#include "abi.h"
#define SINGLE_PRECISION
#include "fp_lib.h"
+#include "int_lib.h"
+
+ARM_EABI_FNALIAS(ui2f, floatunsisf);
+
fp_t __floatunsisf(unsigned int a) {
const int aWidth = sizeof a * CHAR_BIT;
diff --git a/contrib/compiler-rt/lib/floatuntidf.c b/contrib/compiler-rt/lib/floatuntidf.c
index 51d8b28..bab7483 100644
--- a/contrib/compiler-rt/lib/floatuntidf.c
+++ b/contrib/compiler-rt/lib/floatuntidf.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/floatuntisf.c b/contrib/compiler-rt/lib/floatuntisf.c
index 328f39b..0ab6d7e 100644
--- a/contrib/compiler-rt/lib/floatuntisf.c
+++ b/contrib/compiler-rt/lib/floatuntisf.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/floatuntixf.c b/contrib/compiler-rt/lib/floatuntixf.c
index e82d0c1..a84709a 100644
--- a/contrib/compiler-rt/lib/floatuntixf.c
+++ b/contrib/compiler-rt/lib/floatuntixf.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/fp_lib.h b/contrib/compiler-rt/lib/fp_lib.h
index eac670d..6c9455a 100644
--- a/contrib/compiler-rt/lib/fp_lib.h
+++ b/contrib/compiler-rt/lib/fp_lib.h
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
diff --git a/contrib/compiler-rt/lib/gcc_personality_v0.c b/contrib/compiler-rt/lib/gcc_personality_v0.c
index 5940190..c840eef 100644
--- a/contrib/compiler-rt/lib/gcc_personality_v0.c
+++ b/contrib/compiler-rt/lib/gcc_personality_v0.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/i386/ashldi3.S b/contrib/compiler-rt/lib/i386/ashldi3.S
index af6f98b..5488ad6 100644
--- a/contrib/compiler-rt/lib/i386/ashldi3.S
+++ b/contrib/compiler-rt/lib/i386/ashldi3.S
@@ -1,5 +1,5 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
#include "../assembly.h"
diff --git a/contrib/compiler-rt/lib/i386/ashrdi3.S b/contrib/compiler-rt/lib/i386/ashrdi3.S
index 346f9b1..b1445dd 100644
--- a/contrib/compiler-rt/lib/i386/ashrdi3.S
+++ b/contrib/compiler-rt/lib/i386/ashrdi3.S
@@ -1,5 +1,5 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
#include "../assembly.h"
diff --git a/contrib/compiler-rt/lib/i386/divdi3.S b/contrib/compiler-rt/lib/i386/divdi3.S
index 5ad530c..69593e3 100644
--- a/contrib/compiler-rt/lib/i386/divdi3.S
+++ b/contrib/compiler-rt/lib/i386/divdi3.S
@@ -1,5 +1,5 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
#include "../assembly.h"
diff --git a/contrib/compiler-rt/lib/i386/floatdidf.S b/contrib/compiler-rt/lib/i386/floatdidf.S
index 3a526ea..a953d26 100644
--- a/contrib/compiler-rt/lib/i386/floatdidf.S
+++ b/contrib/compiler-rt/lib/i386/floatdidf.S
@@ -1,5 +1,5 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
#include "../assembly.h"
diff --git a/contrib/compiler-rt/lib/i386/floatdisf.S b/contrib/compiler-rt/lib/i386/floatdisf.S
index 741e4a6..a98a46e 100644
--- a/contrib/compiler-rt/lib/i386/floatdisf.S
+++ b/contrib/compiler-rt/lib/i386/floatdisf.S
@@ -1,5 +1,5 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
#include "../assembly.h"
diff --git a/contrib/compiler-rt/lib/i386/floatdixf.S b/contrib/compiler-rt/lib/i386/floatdixf.S
index f0271ab..412976f 100644
--- a/contrib/compiler-rt/lib/i386/floatdixf.S
+++ b/contrib/compiler-rt/lib/i386/floatdixf.S
@@ -1,5 +1,5 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
#include "../assembly.h"
diff --git a/contrib/compiler-rt/lib/i386/floatundidf.S b/contrib/compiler-rt/lib/i386/floatundidf.S
index 7186a35..6bba7e1 100644
--- a/contrib/compiler-rt/lib/i386/floatundidf.S
+++ b/contrib/compiler-rt/lib/i386/floatundidf.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
diff --git a/contrib/compiler-rt/lib/i386/floatundisf.S b/contrib/compiler-rt/lib/i386/floatundisf.S
index 070820c..1afd1d4 100644
--- a/contrib/compiler-rt/lib/i386/floatundisf.S
+++ b/contrib/compiler-rt/lib/i386/floatundisf.S
@@ -1,5 +1,5 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
#include "../assembly.h"
diff --git a/contrib/compiler-rt/lib/i386/floatundixf.S b/contrib/compiler-rt/lib/i386/floatundixf.S
index 2cf6d5c..6e6710b 100644
--- a/contrib/compiler-rt/lib/i386/floatundixf.S
+++ b/contrib/compiler-rt/lib/i386/floatundixf.S
@@ -1,5 +1,5 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
#include "../assembly.h"
diff --git a/contrib/compiler-rt/lib/i386/lshrdi3.S b/contrib/compiler-rt/lib/i386/lshrdi3.S
index 74937d2..cf411f2 100644
--- a/contrib/compiler-rt/lib/i386/lshrdi3.S
+++ b/contrib/compiler-rt/lib/i386/lshrdi3.S
@@ -1,5 +1,5 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
#include "../assembly.h"
diff --git a/contrib/compiler-rt/lib/i386/moddi3.S b/contrib/compiler-rt/lib/i386/moddi3.S
index 85f5b38..8839cfc 100644
--- a/contrib/compiler-rt/lib/i386/moddi3.S
+++ b/contrib/compiler-rt/lib/i386/moddi3.S
@@ -1,5 +1,5 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
#include "../assembly.h"
diff --git a/contrib/compiler-rt/lib/i386/muldi3.S b/contrib/compiler-rt/lib/i386/muldi3.S
index 5f99f6a..e56a355 100644
--- a/contrib/compiler-rt/lib/i386/muldi3.S
+++ b/contrib/compiler-rt/lib/i386/muldi3.S
@@ -1,5 +1,5 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
#include "../assembly.h"
diff --git a/contrib/compiler-rt/lib/i386/udivdi3.S b/contrib/compiler-rt/lib/i386/udivdi3.S
index 77936f8..5abeaea 100644
--- a/contrib/compiler-rt/lib/i386/udivdi3.S
+++ b/contrib/compiler-rt/lib/i386/udivdi3.S
@@ -1,5 +1,5 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
#include "../assembly.h"
diff --git a/contrib/compiler-rt/lib/i386/umoddi3.S b/contrib/compiler-rt/lib/i386/umoddi3.S
index 3cf8aeb..7fd8485 100644
--- a/contrib/compiler-rt/lib/i386/umoddi3.S
+++ b/contrib/compiler-rt/lib/i386/umoddi3.S
@@ -1,5 +1,5 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
#include "../assembly.h"
diff --git a/contrib/compiler-rt/lib/int_lib.h b/contrib/compiler-rt/lib/int_lib.h
index 912a12f..e1fd6b7 100644
--- a/contrib/compiler-rt/lib/int_lib.h
+++ b/contrib/compiler-rt/lib/int_lib.h
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -20,6 +20,7 @@
/* Assumption: right shift of signed negative is arithmetic shift */
#include <limits.h>
+#include <stdint.h>
#include "endianness.h"
#include <math.h>
diff --git a/contrib/compiler-rt/lib/lshrdi3.c b/contrib/compiler-rt/lib/lshrdi3.c
index 57484ee..911edb1 100644
--- a/contrib/compiler-rt/lib/lshrdi3.c
+++ b/contrib/compiler-rt/lib/lshrdi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -18,7 +19,9 @@
/* Precondition: 0 <= b < bits_in_dword */
-di_int
+ARM_EABI_FNALIAS(llsr, lshrdi3);
+
+COMPILER_RT_ABI di_int
__lshrdi3(di_int a, si_int b)
{
const int bits_in_word = (int)(sizeof(si_int) * CHAR_BIT);
diff --git a/contrib/compiler-rt/lib/lshrti3.c b/contrib/compiler-rt/lib/lshrti3.c
index 3272c9c..5fdd99e 100644
--- a/contrib/compiler-rt/lib/lshrti3.c
+++ b/contrib/compiler-rt/lib/lshrti3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/moddi3.c b/contrib/compiler-rt/lib/moddi3.c
index 4533555..af0a8083 100644
--- a/contrib/compiler-rt/lib/moddi3.c
+++ b/contrib/compiler-rt/lib/moddi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,14 +11,15 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
-du_int __udivmoddi4(du_int a, du_int b, du_int* rem);
+COMPILER_RT_ABI du_int __udivmoddi4(du_int a, du_int b, du_int* rem);
/* Returns: a % b */
-di_int
+COMPILER_RT_ABI di_int
__moddi3(di_int a, di_int b)
{
const int bits_in_dword_m1 = (int)(sizeof(di_int) * CHAR_BIT) - 1;
diff --git a/contrib/compiler-rt/lib/modsi3.c b/contrib/compiler-rt/lib/modsi3.c
index c9214a2..05ce806 100644
--- a/contrib/compiler-rt/lib/modsi3.c
+++ b/contrib/compiler-rt/lib/modsi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,13 +11,16 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
+su_int COMPILER_RT_ABI __divsi3(si_int a, si_int b);
+
/* Returns: a % b */
-si_int
+COMPILER_RT_ABI si_int
__modsi3(si_int a, si_int b)
{
- return a - (a / b) * b;
+ return a - __divsi3(a, b) * b;
}
diff --git a/contrib/compiler-rt/lib/modti3.c b/contrib/compiler-rt/lib/modti3.c
index 75d688e..dbe5e94 100644
--- a/contrib/compiler-rt/lib/modti3.c
+++ b/contrib/compiler-rt/lib/modti3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/muldc3.c b/contrib/compiler-rt/lib/muldc3.c
index c048d84..9f9bd2a 100644
--- a/contrib/compiler-rt/lib/muldc3.c
+++ b/contrib/compiler-rt/lib/muldc3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/muldf3.c b/contrib/compiler-rt/lib/muldf3.c
index 63a473e..f402cfb 100644
--- a/contrib/compiler-rt/lib/muldf3.c
+++ b/contrib/compiler-rt/lib/muldf3.c
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
@@ -11,11 +11,15 @@
// with the IEEE-754 default rounding (to nearest, ties to even).
//
//===----------------------------------------------------------------------===//
+#include "abi.h"
#define DOUBLE_PRECISION
#include "fp_lib.h"
-fp_t __muldf3(fp_t a, fp_t b) {
+ARM_EABI_FNALIAS(dmul, muldf3);
+
+COMPILER_RT_ABI fp_t
+__muldf3(fp_t a, fp_t b) {
const unsigned int aExponent = toRep(a) >> significandBits & maxExponent;
const unsigned int bExponent = toRep(b) >> significandBits & maxExponent;
diff --git a/contrib/compiler-rt/lib/muldi3.c b/contrib/compiler-rt/lib/muldi3.c
index 38963b7..e6322bf 100644
--- a/contrib/compiler-rt/lib/muldi3.c
+++ b/contrib/compiler-rt/lib/muldi3.c
@@ -2,15 +2,16 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
* This file implements __muldi3 for the compiler_rt library.
*
* ===----------------------------------------------------------------------===
- */
+ */
+#include "abi.h"
#include "int_lib.h"
@@ -40,7 +41,9 @@ __muldsi3(su_int a, su_int b)
/* Returns: a * b */
-di_int
+ARM_EABI_FNALIAS(lmul, muldi3);
+
+COMPILER_RT_ABI di_int
__muldi3(di_int a, di_int b)
{
dwords x;
diff --git a/contrib/compiler-rt/lib/mulsc3.c b/contrib/compiler-rt/lib/mulsc3.c
index c7b9f64..a878ba1 100644
--- a/contrib/compiler-rt/lib/mulsc3.c
+++ b/contrib/compiler-rt/lib/mulsc3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/mulsf3.c b/contrib/compiler-rt/lib/mulsf3.c
index 6bd2f9d..bf46e14 100644
--- a/contrib/compiler-rt/lib/mulsf3.c
+++ b/contrib/compiler-rt/lib/mulsf3.c
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
@@ -11,11 +11,15 @@
// with the IEEE-754 default rounding (to nearest, ties to even).
//
//===----------------------------------------------------------------------===//
+#include "abi.h"
#define SINGLE_PRECISION
#include "fp_lib.h"
-fp_t __mulsf3(fp_t a, fp_t b) {
+ARM_EABI_FNALIAS(fmul, mulsf3);
+
+COMPILER_RT_ABI fp_t
+__mulsf3(fp_t a, fp_t b) {
const unsigned int aExponent = toRep(a) >> significandBits & maxExponent;
const unsigned int bExponent = toRep(b) >> significandBits & maxExponent;
diff --git a/contrib/compiler-rt/lib/multi3.c b/contrib/compiler-rt/lib/multi3.c
index 13a3867..ad8ab3f 100644
--- a/contrib/compiler-rt/lib/multi3.c
+++ b/contrib/compiler-rt/lib/multi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
diff --git a/contrib/compiler-rt/lib/mulvdi3.c b/contrib/compiler-rt/lib/mulvdi3.c
index 295ae18..fcbb5b3 100644
--- a/contrib/compiler-rt/lib/mulvdi3.c
+++ b/contrib/compiler-rt/lib/mulvdi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/mulvsi3.c b/contrib/compiler-rt/lib/mulvsi3.c
index b4a509b..6271cd4 100644
--- a/contrib/compiler-rt/lib/mulvsi3.c
+++ b/contrib/compiler-rt/lib/mulvsi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/mulvti3.c b/contrib/compiler-rt/lib/mulvti3.c
index 778222e..7da9187 100644
--- a/contrib/compiler-rt/lib/mulvti3.c
+++ b/contrib/compiler-rt/lib/mulvti3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/mulxc3.c b/contrib/compiler-rt/lib/mulxc3.c
index 94895f2..b5ae865 100644
--- a/contrib/compiler-rt/lib/mulxc3.c
+++ b/contrib/compiler-rt/lib/mulxc3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/negdf2.c b/contrib/compiler-rt/lib/negdf2.c
index 527b068..b47f397 100644
--- a/contrib/compiler-rt/lib/negdf2.c
+++ b/contrib/compiler-rt/lib/negdf2.c
@@ -2,18 +2,21 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file implements double-precision soft-float negation.
//
//===----------------------------------------------------------------------===//
+#include "abi.h"
#define DOUBLE_PRECISION
#include "fp_lib.h"
+ARM_EABI_FNALIAS(dneg, negdf2);
+
fp_t __negdf2(fp_t a) {
return fromRep(toRep(a) ^ signBit);
}
diff --git a/contrib/compiler-rt/lib/negdi2.c b/contrib/compiler-rt/lib/negdi2.c
index 707b0dd..b000dda 100644
--- a/contrib/compiler-rt/lib/negdi2.c
+++ b/contrib/compiler-rt/lib/negdi2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/negsf2.c b/contrib/compiler-rt/lib/negsf2.c
index 5e91e87..98f9fc0 100644
--- a/contrib/compiler-rt/lib/negsf2.c
+++ b/contrib/compiler-rt/lib/negsf2.c
@@ -2,18 +2,22 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file implements single-precision soft-float negation.
//
//===----------------------------------------------------------------------===//
+#include "abi.h"
#define SINGLE_PRECISION
#include "fp_lib.h"
-fp_t __negsf2(fp_t a) {
+ARM_EABI_FNALIAS(fneg, negsf2);
+
+COMPILER_RT_ABI fp_t
+__negsf2(fp_t a) {
return fromRep(toRep(a) ^ signBit);
}
diff --git a/contrib/compiler-rt/lib/negti2.c b/contrib/compiler-rt/lib/negti2.c
index 6ce6a04..774e808 100644
--- a/contrib/compiler-rt/lib/negti2.c
+++ b/contrib/compiler-rt/lib/negti2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/negvdi2.c b/contrib/compiler-rt/lib/negvdi2.c
index 0baf377..aafaa9d 100644
--- a/contrib/compiler-rt/lib/negvdi2.c
+++ b/contrib/compiler-rt/lib/negvdi2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
#include <stdlib.h>
@@ -19,7 +20,7 @@
/* Effects: aborts if -a overflows */
-di_int
+COMPILER_RT_ABI di_int
__negvdi2(di_int a)
{
const di_int MIN = (di_int)1 << ((int)(sizeof(di_int) * CHAR_BIT)-1);
diff --git a/contrib/compiler-rt/lib/negvsi2.c b/contrib/compiler-rt/lib/negvsi2.c
index e5a36a5..559ea18 100644
--- a/contrib/compiler-rt/lib/negvsi2.c
+++ b/contrib/compiler-rt/lib/negvsi2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
#include <stdlib.h>
@@ -19,7 +20,7 @@
/* Effects: aborts if -a overflows */
-si_int
+COMPILER_RT_ABI si_int
__negvsi2(si_int a)
{
const si_int MIN = (si_int)1 << ((int)(sizeof(si_int) * CHAR_BIT)-1);
diff --git a/contrib/compiler-rt/lib/negvti2.c b/contrib/compiler-rt/lib/negvti2.c
index d56e1e3..d931305 100644
--- a/contrib/compiler-rt/lib/negvti2.c
+++ b/contrib/compiler-rt/lib/negvti2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
*===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/paritydi2.c b/contrib/compiler-rt/lib/paritydi2.c
index 90e5559..e7bebf6 100644
--- a/contrib/compiler-rt/lib/paritydi2.c
+++ b/contrib/compiler-rt/lib/paritydi2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,14 +11,15 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
/* Returns: 1 if number of bits is odd else returns 0 */
-si_int __paritysi2(si_int a);
+si_int COMPILER_RT_ABI __paritysi2(si_int a);
-si_int
+COMPILER_RT_ABI si_int
__paritydi2(di_int a)
{
dwords x;
diff --git a/contrib/compiler-rt/lib/paritysi2.c b/contrib/compiler-rt/lib/paritysi2.c
index ba05782..64d509f 100644
--- a/contrib/compiler-rt/lib/paritysi2.c
+++ b/contrib/compiler-rt/lib/paritysi2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,12 +11,13 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
/* Returns: 1 if number of bits is odd else returns 0 */
-si_int
+COMPILER_RT_ABI si_int
__paritysi2(si_int a)
{
su_int x = (su_int)a;
diff --git a/contrib/compiler-rt/lib/parityti2.c b/contrib/compiler-rt/lib/parityti2.c
index 650d417..8f85745 100644
--- a/contrib/compiler-rt/lib/parityti2.c
+++ b/contrib/compiler-rt/lib/parityti2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/popcountdi2.c b/contrib/compiler-rt/lib/popcountdi2.c
index 78b6d88..136fc04 100644
--- a/contrib/compiler-rt/lib/popcountdi2.c
+++ b/contrib/compiler-rt/lib/popcountdi2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,12 +11,13 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
/* Returns: count of 1 bits */
-si_int
+COMPILER_RT_ABI si_int
__popcountdi2(di_int a)
{
du_int x2 = (du_int)a;
diff --git a/contrib/compiler-rt/lib/popcountsi2.c b/contrib/compiler-rt/lib/popcountsi2.c
index 4f092ee..bfaa3ff 100644
--- a/contrib/compiler-rt/lib/popcountsi2.c
+++ b/contrib/compiler-rt/lib/popcountsi2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,12 +11,13 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
/* Returns: count of 1 bits */
-si_int
+COMPILER_RT_ABI si_int
__popcountsi2(si_int a)
{
su_int x = (su_int)a;
diff --git a/contrib/compiler-rt/lib/popcountti2.c b/contrib/compiler-rt/lib/popcountti2.c
index 16f89b7..68d9427 100644
--- a/contrib/compiler-rt/lib/popcountti2.c
+++ b/contrib/compiler-rt/lib/popcountti2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/powidf2.c b/contrib/compiler-rt/lib/powidf2.c
index 37972b6..2e211eb 100644
--- a/contrib/compiler-rt/lib/powidf2.c
+++ b/contrib/compiler-rt/lib/powidf2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,12 +11,13 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
/* Returns: a ^ b */
-double
+COMPILER_RT_ABI double
__powidf2(double a, si_int b)
{
const int recip = b < 0;
diff --git a/contrib/compiler-rt/lib/powisf2.c b/contrib/compiler-rt/lib/powisf2.c
index ace08c2..e6b43b3 100644
--- a/contrib/compiler-rt/lib/powisf2.c
+++ b/contrib/compiler-rt/lib/powisf2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,12 +11,13 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
/* Returns: a ^ b */
-float
+COMPILER_RT_ABI float
__powisf2(float a, si_int b)
{
const int recip = b < 0;
diff --git a/contrib/compiler-rt/lib/powitf2.c b/contrib/compiler-rt/lib/powitf2.c
index 3dacbf6..189632c 100644
--- a/contrib/compiler-rt/lib/powitf2.c
+++ b/contrib/compiler-rt/lib/powitf2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/powixf2.c b/contrib/compiler-rt/lib/powixf2.c
index 1a816e9..f050964 100644
--- a/contrib/compiler-rt/lib/powixf2.c
+++ b/contrib/compiler-rt/lib/powixf2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/ppc/restFP.S b/contrib/compiler-rt/lib/ppc/restFP.S
index 00919c8..9503289 100644
--- a/contrib/compiler-rt/lib/ppc/restFP.S
+++ b/contrib/compiler-rt/lib/ppc/restFP.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/ppc/saveFP.S b/contrib/compiler-rt/lib/ppc/saveFP.S
index 302da6e..72bd459 100644
--- a/contrib/compiler-rt/lib/ppc/saveFP.S
+++ b/contrib/compiler-rt/lib/ppc/saveFP.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
diff --git a/contrib/compiler-rt/lib/subdf3.c b/contrib/compiler-rt/lib/subdf3.c
new file mode 100644
index 0000000..825e3c6
--- /dev/null
+++ b/contrib/compiler-rt/lib/subdf3.c
@@ -0,0 +1,30 @@
+//===-- lib/adddf3.c - Double-precision subtraction ---------------*- C -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements double-precision soft-float subtraction with the
+// IEEE-754 default rounding (to nearest, ties to even).
+//
+//===----------------------------------------------------------------------===//
+#include "abi.h"
+
+#define DOUBLE_PRECISION
+#include "fp_lib.h"
+
+fp_t COMPILER_RT_ABI __adddf3(fp_t a, fp_t b);
+
+
+ARM_EABI_FNALIAS(dsub, subdf3);
+
+// Subtraction; flip the sign bit of b and add.
+COMPILER_RT_ABI fp_t
+__subdf3(fp_t a, fp_t b) {
+ return __adddf3(a, fromRep(toRep(b) ^ signBit));
+}
+
+/* FIXME: rsub for ARM EABI */
diff --git a/contrib/compiler-rt/lib/subsf3.c b/contrib/compiler-rt/lib/subsf3.c
new file mode 100644
index 0000000..625376a
--- /dev/null
+++ b/contrib/compiler-rt/lib/subsf3.c
@@ -0,0 +1,29 @@
+//===-- lib/subsf3.c - Single-precision subtraction ---------------*- C -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements single-precision soft-float subtraction with the
+// IEEE-754 default rounding (to nearest, ties to even).
+//
+//===----------------------------------------------------------------------===//
+#include "abi.h"
+
+#define SINGLE_PRECISION
+#include "fp_lib.h"
+
+fp_t COMPILER_RT_ABI __addsf3(fp_t a, fp_t b);
+
+ARM_EABI_FNALIAS(fsub, subsf3);
+
+// Subtraction; flip the sign bit of b and add.
+COMPILER_RT_ABI fp_t
+__subsf3(fp_t a, fp_t b) {
+ return __addsf3(a, fromRep(toRep(b) ^ signBit));
+}
+
+/* FIXME: rsub for ARM EABI */
diff --git a/contrib/compiler-rt/lib/subvdi3.c b/contrib/compiler-rt/lib/subvdi3.c
index e4926b8..36b51ad 100644
--- a/contrib/compiler-rt/lib/subvdi3.c
+++ b/contrib/compiler-rt/lib/subvdi3.c
@@ -1,9 +1,9 @@
/* ===-- subvdi3.c - Implement __subvdi3 -----------------------------------===
*
- * The LLVM Compiler Infrastructure
+ * The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
#include <stdlib.h>
@@ -19,7 +20,7 @@
/* Effects: aborts if a - b overflows */
-di_int
+COMPILER_RT_ABI di_int
__subvdi3(di_int a, di_int b)
{
di_int s = a - b;
diff --git a/contrib/compiler-rt/lib/subvsi3.c b/contrib/compiler-rt/lib/subvsi3.c
index ce39c81..03983f7 100644
--- a/contrib/compiler-rt/lib/subvsi3.c
+++ b/contrib/compiler-rt/lib/subvsi3.c
@@ -1,9 +1,9 @@
/* ===-- subvsi3.c - Implement __subvsi3 -----------------------------------===
*
- * The LLVM Compiler Infrastructure
+ * The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
#include <stdlib.h>
@@ -19,7 +20,7 @@
/* Effects: aborts if a - b overflows */
-si_int
+COMPILER_RT_ABI si_int
__subvsi3(si_int a, si_int b)
{
si_int s = a - b;
diff --git a/contrib/compiler-rt/lib/subvti3.c b/contrib/compiler-rt/lib/subvti3.c
index 55b7925..5d693dc 100644
--- a/contrib/compiler-rt/lib/subvti3.c
+++ b/contrib/compiler-rt/lib/subvti3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/trampoline_setup.c b/contrib/compiler-rt/lib/trampoline_setup.c
index a2f49a4..a22199e 100644
--- a/contrib/compiler-rt/lib/trampoline_setup.c
+++ b/contrib/compiler-rt/lib/trampoline_setup.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*/
diff --git a/contrib/compiler-rt/lib/truncdfsf2.c b/contrib/compiler-rt/lib/truncdfsf2.c
index d289cb9..1dbf02f 100644
--- a/contrib/compiler-rt/lib/truncdfsf2.c
+++ b/contrib/compiler-rt/lib/truncdfsf2.c
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
@@ -41,6 +41,8 @@
#include <limits.h>
#include <stdbool.h>
+#include "abi.h"
+
typedef double src_t;
typedef uint64_t src_rep_t;
#define SRC_REP_C UINT64_C
@@ -66,7 +68,10 @@ static inline dst_t dstFromRep(dst_rep_t x) {
// End helper routines. Conversion implementation follows.
-dst_t __truncdfsf2(src_t a) {
+ARM_EABI_FNALIAS(d2f, truncdfsf2);
+
+COMPILER_RT_ABI dst_t
+__truncdfsf2(src_t a) {
// Various constants whose values follow from the type parameters.
// Any reasonable optimizer will fold and propagate all of these.
diff --git a/contrib/compiler-rt/lib/ucmpdi2.c b/contrib/compiler-rt/lib/ucmpdi2.c
index d2900ca..f2d3f99 100644
--- a/contrib/compiler-rt/lib/ucmpdi2.c
+++ b/contrib/compiler-rt/lib/ucmpdi2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -19,7 +20,7 @@
* if (a > b) returns 2
*/
-si_int
+COMPILER_RT_ABI si_int
__ucmpdi2(du_int a, du_int b)
{
udwords x;
diff --git a/contrib/compiler-rt/lib/ucmpti2.c b/contrib/compiler-rt/lib/ucmpti2.c
index 0e7eea3..11137c5 100644
--- a/contrib/compiler-rt/lib/ucmpti2.c
+++ b/contrib/compiler-rt/lib/ucmpti2.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/udivdi3.c b/contrib/compiler-rt/lib/udivdi3.c
index 25d1df6..bbd551a 100644
--- a/contrib/compiler-rt/lib/udivdi3.c
+++ b/contrib/compiler-rt/lib/udivdi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,14 +11,15 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
-du_int __udivmoddi4(du_int a, du_int b, du_int* rem);
+du_int COMPILER_RT_ABI __udivmoddi4(du_int a, du_int b, du_int* rem);
/* Returns: a / b */
-du_int
+COMPILER_RT_ABI du_int
__udivdi3(du_int a, du_int b)
{
return __udivmoddi4(a, b, 0);
diff --git a/contrib/compiler-rt/lib/udivmoddi4.c b/contrib/compiler-rt/lib/udivmoddi4.c
index 9274230..c5db21c 100644
--- a/contrib/compiler-rt/lib/udivmoddi4.c
+++ b/contrib/compiler-rt/lib/udivmoddi4.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -20,7 +21,9 @@
/* Translated from Figure 3-40 of The PowerPC Compiler Writer's Guide */
-du_int
+ARM_EABI_FNALIAS(uldivmod, udivmoddi4);
+
+COMPILER_RT_ABI du_int
__udivmoddi4(du_int a, du_int b, du_int* rem)
{
const unsigned n_uword_bits = sizeof(su_int) * CHAR_BIT;
diff --git a/contrib/compiler-rt/lib/udivmodsi4.c b/contrib/compiler-rt/lib/udivmodsi4.c
new file mode 100644
index 0000000..2a3ee27
--- /dev/null
+++ b/contrib/compiler-rt/lib/udivmodsi4.c
@@ -0,0 +1,31 @@
+/*===-- udivmodsi4.c - Implement __udivmodsi4 ------------------------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file implements __udivmodsi4 for the compiler_rt library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+#include "abi.h"
+
+#include "int_lib.h"
+
+extern su_int COMPILER_RT_ABI __udivsi3(su_int n, su_int d);
+
+
+/* Returns: a / b, *rem = a % b */
+
+COMPILER_RT_ABI su_int
+__udivmodsi4(su_int a, su_int b, su_int* rem)
+{
+ si_int d = __udivsi3(a,b);
+ *rem = a - (d*b);
+ return d;
+}
+
+
diff --git a/contrib/compiler-rt/lib/udivmodti4.c b/contrib/compiler-rt/lib/udivmodti4.c
index 53b4072..d1e19ed 100644
--- a/contrib/compiler-rt/lib/udivmodti4.c
+++ b/contrib/compiler-rt/lib/udivmodti4.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/udivsi3.c b/contrib/compiler-rt/lib/udivsi3.c
index 70528b6..721ae89 100644
--- a/contrib/compiler-rt/lib/udivsi3.c
+++ b/contrib/compiler-rt/lib/udivsi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,6 +11,7 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
@@ -18,7 +19,9 @@
/* Translated from Figure 3-40 of The PowerPC Compiler Writer's Guide */
-su_int
+ARM_EABI_FNALIAS(uidiv, udivsi3);
+
+COMPILER_RT_ABI su_int
__udivsi3(su_int n, su_int d)
{
const unsigned n_uword_bits = sizeof(su_int) * CHAR_BIT;
diff --git a/contrib/compiler-rt/lib/udivti3.c b/contrib/compiler-rt/lib/udivti3.c
index fb810fd..7405a0f 100644
--- a/contrib/compiler-rt/lib/udivti3.c
+++ b/contrib/compiler-rt/lib/udivti3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/umoddi3.c b/contrib/compiler-rt/lib/umoddi3.c
index 807bb5ce..9de1a64 100644
--- a/contrib/compiler-rt/lib/umoddi3.c
+++ b/contrib/compiler-rt/lib/umoddi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,14 +11,15 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
-du_int __udivmoddi4(du_int a, du_int b, du_int* rem);
+du_int COMPILER_RT_ABI __udivmoddi4(du_int a, du_int b, du_int* rem);
/* Returns: a % b */
-du_int
+COMPILER_RT_ABI du_int
__umoddi3(du_int a, du_int b)
{
du_int r;
diff --git a/contrib/compiler-rt/lib/umodsi3.c b/contrib/compiler-rt/lib/umodsi3.c
index ead7737..569b7fc 100644
--- a/contrib/compiler-rt/lib/umodsi3.c
+++ b/contrib/compiler-rt/lib/umodsi3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
@@ -11,14 +11,15 @@
*
* ===----------------------------------------------------------------------===
*/
+#include "abi.h"
#include "int_lib.h"
/* Returns: a % b */
-su_int __udivsi3(su_int a, su_int b);
+su_int COMPILER_RT_ABI __udivsi3(su_int a, su_int b);
-su_int
+COMPILER_RT_ABI su_int
__umodsi3(su_int a, su_int b)
{
return a - __udivsi3(a, b) * b;
diff --git a/contrib/compiler-rt/lib/umodti3.c b/contrib/compiler-rt/lib/umodti3.c
index 6c8a758..8f20c5f 100644
--- a/contrib/compiler-rt/lib/umodti3.c
+++ b/contrib/compiler-rt/lib/umodti3.c
@@ -2,8 +2,8 @@
*
* The LLVM Compiler Infrastructure
*
- * This file is distributed under the University of Illinois Open Source
- * License. See LICENSE.TXT for details.
+ * This file is dual licensed under the MIT and the University of Illinois Open
+ * Source Licenses. See LICENSE.TXT for details.
*
* ===----------------------------------------------------------------------===
*
diff --git a/contrib/compiler-rt/lib/x86_64/floatundidf.S b/contrib/compiler-rt/lib/x86_64/floatundidf.S
index 6e684b2..1be553b 100644
--- a/contrib/compiler-rt/lib/x86_64/floatundidf.S
+++ b/contrib/compiler-rt/lib/x86_64/floatundidf.S
@@ -2,8 +2,8 @@
//
// The LLVM Compiler Infrastructure
//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
diff --git a/contrib/compiler-rt/lib/x86_64/floatundisf.S b/contrib/compiler-rt/lib/x86_64/floatundisf.S
index fe20963..89d3f07 100644
--- a/contrib/compiler-rt/lib/x86_64/floatundisf.S
+++ b/contrib/compiler-rt/lib/x86_64/floatundisf.S
@@ -1,5 +1,5 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
#include "../assembly.h"
diff --git a/contrib/compiler-rt/lib/x86_64/floatundixf.S b/contrib/compiler-rt/lib/x86_64/floatundixf.S
index 246f026..a7243f2 100644
--- a/contrib/compiler-rt/lib/x86_64/floatundixf.S
+++ b/contrib/compiler-rt/lib/x86_64/floatundixf.S
@@ -1,5 +1,5 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
#include "../assembly.h"
OpenPOWER on IntegriCloud