Date: Fri, 3 Jun 2011 17:49:17 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r222656 - in head: contrib/compiler-rt contrib/compiler-rt/lib contrib/compiler-rt/lib/arm contrib/compiler-rt/lib/i386 contrib/compiler-rt/lib/ppc contrib/compiler-rt/lib/x86_64 lib/li... Message-ID: <201106031749.p53HnHkj073838@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Fri Jun 3 17:49:16 2011 New Revision: 222656 URL: http://svn.freebsd.org/changeset/base/222656 Log: 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 Added: head/contrib/compiler-rt/lib/abi.h - copied unchanged from r222625, vendor/compiler-rt/dist/lib/abi.h head/contrib/compiler-rt/lib/arm/divmodsi4.S - copied unchanged from r222625, vendor/compiler-rt/dist/lib/arm/divmodsi4.S head/contrib/compiler-rt/lib/arm/divsi3.S - copied unchanged from r222625, vendor/compiler-rt/dist/lib/arm/divsi3.S head/contrib/compiler-rt/lib/arm/softfloat-alias.list - copied unchanged from r222625, vendor/compiler-rt/dist/lib/arm/softfloat-alias.list head/contrib/compiler-rt/lib/arm/udivmodsi4.S - copied unchanged from r222625, vendor/compiler-rt/dist/lib/arm/udivmodsi4.S head/contrib/compiler-rt/lib/arm/udivsi3.S - copied unchanged from r222625, vendor/compiler-rt/dist/lib/arm/udivsi3.S head/contrib/compiler-rt/lib/arm/umodsi3.S - copied unchanged from r222625, vendor/compiler-rt/dist/lib/arm/umodsi3.S head/contrib/compiler-rt/lib/divmoddi4.c - copied unchanged from r222625, vendor/compiler-rt/dist/lib/divmoddi4.c head/contrib/compiler-rt/lib/divmodsi4.c - copied unchanged from r222625, vendor/compiler-rt/dist/lib/divmodsi4.c head/contrib/compiler-rt/lib/subdf3.c - copied unchanged from r222625, vendor/compiler-rt/dist/lib/subdf3.c head/contrib/compiler-rt/lib/subsf3.c - copied unchanged from r222625, vendor/compiler-rt/dist/lib/subsf3.c head/contrib/compiler-rt/lib/udivmodsi4.c - copied unchanged from r222625, vendor/compiler-rt/dist/lib/udivmodsi4.c Modified: head/contrib/compiler-rt/CREDITS.TXT head/contrib/compiler-rt/LICENSE.TXT head/contrib/compiler-rt/README.txt head/contrib/compiler-rt/lib/absvdi2.c head/contrib/compiler-rt/lib/absvsi2.c head/contrib/compiler-rt/lib/absvti2.c head/contrib/compiler-rt/lib/adddf3.c head/contrib/compiler-rt/lib/addsf3.c head/contrib/compiler-rt/lib/addvdi3.c head/contrib/compiler-rt/lib/addvsi3.c head/contrib/compiler-rt/lib/addvti3.c head/contrib/compiler-rt/lib/apple_versioning.c head/contrib/compiler-rt/lib/arm/adddf3vfp.S head/contrib/compiler-rt/lib/arm/addsf3vfp.S head/contrib/compiler-rt/lib/arm/bswapdi2.S head/contrib/compiler-rt/lib/arm/bswapsi2.S head/contrib/compiler-rt/lib/arm/comparesf2.S head/contrib/compiler-rt/lib/arm/divdf3vfp.S head/contrib/compiler-rt/lib/arm/divsf3vfp.S head/contrib/compiler-rt/lib/arm/eqdf2vfp.S head/contrib/compiler-rt/lib/arm/eqsf2vfp.S head/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S head/contrib/compiler-rt/lib/arm/fixdfsivfp.S head/contrib/compiler-rt/lib/arm/fixsfsivfp.S head/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S head/contrib/compiler-rt/lib/arm/fixunssfsivfp.S head/contrib/compiler-rt/lib/arm/floatsidfvfp.S head/contrib/compiler-rt/lib/arm/floatsisfvfp.S head/contrib/compiler-rt/lib/arm/floatunssidfvfp.S head/contrib/compiler-rt/lib/arm/floatunssisfvfp.S head/contrib/compiler-rt/lib/arm/gedf2vfp.S head/contrib/compiler-rt/lib/arm/gesf2vfp.S head/contrib/compiler-rt/lib/arm/gtdf2vfp.S head/contrib/compiler-rt/lib/arm/gtsf2vfp.S head/contrib/compiler-rt/lib/arm/ledf2vfp.S head/contrib/compiler-rt/lib/arm/lesf2vfp.S head/contrib/compiler-rt/lib/arm/ltdf2vfp.S head/contrib/compiler-rt/lib/arm/ltsf2vfp.S head/contrib/compiler-rt/lib/arm/modsi3.S head/contrib/compiler-rt/lib/arm/muldf3vfp.S head/contrib/compiler-rt/lib/arm/mulsf3vfp.S head/contrib/compiler-rt/lib/arm/nedf2vfp.S head/contrib/compiler-rt/lib/arm/negdf2vfp.S head/contrib/compiler-rt/lib/arm/negsf2vfp.S head/contrib/compiler-rt/lib/arm/nesf2vfp.S head/contrib/compiler-rt/lib/arm/restore_vfp_d8_d15_regs.S head/contrib/compiler-rt/lib/arm/save_vfp_d8_d15_regs.S head/contrib/compiler-rt/lib/arm/subdf3vfp.S head/contrib/compiler-rt/lib/arm/subsf3vfp.S head/contrib/compiler-rt/lib/arm/switch16.S head/contrib/compiler-rt/lib/arm/switch32.S head/contrib/compiler-rt/lib/arm/switch8.S head/contrib/compiler-rt/lib/arm/switchu8.S head/contrib/compiler-rt/lib/arm/sync_synchronize.S head/contrib/compiler-rt/lib/arm/truncdfsf2vfp.S head/contrib/compiler-rt/lib/arm/unorddf2vfp.S head/contrib/compiler-rt/lib/arm/unordsf2vfp.S head/contrib/compiler-rt/lib/ashldi3.c head/contrib/compiler-rt/lib/ashlti3.c head/contrib/compiler-rt/lib/ashrdi3.c head/contrib/compiler-rt/lib/ashrti3.c head/contrib/compiler-rt/lib/assembly.h head/contrib/compiler-rt/lib/clear_cache.c head/contrib/compiler-rt/lib/clzdi2.c head/contrib/compiler-rt/lib/clzsi2.c head/contrib/compiler-rt/lib/clzti2.c head/contrib/compiler-rt/lib/cmpdi2.c head/contrib/compiler-rt/lib/cmpti2.c head/contrib/compiler-rt/lib/comparedf2.c head/contrib/compiler-rt/lib/comparesf2.c head/contrib/compiler-rt/lib/ctzdi2.c head/contrib/compiler-rt/lib/ctzsi2.c head/contrib/compiler-rt/lib/ctzti2.c head/contrib/compiler-rt/lib/divdc3.c head/contrib/compiler-rt/lib/divdf3.c head/contrib/compiler-rt/lib/divdi3.c head/contrib/compiler-rt/lib/divsc3.c head/contrib/compiler-rt/lib/divsf3.c head/contrib/compiler-rt/lib/divsi3.c head/contrib/compiler-rt/lib/divti3.c head/contrib/compiler-rt/lib/divxc3.c head/contrib/compiler-rt/lib/enable_execute_stack.c head/contrib/compiler-rt/lib/endianness.h head/contrib/compiler-rt/lib/eprintf.c head/contrib/compiler-rt/lib/extendsfdf2.c head/contrib/compiler-rt/lib/ffsdi2.c head/contrib/compiler-rt/lib/ffsti2.c head/contrib/compiler-rt/lib/fixdfdi.c head/contrib/compiler-rt/lib/fixdfsi.c head/contrib/compiler-rt/lib/fixdfti.c head/contrib/compiler-rt/lib/fixsfdi.c head/contrib/compiler-rt/lib/fixsfsi.c head/contrib/compiler-rt/lib/fixsfti.c head/contrib/compiler-rt/lib/fixunsdfdi.c head/contrib/compiler-rt/lib/fixunsdfsi.c head/contrib/compiler-rt/lib/fixunsdfti.c head/contrib/compiler-rt/lib/fixunssfdi.c head/contrib/compiler-rt/lib/fixunssfsi.c head/contrib/compiler-rt/lib/fixunssfti.c head/contrib/compiler-rt/lib/fixunsxfdi.c head/contrib/compiler-rt/lib/fixunsxfsi.c head/contrib/compiler-rt/lib/fixunsxfti.c head/contrib/compiler-rt/lib/fixxfdi.c head/contrib/compiler-rt/lib/fixxfti.c head/contrib/compiler-rt/lib/floatdidf.c head/contrib/compiler-rt/lib/floatdisf.c head/contrib/compiler-rt/lib/floatdixf.c head/contrib/compiler-rt/lib/floatsidf.c head/contrib/compiler-rt/lib/floatsisf.c head/contrib/compiler-rt/lib/floattidf.c head/contrib/compiler-rt/lib/floattisf.c head/contrib/compiler-rt/lib/floattixf.c head/contrib/compiler-rt/lib/floatundidf.c head/contrib/compiler-rt/lib/floatundisf.c head/contrib/compiler-rt/lib/floatundixf.c head/contrib/compiler-rt/lib/floatunsidf.c head/contrib/compiler-rt/lib/floatunsisf.c head/contrib/compiler-rt/lib/floatuntidf.c head/contrib/compiler-rt/lib/floatuntisf.c head/contrib/compiler-rt/lib/floatuntixf.c head/contrib/compiler-rt/lib/fp_lib.h head/contrib/compiler-rt/lib/gcc_personality_v0.c head/contrib/compiler-rt/lib/i386/ashldi3.S head/contrib/compiler-rt/lib/i386/ashrdi3.S head/contrib/compiler-rt/lib/i386/divdi3.S head/contrib/compiler-rt/lib/i386/floatdidf.S head/contrib/compiler-rt/lib/i386/floatdisf.S head/contrib/compiler-rt/lib/i386/floatdixf.S head/contrib/compiler-rt/lib/i386/floatundidf.S head/contrib/compiler-rt/lib/i386/floatundisf.S head/contrib/compiler-rt/lib/i386/floatundixf.S head/contrib/compiler-rt/lib/i386/lshrdi3.S head/contrib/compiler-rt/lib/i386/moddi3.S head/contrib/compiler-rt/lib/i386/muldi3.S head/contrib/compiler-rt/lib/i386/udivdi3.S head/contrib/compiler-rt/lib/i386/umoddi3.S head/contrib/compiler-rt/lib/int_lib.h head/contrib/compiler-rt/lib/lshrdi3.c head/contrib/compiler-rt/lib/lshrti3.c head/contrib/compiler-rt/lib/moddi3.c head/contrib/compiler-rt/lib/modsi3.c head/contrib/compiler-rt/lib/modti3.c head/contrib/compiler-rt/lib/muldc3.c head/contrib/compiler-rt/lib/muldf3.c head/contrib/compiler-rt/lib/muldi3.c head/contrib/compiler-rt/lib/mulsc3.c head/contrib/compiler-rt/lib/mulsf3.c head/contrib/compiler-rt/lib/multi3.c head/contrib/compiler-rt/lib/mulvdi3.c head/contrib/compiler-rt/lib/mulvsi3.c head/contrib/compiler-rt/lib/mulvti3.c head/contrib/compiler-rt/lib/mulxc3.c head/contrib/compiler-rt/lib/negdf2.c head/contrib/compiler-rt/lib/negdi2.c head/contrib/compiler-rt/lib/negsf2.c head/contrib/compiler-rt/lib/negti2.c head/contrib/compiler-rt/lib/negvdi2.c head/contrib/compiler-rt/lib/negvsi2.c head/contrib/compiler-rt/lib/negvti2.c head/contrib/compiler-rt/lib/paritydi2.c head/contrib/compiler-rt/lib/paritysi2.c head/contrib/compiler-rt/lib/parityti2.c head/contrib/compiler-rt/lib/popcountdi2.c head/contrib/compiler-rt/lib/popcountsi2.c head/contrib/compiler-rt/lib/popcountti2.c head/contrib/compiler-rt/lib/powidf2.c head/contrib/compiler-rt/lib/powisf2.c head/contrib/compiler-rt/lib/powitf2.c head/contrib/compiler-rt/lib/powixf2.c head/contrib/compiler-rt/lib/ppc/restFP.S head/contrib/compiler-rt/lib/ppc/saveFP.S head/contrib/compiler-rt/lib/subvdi3.c head/contrib/compiler-rt/lib/subvsi3.c head/contrib/compiler-rt/lib/subvti3.c head/contrib/compiler-rt/lib/trampoline_setup.c head/contrib/compiler-rt/lib/truncdfsf2.c head/contrib/compiler-rt/lib/ucmpdi2.c head/contrib/compiler-rt/lib/ucmpti2.c head/contrib/compiler-rt/lib/udivdi3.c head/contrib/compiler-rt/lib/udivmoddi4.c head/contrib/compiler-rt/lib/udivmodti4.c head/contrib/compiler-rt/lib/udivsi3.c head/contrib/compiler-rt/lib/udivti3.c head/contrib/compiler-rt/lib/umoddi3.c head/contrib/compiler-rt/lib/umodsi3.c head/contrib/compiler-rt/lib/umodti3.c head/contrib/compiler-rt/lib/x86_64/floatundidf.S head/contrib/compiler-rt/lib/x86_64/floatundisf.S head/contrib/compiler-rt/lib/x86_64/floatundixf.S head/lib/libcompiler_rt/Makefile Directory Properties: head/contrib/compiler-rt/ (props changed) Modified: head/contrib/compiler-rt/CREDITS.TXT ============================================================================== --- head/contrib/compiler-rt/CREDITS.TXT Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/CREDITS.TXT Fri Jun 3 17:49:16 2011 (r222656) @@ -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 Modified: head/contrib/compiler-rt/LICENSE.TXT ============================================================================== --- head/contrib/compiler-rt/LICENSE.TXT Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/LICENSE.TXT Fri Jun 3 17:49:16 2011 (r222656) @@ -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 SOFTWAR 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: +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. -Program Directory -------- --------- +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. Modified: head/contrib/compiler-rt/README.txt ============================================================================== --- head/contrib/compiler-rt/README.txt Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/README.txt Fri Jun 3 17:49:16 2011 (r222656) @@ -77,8 +77,12 @@ ti_int __modti3 (ti_int a, ti_int b); 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 Copied: head/contrib/compiler-rt/lib/abi.h (from r222625, vendor/compiler-rt/dist/lib/abi.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/compiler-rt/lib/abi.h Fri Jun 3 17:49:16 2011 (r222656, copy of r222625, vendor/compiler-rt/dist/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 Modified: head/contrib/compiler-rt/lib/absvdi2.c ============================================================================== --- head/contrib/compiler-rt/lib/absvdi2.c Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/absvdi2.c Fri Jun 3 17:49:16 2011 (r222656) @@ -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); Modified: head/contrib/compiler-rt/lib/absvsi2.c ============================================================================== --- head/contrib/compiler-rt/lib/absvsi2.c Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/absvsi2.c Fri Jun 3 17:49:16 2011 (r222656) @@ -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); Modified: head/contrib/compiler-rt/lib/absvti2.c ============================================================================== --- head/contrib/compiler-rt/lib/absvti2.c Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/absvti2.c Fri Jun 3 17:49:16 2011 (r222656) @@ -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. * * ===----------------------------------------------------------------------=== * Modified: head/contrib/compiler-rt/lib/adddf3.c ============================================================================== --- head/contrib/compiler-rt/lib/adddf3.c Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/adddf3.c Fri Jun 3 17:49:16 2011 (r222656) @@ -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)); -} Modified: head/contrib/compiler-rt/lib/addsf3.c ============================================================================== --- head/contrib/compiler-rt/lib/addsf3.c Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/addsf3.c Fri Jun 3 17:49:16 2011 (r222656) @@ -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)); -} - - - - - - - - - - Modified: head/contrib/compiler-rt/lib/addvdi3.c ============================================================================== --- head/contrib/compiler-rt/lib/addvdi3.c Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/addvdi3.c Fri Jun 3 17:49:16 2011 (r222656) @@ -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; Modified: head/contrib/compiler-rt/lib/addvsi3.c ============================================================================== --- head/contrib/compiler-rt/lib/addvsi3.c Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/addvsi3.c Fri Jun 3 17:49:16 2011 (r222656) @@ -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; Modified: head/contrib/compiler-rt/lib/addvti3.c ============================================================================== --- head/contrib/compiler-rt/lib/addvti3.c Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/addvti3.c Fri Jun 3 17:49:16 2011 (r222656) @@ -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. * * ===----------------------------------------------------------------------=== * Modified: head/contrib/compiler-rt/lib/apple_versioning.c ============================================================================== --- head/contrib/compiler-rt/lib/apple_versioning.c Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/apple_versioning.c Fri Jun 3 17:49:16 2011 (r222656) @@ -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; Modified: head/contrib/compiler-rt/lib/arm/adddf3vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/adddf3vfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/adddf3vfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/addsf3vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/addsf3vfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/addsf3vfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/bswapdi2.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/bswapdi2.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/bswapdi2.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/bswapsi2.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/bswapsi2.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/bswapsi2.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/comparesf2.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/comparesf2.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/comparesf2.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// // Modified: head/contrib/compiler-rt/lib/arm/divdf3vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/divdf3vfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/divdf3vfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Copied: head/contrib/compiler-rt/lib/arm/divmodsi4.S (from r222625, vendor/compiler-rt/dist/lib/arm/divmodsi4.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/compiler-rt/lib/arm/divmodsi4.S Fri Jun 3 17:49:16 2011 (r222656, copy of r222625, vendor/compiler-rt/dist/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 Modified: head/contrib/compiler-rt/lib/arm/divsf3vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/divsf3vfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/divsf3vfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Copied: head/contrib/compiler-rt/lib/arm/divsi3.S (from r222625, vendor/compiler-rt/dist/lib/arm/divsi3.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/compiler-rt/lib/arm/divsi3.S Fri Jun 3 17:49:16 2011 (r222656, copy of r222625, vendor/compiler-rt/dist/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 Modified: head/contrib/compiler-rt/lib/arm/eqdf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/eqdf2vfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/eqdf2vfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/eqsf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/eqsf2vfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/eqsf2vfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/fixdfsivfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/fixdfsivfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/fixdfsivfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/fixsfsivfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/fixsfsivfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/fixsfsivfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/fixunssfsivfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/fixunssfsivfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/fixunssfsivfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/floatsidfvfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/floatsidfvfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/floatsidfvfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/floatsisfvfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/floatsisfvfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/floatsisfvfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/floatunssidfvfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/floatunssidfvfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/floatunssidfvfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/floatunssisfvfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/floatunssisfvfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/floatunssisfvfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/gedf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/gedf2vfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/gedf2vfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/gesf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/gesf2vfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/gesf2vfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/gtdf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/gtdf2vfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/gtdf2vfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/gtsf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/gtsf2vfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/gtsf2vfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/ledf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/ledf2vfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/ledf2vfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/lesf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/lesf2vfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/lesf2vfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/ltdf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/ltdf2vfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/ltdf2vfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/ltsf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/ltsf2vfp.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/ltsf2vfp.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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. // //===----------------------------------------------------------------------===// Modified: head/contrib/compiler-rt/lib/arm/modsi3.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/modsi3.S Fri Jun 3 17:09:15 2011 (r222655) +++ head/contrib/compiler-rt/lib/arm/modsi3.S Fri Jun 3 17:49:16 2011 (r222656) @@ -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 *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106031749.p53HnHkj073838>