[Midnightbsd-cvs] src [10410] trunk/contrib/compiler-rt: update compiler-rt
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Mon Jun 4 15:51:39 EDT 2018
Revision: 10410
http://svnweb.midnightbsd.org/src/?rev=10410
Author: laffer1
Date: 2018-06-04 15:51:38 -0400 (Mon, 04 Jun 2018)
Log Message:
-----------
update compiler-rt
Modified Paths:
--------------
trunk/contrib/compiler-rt/LICENSE.TXT
trunk/contrib/compiler-rt/lib/absvti2.c
trunk/contrib/compiler-rt/lib/adddf3.c
trunk/contrib/compiler-rt/lib/addsf3.c
trunk/contrib/compiler-rt/lib/addvti3.c
trunk/contrib/compiler-rt/lib/arm/divsi3.S
trunk/contrib/compiler-rt/lib/arm/udivsi3.S
trunk/contrib/compiler-rt/lib/ashldi3.c
trunk/contrib/compiler-rt/lib/ashlti3.c
trunk/contrib/compiler-rt/lib/ashrdi3.c
trunk/contrib/compiler-rt/lib/ashrti3.c
trunk/contrib/compiler-rt/lib/assembly.h
trunk/contrib/compiler-rt/lib/clzti2.c
trunk/contrib/compiler-rt/lib/cmpdi2.c
trunk/contrib/compiler-rt/lib/cmpti2.c
trunk/contrib/compiler-rt/lib/ctzti2.c
trunk/contrib/compiler-rt/lib/divdf3.c
trunk/contrib/compiler-rt/lib/divmoddi4.c
trunk/contrib/compiler-rt/lib/divsf3.c
trunk/contrib/compiler-rt/lib/divsi3.c
trunk/contrib/compiler-rt/lib/divti3.c
trunk/contrib/compiler-rt/lib/extendsfdf2.c
trunk/contrib/compiler-rt/lib/ffsti2.c
trunk/contrib/compiler-rt/lib/fixdfdi.c
trunk/contrib/compiler-rt/lib/fixdfsi.c
trunk/contrib/compiler-rt/lib/fixdfti.c
trunk/contrib/compiler-rt/lib/fixsfdi.c
trunk/contrib/compiler-rt/lib/fixsfsi.c
trunk/contrib/compiler-rt/lib/fixsfti.c
trunk/contrib/compiler-rt/lib/fixunsdfdi.c
trunk/contrib/compiler-rt/lib/fixunsdfsi.c
trunk/contrib/compiler-rt/lib/fixunsdfti.c
trunk/contrib/compiler-rt/lib/fixunssfdi.c
trunk/contrib/compiler-rt/lib/fixunssfsi.c
trunk/contrib/compiler-rt/lib/fixunssfti.c
trunk/contrib/compiler-rt/lib/fixunsxfti.c
trunk/contrib/compiler-rt/lib/fixxfti.c
trunk/contrib/compiler-rt/lib/floatdidf.c
trunk/contrib/compiler-rt/lib/floatdisf.c
trunk/contrib/compiler-rt/lib/floatsidf.c
trunk/contrib/compiler-rt/lib/floatsisf.c
trunk/contrib/compiler-rt/lib/floattidf.c
trunk/contrib/compiler-rt/lib/floattisf.c
trunk/contrib/compiler-rt/lib/floattixf.c
trunk/contrib/compiler-rt/lib/floatundidf.c
trunk/contrib/compiler-rt/lib/floatundisf.c
trunk/contrib/compiler-rt/lib/floatunsidf.c
trunk/contrib/compiler-rt/lib/floatunsisf.c
trunk/contrib/compiler-rt/lib/floatuntidf.c
trunk/contrib/compiler-rt/lib/floatuntisf.c
trunk/contrib/compiler-rt/lib/floatuntixf.c
trunk/contrib/compiler-rt/lib/fp_lib.h
trunk/contrib/compiler-rt/lib/int_endianness.h
trunk/contrib/compiler-rt/lib/int_lib.h
trunk/contrib/compiler-rt/lib/int_types.h
trunk/contrib/compiler-rt/lib/int_util.c
trunk/contrib/compiler-rt/lib/int_util.h
trunk/contrib/compiler-rt/lib/lshrdi3.c
trunk/contrib/compiler-rt/lib/lshrti3.c
trunk/contrib/compiler-rt/lib/modti3.c
trunk/contrib/compiler-rt/lib/muldf3.c
trunk/contrib/compiler-rt/lib/muldi3.c
trunk/contrib/compiler-rt/lib/muloti4.c
trunk/contrib/compiler-rt/lib/mulsf3.c
trunk/contrib/compiler-rt/lib/multi3.c
trunk/contrib/compiler-rt/lib/mulvti3.c
trunk/contrib/compiler-rt/lib/negdf2.c
trunk/contrib/compiler-rt/lib/negsf2.c
trunk/contrib/compiler-rt/lib/negti2.c
trunk/contrib/compiler-rt/lib/negvti2.c
trunk/contrib/compiler-rt/lib/parityti2.c
trunk/contrib/compiler-rt/lib/popcountti2.c
trunk/contrib/compiler-rt/lib/powitf2.c
trunk/contrib/compiler-rt/lib/subdf3.c
trunk/contrib/compiler-rt/lib/subsf3.c
trunk/contrib/compiler-rt/lib/subvti3.c
trunk/contrib/compiler-rt/lib/truncdfsf2.c
trunk/contrib/compiler-rt/lib/ucmpdi2.c
trunk/contrib/compiler-rt/lib/ucmpti2.c
trunk/contrib/compiler-rt/lib/udivmoddi4.c
trunk/contrib/compiler-rt/lib/udivmodti4.c
trunk/contrib/compiler-rt/lib/udivsi3.c
trunk/contrib/compiler-rt/lib/udivti3.c
trunk/contrib/compiler-rt/lib/umodti3.c
Added Paths:
-----------
trunk/contrib/compiler-rt/lib/arm/aeabi_idivmod.S
trunk/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S
trunk/contrib/compiler-rt/lib/arm/aeabi_memcmp.S
trunk/contrib/compiler-rt/lib/arm/aeabi_memcpy.S
trunk/contrib/compiler-rt/lib/arm/aeabi_memmove.S
trunk/contrib/compiler-rt/lib/arm/aeabi_memset.S
trunk/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S
trunk/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S
Modified: trunk/contrib/compiler-rt/LICENSE.TXT
===================================================================
--- trunk/contrib/compiler-rt/LICENSE.TXT 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/LICENSE.TXT 2018-06-04 19:51:38 UTC (rev 10410)
@@ -14,7 +14,7 @@
University of Illinois/NCSA
Open Source License
-Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT
All rights reserved.
@@ -55,7 +55,7 @@
==============================================================================
-Copyright (c) 2009-2012 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2013 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
@@ -94,5 +94,4 @@
Program Directory
------- ---------
-sysinfo lib/asan/sysinfo
-mach_override lib/asan/mach_override
+mach_override lib/interception/mach_override
Modified: trunk/contrib/compiler-rt/lib/absvti2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/absvti2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/absvti2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: absolute value */
/* Effects: aborts if abs(x) < 0 */
@@ -30,4 +30,5 @@
return (a ^ s) - s;
}
-#endif
+#endif /* CRT_HAS_128BIT */
+
Modified: trunk/contrib/compiler-rt/lib/adddf3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/adddf3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/adddf3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -15,7 +15,7 @@
#define DOUBLE_PRECISION
#include "fp_lib.h"
-ARM_EABI_FNALIAS(dadd, adddf3);
+ARM_EABI_FNALIAS(dadd, adddf3)
COMPILER_RT_ABI fp_t
__adddf3(fp_t a, fp_t b) {
@@ -85,7 +85,7 @@
// Shift the significand of b by the difference in exponents, with a sticky
// bottom bit to get rounding correct.
- const int align = aExponent - bExponent;
+ const unsigned int align = aExponent - bExponent;
if (align) {
if (align < typeWidth) {
const bool sticky = bSignificand << (typeWidth - align);
Modified: trunk/contrib/compiler-rt/lib/addsf3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/addsf3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/addsf3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -15,7 +15,7 @@
#define SINGLE_PRECISION
#include "fp_lib.h"
-ARM_EABI_FNALIAS(fadd, addsf3);
+ARM_EABI_FNALIAS(fadd, addsf3)
fp_t __addsf3(fp_t a, fp_t b) {
@@ -84,7 +84,7 @@
// Shift the significand of b by the difference in exponents, with a sticky
// bottom bit to get rounding correct.
- const int align = aExponent - bExponent;
+ const unsigned int align = aExponent - bExponent;
if (align) {
if (align < typeWidth) {
const bool sticky = bSignificand << (typeWidth - align);
Modified: trunk/contrib/compiler-rt/lib/addvti3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/addvti3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/addvti3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: a + b */
/* Effects: aborts if a + b overflows */
@@ -37,4 +37,4 @@
return s;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Added: trunk/contrib/compiler-rt/lib/arm/aeabi_idivmod.S
===================================================================
--- trunk/contrib/compiler-rt/lib/arm/aeabi_idivmod.S (rev 0)
+++ trunk/contrib/compiler-rt/lib/arm/aeabi_idivmod.S 2018-06-04 19:51:38 UTC (rev 10410)
@@ -0,0 +1,27 @@
+//===-- aeabi_idivmod.S - EABI idivmod implementation ---------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+// struct { int quot, int rem} __aeabi_idivmod(int numerator, int denominator) {
+// int rem, quot;
+// quot = __divmodsi4(numerator, denominator, &rem);
+// return {quot, rem};
+// }
+
+ .syntax unified
+ .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_idivmod)
+ push { lr }
+ sub sp, sp, #4
+ mov r2, sp
+ bl SYMBOL_NAME(__divmodsi4)
+ ldr r1, [sp]
+ add sp, sp, #4
+ pop { pc }
Property changes on: trunk/contrib/compiler-rt/lib/arm/aeabi_idivmod.S
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S
===================================================================
--- trunk/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S (rev 0)
+++ trunk/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S 2018-06-04 19:51:38 UTC (rev 10410)
@@ -0,0 +1,30 @@
+//===-- aeabi_ldivmod.S - EABI ldivmod implementation ---------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+// struct { int64_t quot, int64_t rem}
+// __aeabi_ldivmod(int64_t numerator, int64_t denominator) {
+// int64_t rem, quot;
+// quot = __divmoddi4(numerator, denominator, &rem);
+// return {quot, rem};
+// }
+
+ .syntax unified
+ .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_ldivmod)
+ push {r11, lr}
+ sub sp, sp, #16
+ add r12, sp, #8
+ str r12, [sp]
+ bl SYMBOL_NAME(__divmoddi4)
+ ldr r2, [sp, #8]
+ ldr r3, [sp, #12]
+ add sp, sp, #16
+ pop {r11, pc}
Property changes on: trunk/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/contrib/compiler-rt/lib/arm/aeabi_memcmp.S
===================================================================
--- trunk/contrib/compiler-rt/lib/arm/aeabi_memcmp.S (rev 0)
+++ trunk/contrib/compiler-rt/lib/arm/aeabi_memcmp.S 2018-06-04 19:51:38 UTC (rev 10410)
@@ -0,0 +1,19 @@
+//===-- aeabi_memcmp.S - EABI memcmp implementation -----------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+// void __aeabi_memcmp(void *dest, void *src, size_t n) { memcmp(dest, src, n); }
+
+ .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_memcmp)
+ b memcmp
+
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcmp4, __aeabi_memcmp)
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcmp8, __aeabi_memcmp)
Property changes on: trunk/contrib/compiler-rt/lib/arm/aeabi_memcmp.S
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/contrib/compiler-rt/lib/arm/aeabi_memcpy.S
===================================================================
--- trunk/contrib/compiler-rt/lib/arm/aeabi_memcpy.S (rev 0)
+++ trunk/contrib/compiler-rt/lib/arm/aeabi_memcpy.S 2018-06-04 19:51:38 UTC (rev 10410)
@@ -0,0 +1,19 @@
+//===-- aeabi_memcpy.S - EABI memcpy implementation -----------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+// void __aeabi_memcpy(void *dest, void *src, size_t n) { memcpy(dest, src, n); }
+
+ .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_memcpy)
+ b memcpy
+
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcpy4, __aeabi_memcpy)
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcpy8, __aeabi_memcpy)
Property changes on: trunk/contrib/compiler-rt/lib/arm/aeabi_memcpy.S
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/contrib/compiler-rt/lib/arm/aeabi_memmove.S
===================================================================
--- trunk/contrib/compiler-rt/lib/arm/aeabi_memmove.S (rev 0)
+++ trunk/contrib/compiler-rt/lib/arm/aeabi_memmove.S 2018-06-04 19:51:38 UTC (rev 10410)
@@ -0,0 +1,19 @@
+//===-- aeabi_memmove.S - EABI memmove implementation --------------------===//
+//
+// 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.
+//
+//===---------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+// void __aeabi_memmove(void *dest, void *src, size_t n) { memmove(dest, src, n); }
+
+ .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_memmove)
+ b memmove
+
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memmove4, __aeabi_memmove)
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memmove8, __aeabi_memmove)
Property changes on: trunk/contrib/compiler-rt/lib/arm/aeabi_memmove.S
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/contrib/compiler-rt/lib/arm/aeabi_memset.S
===================================================================
--- trunk/contrib/compiler-rt/lib/arm/aeabi_memset.S (rev 0)
+++ trunk/contrib/compiler-rt/lib/arm/aeabi_memset.S 2018-06-04 19:51:38 UTC (rev 10410)
@@ -0,0 +1,32 @@
+//===-- aeabi_memset.S - EABI memset implementation -----------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+// void __aeabi_memset(void *dest, size_t n, int c) { memset(dest, c, n); }
+// void __aeabi_memclr(void *dest, size_t n) { __aeabi_memset(dest, n, 0); }
+
+ .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_memset)
+ mov r3, r1
+ mov r1, r2
+ mov r2, r3
+ b memset
+
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memset4, __aeabi_memset)
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memset8, __aeabi_memset)
+
+DEFINE_COMPILERRT_FUNCTION(__aeabi_memclr)
+ mov r2, r1
+ mov r1, #0
+ b memset
+
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memclr4, __aeabi_memclr)
+DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memclr8, __aeabi_memclr)
+
Property changes on: trunk/contrib/compiler-rt/lib/arm/aeabi_memset.S
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S
===================================================================
--- trunk/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S (rev 0)
+++ trunk/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S 2018-06-04 19:51:38 UTC (rev 10410)
@@ -0,0 +1,28 @@
+//===-- aeabi_uidivmod.S - EABI uidivmod implementation -------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+// struct { unsigned quot, unsigned rem}
+// __aeabi_uidivmod(unsigned numerator, unsigned denominator) {
+// unsigned rem, quot;
+// quot = __udivmodsi4(numerator, denominator, &rem);
+// return {quot, rem};
+// }
+
+ .syntax unified
+ .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_uidivmod)
+ push { lr }
+ sub sp, sp, #4
+ mov r2, sp
+ bl SYMBOL_NAME(__udivmodsi4)
+ ldr r1, [sp]
+ add sp, sp, #4
+ pop { pc }
Property changes on: trunk/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S
===================================================================
--- trunk/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S (rev 0)
+++ trunk/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S 2018-06-04 19:51:38 UTC (rev 10410)
@@ -0,0 +1,31 @@
+//===-- aeabi_uldivmod.S - EABI uldivmod implementation -------------------===//
+//
+// 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.
+//
+//===----------------------------------------------------------------------===//
+
+#include "../assembly.h"
+
+// struct { uint64_t quot, uint64_t rem}
+// __aeabi_uldivmod(uint64_t numerator, uint64_t denominator) {
+// uint64_t rem, quot;
+// quot = __udivmoddi4(numerator, denominator, &rem);
+// return {quot, rem};
+// }
+
+ .syntax unified
+ .align 2
+DEFINE_COMPILERRT_FUNCTION(__aeabi_uldivmod)
+ push {r11, lr}
+ sub sp, sp, #16
+ add r12, sp, #8
+ str r12, [sp]
+ bl SYMBOL_NAME(__udivmoddi4)
+ ldr r2, [sp, #8]
+ ldr r3, [sp, #12]
+ add sp, sp, #16
+ pop {r11, pc}
+
Property changes on: trunk/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/contrib/compiler-rt/lib/arm/divsi3.S
===================================================================
--- trunk/contrib/compiler-rt/lib/arm/divsi3.S 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/arm/divsi3.S 2018-06-04 19:51:38 UTC (rev 10410)
@@ -25,7 +25,16 @@
// 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
+#if __ARM_ARCH_7S__
+ tst r1,r1
+ beq LOCAL_LABEL(divzero)
+ sdiv r0, r0, r1
+ bx lr
+LOCAL_LABEL(divzero):
+ mov r0,#0
+ bx lr
+#else
+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).
@@ -39,3 +48,4 @@
eor r0, r0, r4, asr #31
sub r0, r0, r4, asr #31
CLEAR_FRAME_AND_RETURN
+#endif
Modified: trunk/contrib/compiler-rt/lib/arm/udivsi3.S
===================================================================
--- trunk/contrib/compiler-rt/lib/arm/udivsi3.S 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/arm/udivsi3.S 2018-06-04 19:51:38 UTC (rev 10410)
@@ -33,6 +33,15 @@
// 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)
+#if __ARM_ARCH_7S__
+ tst r1,r1
+ beq LOCAL_LABEL(divzero)
+ udiv r0, r0, r1
+ bx lr
+ LOCAL_LABEL(divzero):
+ mov r0,#0
+ bx lr
+#else
// 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
@@ -78,3 +87,4 @@
// Move the quotient to r0 and return.
mov r0, q
CLEAR_FRAME_AND_RETURN
+#endif
Modified: trunk/contrib/compiler-rt/lib/ashldi3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/ashldi3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/ashldi3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -18,7 +18,7 @@
/* Precondition: 0 <= b < bits_in_dword */
-ARM_EABI_FNALIAS(llsl, ashldi3);
+ARM_EABI_FNALIAS(llsl, ashldi3)
COMPILER_RT_ABI di_int
__ashldi3(di_int a, si_int b)
Modified: trunk/contrib/compiler-rt/lib/ashlti3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/ashlti3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/ashlti3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: a << b */
/* Precondition: 0 <= b < bits_in_tword */
@@ -42,4 +42,4 @@
return result.all;
}
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/ashrdi3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/ashrdi3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/ashrdi3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -18,7 +18,7 @@
/* Precondition: 0 <= b < bits_in_dword */
-ARM_EABI_FNALIAS(lasr, ashrdi3);
+ARM_EABI_FNALIAS(lasr, ashrdi3)
COMPILER_RT_ABI di_int
__ashrdi3(di_int a, si_int b)
Modified: trunk/contrib/compiler-rt/lib/ashrti3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/ashrti3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/ashrti3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: arithmetic a >> b */
/* Precondition: 0 <= b < bits_in_tword */
@@ -43,4 +43,4 @@
return result.all;
}
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/assembly.h
===================================================================
--- trunk/contrib/compiler-rt/lib/assembly.h 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/assembly.h 2018-06-04 19:51:38 UTC (rev 10410)
@@ -25,9 +25,11 @@
#if defined(__APPLE__)
#define HIDDEN_DIRECTIVE .private_extern
#define LOCAL_LABEL(name) L_##name
+#define FILE_LEVEL_DIRECTIVE .subsections_via_symbols
#else
#define HIDDEN_DIRECTIVE .hidden
#define LOCAL_LABEL(name) .L_##name
+#define FILE_LEVEL_DIRECTIVE
#endif
#define GLUE2(a, b) a ## b
@@ -42,6 +44,7 @@
#endif
#define DEFINE_COMPILERRT_FUNCTION(name) \
+ FILE_LEVEL_DIRECTIVE SEPARATOR \
.globl SYMBOL_NAME(name) SEPARATOR \
DECLARE_SYMBOL_VISIBILITY(name) \
SYMBOL_NAME(name):
Modified: trunk/contrib/compiler-rt/lib/clzti2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/clzti2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/clzti2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: the number of leading 0-bits */
/* Precondition: a != 0 */
@@ -30,4 +30,4 @@
((si_int)f & ((si_int)(sizeof(di_int) * CHAR_BIT)));
}
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/cmpdi2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/cmpdi2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/cmpdi2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -36,3 +36,16 @@
return 2;
return 1;
}
+
+#ifdef __ARM_EABI__
+/* Returns: if (a < b) returns -1
+* if (a == b) returns 0
+* if (a > b) returns 1
+*/
+COMPILER_RT_ABI si_int
+__aeabi_lcmp(di_int a, di_int b)
+{
+ return __cmpdi2(a, b) - 1;
+}
+#endif
+
Modified: trunk/contrib/compiler-rt/lib/cmpti2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/cmpti2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/cmpti2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: if (a < b) returns 0
* if (a == b) returns 1
* if (a > b) returns 2
@@ -39,4 +39,4 @@
return 1;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/ctzti2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/ctzti2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/ctzti2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: the number of trailing 0-bits */
/* Precondition: a != 0 */
@@ -30,4 +30,4 @@
((si_int)f & ((si_int)(sizeof(di_int) * CHAR_BIT)));
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/divdf3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/divdf3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/divdf3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -19,7 +19,7 @@
#define DOUBLE_PRECISION
#include "fp_lib.h"
-ARM_EABI_FNALIAS(ddiv, divdf3);
+ARM_EABI_FNALIAS(ddiv, divdf3)
fp_t __divdf3(fp_t a, fp_t b) {
Modified: trunk/contrib/compiler-rt/lib/divmoddi4.c
===================================================================
--- trunk/contrib/compiler-rt/lib/divmoddi4.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/divmoddi4.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -16,8 +16,6 @@
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
Modified: trunk/contrib/compiler-rt/lib/divsf3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/divsf3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/divsf3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -19,7 +19,7 @@
#define SINGLE_PRECISION
#include "fp_lib.h"
-ARM_EABI_FNALIAS(fdiv, divsf3);
+ARM_EABI_FNALIAS(fdiv, divsf3)
fp_t __divsf3(fp_t a, fp_t b) {
Modified: trunk/contrib/compiler-rt/lib/divsi3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/divsi3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/divsi3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -18,7 +18,7 @@
/* Returns: a / b */
-ARM_EABI_FNALIAS(idiv, divsi3);
+ARM_EABI_FNALIAS(idiv, divsi3)
COMPILER_RT_ABI si_int
__divsi3(si_int a, si_int b)
@@ -29,5 +29,11 @@
a = (a ^ s_a) - s_a; /* negate if s_a == -1 */
b = (b ^ s_b) - s_b; /* negate if s_b == -1 */
s_a ^= s_b; /* sign of quotient */
- return (__udivsi3(a, b) ^ s_a) - s_a; /* negate if s_a == -1 */
+ /*
+ * On CPUs without unsigned hardware division support,
+ * this calls __udivsi3 (notice the cast to su_int).
+ * On CPUs with unsigned hardware division support,
+ * this uses the unsigned division instruction.
+ */
+ return ((su_int)a/(su_int)b ^ s_a) - s_a; /* negate if s_a == -1 */
}
Modified: trunk/contrib/compiler-rt/lib/divti3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/divti3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/divti3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);
/* Returns: a / b */
@@ -32,4 +32,4 @@
return (__udivmodti4(a, b, (tu_int*)0) ^ s_a) - s_a; /* negate if s_a == -1 */
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/extendsfdf2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/extendsfdf2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/extendsfdf2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -66,7 +66,7 @@
// End helper routines. Conversion implementation follows.
-ARM_EABI_FNALIAS(f2d, extendsfdf2);
+ARM_EABI_FNALIAS(f2d, extendsfdf2)
dst_t __extendsfdf2(src_t a) {
Modified: trunk/contrib/compiler-rt/lib/ffsti2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/ffsti2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/ffsti2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: the index of the least significant 1-bit in a, or
* the value zero if a is zero. The least significant bit is index one.
*/
@@ -34,4 +34,4 @@
return __builtin_ctzll(x.s.low) + 1;
}
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/fixdfdi.c
===================================================================
--- trunk/contrib/compiler-rt/lib/fixdfdi.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/fixdfdi.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -23,9 +23,9 @@
/* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */
-ARM_EABI_FNALIAS(d2lz, fixdfdi);
+ARM_EABI_FNALIAS(d2lz, fixdfdi)
-di_int
+COMPILER_RT_ABI di_int
__fixdfdi(double a)
{
double_bits fb;
Modified: trunk/contrib/compiler-rt/lib/fixdfsi.c
===================================================================
--- trunk/contrib/compiler-rt/lib/fixdfsi.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/fixdfsi.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -18,7 +18,7 @@
#include "int_lib.h"
-ARM_EABI_FNALIAS(d2iz, fixdfsi);
+ARM_EABI_FNALIAS(d2iz, fixdfsi)
int __fixdfsi(fp_t a) {
Modified: trunk/contrib/compiler-rt/lib/fixdfti.c
===================================================================
--- trunk/contrib/compiler-rt/lib/fixdfti.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/fixdfti.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: convert a to a signed long long, rounding toward zero. */
/* Assumption: double is a IEEE 64 bit floating point type
@@ -42,4 +42,4 @@
return (r ^ s) - s;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/fixsfdi.c
===================================================================
--- trunk/contrib/compiler-rt/lib/fixsfdi.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/fixsfdi.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -23,7 +23,7 @@
/* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */
-ARM_EABI_FNALIAS(d2lz, fixsfdi);
+ARM_EABI_FNALIAS(f2lz, fixsfdi)
COMPILER_RT_ABI di_int
__fixsfdi(float a)
Modified: trunk/contrib/compiler-rt/lib/fixsfsi.c
===================================================================
--- trunk/contrib/compiler-rt/lib/fixsfsi.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/fixsfsi.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -16,7 +16,7 @@
#define SINGLE_PRECISION
#include "fp_lib.h"
-ARM_EABI_FNALIAS(f2iz, fixsfsi);
+ARM_EABI_FNALIAS(f2iz, fixsfsi)
COMPILER_RT_ABI int
__fixsfsi(fp_t a) {
Modified: trunk/contrib/compiler-rt/lib/fixsfti.c
===================================================================
--- trunk/contrib/compiler-rt/lib/fixsfti.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/fixsfti.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: convert a to a signed long long, rounding toward zero. */
/* Assumption: float is a IEEE 32 bit floating point type
@@ -42,4 +42,4 @@
return (r ^ s) - s;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/fixunsdfdi.c
===================================================================
--- trunk/contrib/compiler-rt/lib/fixunsdfdi.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/fixunsdfdi.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -26,7 +26,7 @@
/* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */
-ARM_EABI_FNALIAS(d2ulz, fixunsdfdi);
+ARM_EABI_FNALIAS(d2ulz, fixunsdfdi)
COMPILER_RT_ABI du_int
__fixunsdfdi(double a)
Modified: trunk/contrib/compiler-rt/lib/fixunsdfsi.c
===================================================================
--- trunk/contrib/compiler-rt/lib/fixunsdfsi.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/fixunsdfsi.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -26,7 +26,7 @@
/* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */
-ARM_EABI_FNALIAS(d2uiz, fixunsdfsi);
+ARM_EABI_FNALIAS(d2uiz, fixunsdfsi)
COMPILER_RT_ABI su_int
__fixunsdfsi(double a)
Modified: trunk/contrib/compiler-rt/lib/fixunsdfti.c
===================================================================
--- trunk/contrib/compiler-rt/lib/fixunsdfti.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/fixunsdfti.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: convert a to a unsigned long long, rounding toward zero.
* Negative values all become zero.
*/
@@ -44,4 +44,4 @@
return r;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/fixunssfdi.c
===================================================================
--- trunk/contrib/compiler-rt/lib/fixunssfdi.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/fixunssfdi.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -25,7 +25,7 @@
/* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */
-ARM_EABI_FNALIAS(f2ulz, fixunssfdi);
+ARM_EABI_FNALIAS(f2ulz, fixunssfdi)
COMPILER_RT_ABI du_int
__fixunssfdi(float a)
Modified: trunk/contrib/compiler-rt/lib/fixunssfsi.c
===================================================================
--- trunk/contrib/compiler-rt/lib/fixunssfsi.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/fixunssfsi.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -26,7 +26,7 @@
/* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */
-ARM_EABI_FNALIAS(f2uiz, fixunssfsi);
+ARM_EABI_FNALIAS(f2uiz, fixunssfsi)
COMPILER_RT_ABI su_int
__fixunssfsi(float a)
Modified: trunk/contrib/compiler-rt/lib/fixunssfti.c
===================================================================
--- trunk/contrib/compiler-rt/lib/fixunssfti.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/fixunssfti.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: convert a to a unsigned long long, rounding toward zero.
* Negative values all become zero.
*/
@@ -44,4 +44,4 @@
return r;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/fixunsxfti.c
===================================================================
--- trunk/contrib/compiler-rt/lib/fixunsxfti.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/fixunsxfti.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: convert a to a unsigned long long, rounding toward zero.
* Negative values all become zero.
*/
@@ -46,4 +46,4 @@
return r;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/fixxfti.c
===================================================================
--- trunk/contrib/compiler-rt/lib/fixxfti.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/fixxfti.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: convert a to a signed long long, rounding toward zero. */
/* Assumption: long double is an intel 80 bit floating point type padded with 6 bytes
@@ -44,4 +44,4 @@
return (r ^ s) - s;
}
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/floatdidf.c
===================================================================
--- trunk/contrib/compiler-rt/lib/floatdidf.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/floatdidf.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -22,7 +22,7 @@
/* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */
-ARM_EABI_FNALIAS(l2d, floatdidf);
+ARM_EABI_FNALIAS(l2d, floatdidf)
#ifndef __SOFT_FP__
/* Support for systems that have hardware floating-point; we'll set the inexact flag
Modified: trunk/contrib/compiler-rt/lib/floatdisf.c
===================================================================
--- trunk/contrib/compiler-rt/lib/floatdisf.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/floatdisf.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -22,7 +22,7 @@
#include "int_lib.h"
-ARM_EABI_FNALIAS(l2f, floatdisf);
+ARM_EABI_FNALIAS(l2f, floatdisf)
COMPILER_RT_ABI float
__floatdisf(di_int a)
Modified: trunk/contrib/compiler-rt/lib/floatsidf.c
===================================================================
--- trunk/contrib/compiler-rt/lib/floatsidf.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/floatsidf.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -18,7 +18,7 @@
#include "int_lib.h"
-ARM_EABI_FNALIAS(i2d, floatsidf);
+ARM_EABI_FNALIAS(i2d, floatsidf)
fp_t __floatsidf(int a) {
Modified: trunk/contrib/compiler-rt/lib/floatsisf.c
===================================================================
--- trunk/contrib/compiler-rt/lib/floatsisf.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/floatsisf.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -18,7 +18,7 @@
#include "int_lib.h"
-ARM_EABI_FNALIAS(i2f, floatsisf);
+ARM_EABI_FNALIAS(i2f, floatsisf)
fp_t __floatsisf(int a) {
Modified: trunk/contrib/compiler-rt/lib/floattidf.c
===================================================================
--- trunk/contrib/compiler-rt/lib/floattidf.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/floattidf.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: convert a to a double, rounding toward even.*/
/* Assumption: double is a IEEE 64 bit floating point type
@@ -82,4 +82,4 @@
return fb.f;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/floattisf.c
===================================================================
--- trunk/contrib/compiler-rt/lib/floattisf.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/floattisf.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: convert a to a float, rounding toward even. */
/* Assumption: float is a IEEE 32 bit floating point type
@@ -81,4 +81,4 @@
return fb.f;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/floattixf.c
===================================================================
--- trunk/contrib/compiler-rt/lib/floattixf.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/floattixf.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: convert a to a long double, rounding toward even. */
/* Assumption: long double is a IEEE 80 bit floating point type padded to 128 bits
@@ -47,7 +47,7 @@
* P = bit LDBL_MANT_DIG-1 bits to the right of 1
* Q = bit LDBL_MANT_DIG bits to the right of 1
* R = "or" of all bits to the right of Q
- */
+ */
switch (sd)
{
case LDBL_MANT_DIG + 1:
@@ -83,4 +83,4 @@
return fb.f;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/floatundidf.c
===================================================================
--- trunk/contrib/compiler-rt/lib/floatundidf.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/floatundidf.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -22,7 +22,7 @@
#include "int_lib.h"
-ARM_EABI_FNALIAS(ul2d, floatundidf);
+ARM_EABI_FNALIAS(ul2d, floatundidf)
#ifndef __SOFT_FP__
/* Support for systems that have hardware floating-point; we'll set the inexact flag
Modified: trunk/contrib/compiler-rt/lib/floatundisf.c
===================================================================
--- trunk/contrib/compiler-rt/lib/floatundisf.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/floatundisf.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -22,7 +22,7 @@
#include "int_lib.h"
-ARM_EABI_FNALIAS(ul2f, floatundisf);
+ARM_EABI_FNALIAS(ul2f, floatundisf)
COMPILER_RT_ABI float
__floatundisf(du_int a)
Modified: trunk/contrib/compiler-rt/lib/floatunsidf.c
===================================================================
--- trunk/contrib/compiler-rt/lib/floatunsidf.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/floatunsidf.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -18,7 +18,7 @@
#include "int_lib.h"
-ARM_EABI_FNALIAS(ui2d, floatunsidf);
+ARM_EABI_FNALIAS(ui2d, floatunsidf)
fp_t __floatunsidf(unsigned int a) {
Modified: trunk/contrib/compiler-rt/lib/floatunsisf.c
===================================================================
--- trunk/contrib/compiler-rt/lib/floatunsisf.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/floatunsisf.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -18,7 +18,7 @@
#include "int_lib.h"
-ARM_EABI_FNALIAS(ui2f, floatunsisf);
+ARM_EABI_FNALIAS(ui2f, floatunsisf)
fp_t __floatunsisf(unsigned int a) {
Modified: trunk/contrib/compiler-rt/lib/floatuntidf.c
===================================================================
--- trunk/contrib/compiler-rt/lib/floatuntidf.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/floatuntidf.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: convert a to a double, rounding toward even. */
/* Assumption: double is a IEEE 64 bit floating point type
@@ -43,7 +43,7 @@
* P = bit DBL_MANT_DIG-1 bits to the right of 1
* Q = bit DBL_MANT_DIG bits to the right of 1
* R = "or" of all bits to the right of Q
- */
+ */
switch (sd)
{
case DBL_MANT_DIG + 1:
@@ -79,4 +79,4 @@
return fb.f;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/floatuntisf.c
===================================================================
--- trunk/contrib/compiler-rt/lib/floatuntisf.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/floatuntisf.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: convert a to a float, rounding toward even. */
/* Assumption: float is a IEEE 32 bit floating point type
@@ -78,4 +78,4 @@
return fb.f;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/floatuntixf.c
===================================================================
--- trunk/contrib/compiler-rt/lib/floatuntixf.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/floatuntixf.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: convert a to a long double, rounding toward even. */
/* Assumption: long double is a IEEE 80 bit floating point type padded to 128 bits
Modified: trunk/contrib/compiler-rt/lib/fp_lib.h
===================================================================
--- trunk/contrib/compiler-rt/lib/fp_lib.h 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/fp_lib.h 2018-06-04 19:51:38 UTC (rev 10410)
@@ -124,7 +124,7 @@
*lo = *lo << count;
}
-static inline void wideRightShiftWithSticky(rep_t *hi, rep_t *lo, int count) {
+static inline void wideRightShiftWithSticky(rep_t *hi, rep_t *lo, unsigned int count) {
if (count < typeWidth) {
const bool sticky = *lo << (typeWidth - count);
*lo = *hi << (typeWidth - count) | *lo >> count | sticky;
Modified: trunk/contrib/compiler-rt/lib/int_endianness.h
===================================================================
--- trunk/contrib/compiler-rt/lib/int_endianness.h 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/int_endianness.h 2018-06-04 19:51:38 UTC (rev 10410)
@@ -31,7 +31,7 @@
/* .. */
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__minix) || defined(__MidnightBSD__)
#include <sys/endian.h>
#if _BYTE_ORDER == _BIG_ENDIAN
@@ -44,6 +44,19 @@
#endif /* *BSD */
+#if defined(__OpenBSD__) || defined(__Bitrig__)
+#include <machine/endian.h>
+
+#if _BYTE_ORDER == _BIG_ENDIAN
+#define _YUGA_LITTLE_ENDIAN 0
+#define _YUGA_BIG_ENDIAN 1
+#elif _BYTE_ORDER == _LITTLE_ENDIAN
+#define _YUGA_LITTLE_ENDIAN 1
+#define _YUGA_BIG_ENDIAN 0
+#endif /* _BYTE_ORDER */
+
+#endif /* OpenBSD and Bitrig. */
+
/* .. */
/* Mac OSX has __BIG_ENDIAN__ or __LITTLE_ENDIAN__ automatically set by the compiler (at least with GCC) */
@@ -80,6 +93,13 @@
#endif /* GNU/Linux */
+#if defined(_WIN32)
+
+#define _YUGA_LITTLE_ENDIAN 1
+#define _YUGA_BIG_ENDIAN 0
+
+#endif /* Windows */
+
/* . */
#if !defined(_YUGA_LITTLE_ENDIAN) || !defined(_YUGA_BIG_ENDIAN)
Modified: trunk/contrib/compiler-rt/lib/int_lib.h
===================================================================
--- trunk/contrib/compiler-rt/lib/int_lib.h 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/int_lib.h 2018-06-04 19:51:38 UTC (rev 10410)
@@ -25,7 +25,15 @@
#if __ARM_EABI__
# define ARM_EABI_FNALIAS(aeabi_name, name) \
void __aeabi_##aeabi_name() __attribute__((alias("__" #name)));
-# define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
+
+# if !defined(__clang__) && defined(__GNUC__) && \
+ (__GNUC__ < 4 || __GNUC__ == 4 && __GNUC_MINOR__ < 5)
+/* The pcs attribute was introduced in GCC 4.5.0 */
+# define COMPILER_RT_ABI
+# else
+# define COMPILER_RT_ABI __attribute__((pcs("aapcs")))
+# endif
+
#else
# define ARM_EABI_FNALIAS(aeabi_name, name)
# define COMPILER_RT_ABI
@@ -55,7 +63,7 @@
* This problem has only been observed on FreeBSD for sparc64 and
* mips64 with GCC 4.2.1.
*/
-#if defined(__FreeBSD__) && (defined(__sparc64__) || \
+#if defined(__MidnightBSD__) && (defined(__sparc64__) || \
defined(__mips_n64) || defined(__mips_o64))
si_int __clzsi2(si_int);
si_int __ctzsi2(si_int);
Modified: trunk/contrib/compiler-rt/lib/int_types.h
===================================================================
--- trunk/contrib/compiler-rt/lib/int_types.h 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/int_types.h 2018-06-04 19:51:38 UTC (rev 10410)
@@ -56,8 +56,11 @@
}s;
} udwords;
-#if __x86_64
+#if __LP64__
+#define CRT_HAS_128BIT
+#endif
+#ifdef CRT_HAS_128BIT
typedef int ti_int __attribute__ ((mode (TI)));
typedef unsigned tu_int __attribute__ ((mode (TI)));
@@ -105,7 +108,7 @@
return r.all;
}
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */
typedef union
{
Modified: trunk/contrib/compiler-rt/lib/int_util.c
===================================================================
--- trunk/contrib/compiler-rt/lib/int_util.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/int_util.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -29,6 +29,19 @@
panic("%s:%d: abort in %s", file, line, function);
}
+#elif __APPLE__ && !__STATIC__
+
+/* from libSystem.dylib */
+extern void __assert_rtn(const char *func, const char *file,
+ int line, const char * message) __attribute__((noreturn));
+
+__attribute__((weak))
+__attribute__((visibility("hidden")))
+void compilerrt_abort_impl(const char *file, int line, const char *function) {
+ __assert_rtn(function, file, line, "libcompiler_rt abort");
+}
+
+
#else
/* Get the system definition of abort() */
Modified: trunk/contrib/compiler-rt/lib/int_util.h
===================================================================
--- trunk/contrib/compiler-rt/lib/int_util.h 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/int_util.h 2018-06-04 19:51:38 UTC (rev 10410)
@@ -22,11 +22,8 @@
/** \brief Trigger a program abort (or panic for kernel code). */
#define compilerrt_abort() compilerrt_abort_impl(__FILE__, __LINE__, \
__FUNCTION__)
+
void compilerrt_abort_impl(const char *file, int line,
- const char *function)
-#ifndef KERNEL_USE
- __attribute__((weak))
-#endif
- __attribute__((noreturn)) __attribute__((visibility("hidden")));
+ const char *function) __attribute__((noreturn));
#endif /* INT_UTIL_H */
Modified: trunk/contrib/compiler-rt/lib/lshrdi3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/lshrdi3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/lshrdi3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -18,7 +18,7 @@
/* Precondition: 0 <= b < bits_in_dword */
-ARM_EABI_FNALIAS(llsr, lshrdi3);
+ARM_EABI_FNALIAS(llsr, lshrdi3)
COMPILER_RT_ABI di_int
__lshrdi3(di_int a, si_int b)
Modified: trunk/contrib/compiler-rt/lib/lshrti3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/lshrti3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/lshrti3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: logical a >> b */
/* Precondition: 0 <= b < bits_in_tword */
@@ -42,4 +42,4 @@
return result.all;
}
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/modti3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/modti3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/modti3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);
/*Returns: a % b */
@@ -33,4 +33,4 @@
return (r ^ s) - s; /* negate if s == -1 */
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/muldf3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/muldf3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/muldf3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -15,7 +15,7 @@
#define DOUBLE_PRECISION
#include "fp_lib.h"
-ARM_EABI_FNALIAS(dmul, muldf3);
+ARM_EABI_FNALIAS(dmul, muldf3)
COMPILER_RT_ABI fp_t
__muldf3(fp_t a, fp_t b) {
@@ -96,7 +96,7 @@
// a zero of the appropriate sign. Mathematically there is no need to
// handle this case separately, but we make it a special case to
// simplify the shift logic.
- const int shift = 1 - productExponent;
+ const unsigned int shift = 1U - (unsigned int)productExponent;
if (shift >= typeWidth) return fromRep(productSign);
// Otherwise, shift the significand of the result so that the round
Modified: trunk/contrib/compiler-rt/lib/muldi3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/muldi3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/muldi3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -40,7 +40,7 @@
/* Returns: a * b */
-ARM_EABI_FNALIAS(lmul, muldi3);
+ARM_EABI_FNALIAS(lmul, muldi3)
COMPILER_RT_ABI di_int
__muldi3(di_int a, di_int b)
Modified: trunk/contrib/compiler-rt/lib/muloti4.c
===================================================================
--- trunk/contrib/compiler-rt/lib/muloti4.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/muloti4.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: a * b */
/* Effects: sets *overflow to 1 if a * b overflows */
@@ -59,4 +59,4 @@
return result;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/mulsf3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/mulsf3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/mulsf3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -15,7 +15,7 @@
#define SINGLE_PRECISION
#include "fp_lib.h"
-ARM_EABI_FNALIAS(fmul, mulsf3);
+ARM_EABI_FNALIAS(fmul, mulsf3)
COMPILER_RT_ABI fp_t
__mulsf3(fp_t a, fp_t b) {
@@ -92,7 +92,7 @@
if (productExponent <= 0) {
// Result is denormal before rounding, the exponent is zero and we
// need to shift the significand.
- wideRightShiftWithSticky(&productHi, &productLo, 1 - productExponent);
+ wideRightShiftWithSticky(&productHi, &productLo, 1U - (unsigned)productExponent);
}
else {
Modified: trunk/contrib/compiler-rt/lib/multi3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/multi3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/multi3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: a * b */
static
@@ -55,4 +55,4 @@
return r.all;
}
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/mulvti3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/mulvti3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/mulvti3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: a * b */
/* Effects: aborts if a * b overflows */
@@ -57,4 +57,4 @@
return a * b;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/negdf2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/negdf2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/negdf2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -14,7 +14,7 @@
#define DOUBLE_PRECISION
#include "fp_lib.h"
-ARM_EABI_FNALIAS(dneg, negdf2);
+ARM_EABI_FNALIAS(dneg, negdf2)
fp_t __negdf2(fp_t a) {
return fromRep(toRep(a) ^ signBit);
Modified: trunk/contrib/compiler-rt/lib/negsf2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/negsf2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/negsf2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -14,7 +14,7 @@
#define SINGLE_PRECISION
#include "fp_lib.h"
-ARM_EABI_FNALIAS(fneg, negsf2);
+ARM_EABI_FNALIAS(fneg, negsf2)
COMPILER_RT_ABI fp_t
__negsf2(fp_t a) {
Modified: trunk/contrib/compiler-rt/lib/negti2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/negti2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/negti2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: -a */
ti_int
@@ -27,4 +27,4 @@
return -a;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/negvti2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/negvti2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/negvti2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
*===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: -a */
/* Effects: aborts if -a overflows */
@@ -29,4 +29,4 @@
return -a;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/parityti2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/parityti2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/parityti2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: 1 if number of bits is odd else returns 0 */
si_int __paritydi2(di_int a);
@@ -28,4 +28,4 @@
return __paritydi2(x.s.high ^ x.s.low);
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/popcountti2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/popcountti2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/popcountti2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: count of 1 bits */
si_int
@@ -41,4 +41,4 @@
return (x + (x >> 8)) & 0xFF; /* (8 significant bits) */
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/powitf2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/powitf2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/powitf2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
+#include "int_lib.h"
+
#if _ARCH_PPC
-#include "int_lib.h"
-
/* Returns: a ^ b */
long double
Modified: trunk/contrib/compiler-rt/lib/subdf3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/subdf3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/subdf3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -18,7 +18,7 @@
fp_t COMPILER_RT_ABI __adddf3(fp_t a, fp_t b);
-ARM_EABI_FNALIAS(dsub, subdf3);
+ARM_EABI_FNALIAS(dsub, subdf3)
// Subtraction; flip the sign bit of b and add.
COMPILER_RT_ABI fp_t
Modified: trunk/contrib/compiler-rt/lib/subsf3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/subsf3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/subsf3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -17,7 +17,7 @@
fp_t COMPILER_RT_ABI __addsf3(fp_t a, fp_t b);
-ARM_EABI_FNALIAS(fsub, subsf3);
+ARM_EABI_FNALIAS(fsub, subsf3)
// Subtraction; flip the sign bit of b and add.
COMPILER_RT_ABI fp_t
Modified: trunk/contrib/compiler-rt/lib/subvti3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/subvti3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/subvti3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: a - b */
/* Effects: aborts if a - b overflows */
@@ -37,4 +37,4 @@
return s;
}
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/truncdfsf2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/truncdfsf2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/truncdfsf2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -64,7 +64,7 @@
// End helper routines. Conversion implementation follows.
-ARM_EABI_FNALIAS(d2f, truncdfsf2);
+ARM_EABI_FNALIAS(d2f, truncdfsf2)
COMPILER_RT_ABI dst_t
__truncdfsf2(src_t a) {
Modified: trunk/contrib/compiler-rt/lib/ucmpdi2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/ucmpdi2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/ucmpdi2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -36,3 +36,16 @@
return 2;
return 1;
}
+
+#ifdef __ARM_EABI__
+/* Returns: if (a < b) returns -1
+* if (a == b) returns 0
+* if (a > b) returns 1
+*/
+COMPILER_RT_ABI si_int
+__aeabi_ulcmp(di_int a, di_int b)
+{
+ return __ucmpdi2(a, b) - 1;
+}
+#endif
+
Modified: trunk/contrib/compiler-rt/lib/ucmpti2.c
===================================================================
--- trunk/contrib/compiler-rt/lib/ucmpti2.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/ucmpti2.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Returns: if (a < b) returns 0
* if (a == b) returns 1
* if (a > b) returns 2
@@ -39,4 +39,4 @@
return 1;
}
-#endif
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/udivmoddi4.c
===================================================================
--- trunk/contrib/compiler-rt/lib/udivmoddi4.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/udivmoddi4.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -20,8 +20,6 @@
/* Translated from Figure 3-40 of The PowerPC Compiler Writer's Guide */
-ARM_EABI_FNALIAS(uldivmod, udivmoddi4);
-
COMPILER_RT_ABI du_int
__udivmoddi4(du_int a, du_int b, du_int* rem)
{
Modified: trunk/contrib/compiler-rt/lib/udivmodti4.c
===================================================================
--- trunk/contrib/compiler-rt/lib/udivmodti4.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/udivmodti4.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
/* Effects: if rem != 0, *rem = a % b
* Returns: a / b
*/
@@ -253,4 +253,4 @@
return q.all;
}
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/udivsi3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/udivsi3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/udivsi3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -18,8 +18,9 @@
/* Translated from Figure 3-40 of The PowerPC Compiler Writer's Guide */
-ARM_EABI_FNALIAS(uidiv, udivsi3);
+ARM_EABI_FNALIAS(uidiv, udivsi3)
+/* This function should not call __divsi3! */
COMPILER_RT_ABI su_int
__udivsi3(su_int n, su_int d)
{
Modified: trunk/contrib/compiler-rt/lib/udivti3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/udivti3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/udivti3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);
/* Returns: a / b */
@@ -26,4 +26,4 @@
return __udivmodti4(a, b, 0);
}
-#endif /* __x86_64 */
+#endif /* CRT_HAS_128BIT */
Modified: trunk/contrib/compiler-rt/lib/umodti3.c
===================================================================
--- trunk/contrib/compiler-rt/lib/umodti3.c 2018-06-04 19:49:07 UTC (rev 10409)
+++ trunk/contrib/compiler-rt/lib/umodti3.c 2018-06-04 19:51:38 UTC (rev 10410)
@@ -12,10 +12,10 @@
* ===----------------------------------------------------------------------===
*/
-#if __x86_64
-
#include "int_lib.h"
+#ifdef CRT_HAS_128BIT
+
tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);
/* Returns: a % b */
@@ -28,4 +28,4 @@
return r;
}
-#endif
+#endif /* CRT_HAS_128BIT */
More information about the Midnightbsd-cvs
mailing list