Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/compiler_rt/dist Import compiler-rt r199273...
details: https://anonhg.NetBSD.org/src/rev/7a0b2b89330c
branches: trunk
changeset: 326006:7a0b2b89330c
user: joerg <joerg%NetBSD.org@localhost>
date: Wed Jan 15 21:06:10 2014 +0000
description:
Import compiler-rt r199273. Support libkern/libsa alternative headers.
Mark assembler functions as such to prevent ld snafu.
diffstat:
sys/external/bsd/compiler_rt/dist/LICENSE.TXT | 4 +-
sys/external/bsd/compiler_rt/dist/lib/arm/comparesf2.S | 17 +-
sys/external/bsd/compiler_rt/dist/lib/arm/divmodsi4.S | 2 +-
sys/external/bsd/compiler_rt/dist/lib/arm/divsi3.S | 2 +-
sys/external/bsd/compiler_rt/dist/lib/arm/modsi3.S | 2 +-
sys/external/bsd/compiler_rt/dist/lib/arm/switch16.S | 3 +-
sys/external/bsd/compiler_rt/dist/lib/arm/switch32.S | 5 +-
sys/external/bsd/compiler_rt/dist/lib/arm/switch8.S | 3 +-
sys/external/bsd/compiler_rt/dist/lib/arm/switchu8.S | 3 +-
sys/external/bsd/compiler_rt/dist/lib/arm/udivmodsi4.S | 5 +-
sys/external/bsd/compiler_rt/dist/lib/arm/udivsi3.S | 5 +-
sys/external/bsd/compiler_rt/dist/lib/arm/umodsi3.S | 5 +-
sys/external/bsd/compiler_rt/dist/lib/assembly.h | 8 +-
sys/external/bsd/compiler_rt/dist/lib/eprintf.c | 2 +
sys/external/bsd/compiler_rt/dist/lib/int_endianness.h | 8 +-
sys/external/bsd/compiler_rt/dist/lib/int_lib.h | 18 +-
sys/external/bsd/compiler_rt/dist/lib/int_util.c | 9 +-
sys/external/bsd/compiler_rt/dist/lib/profile/GCDAProfiling.c | 122 +++++++--
sys/external/bsd/compiler_rt/dist/lib/profile/PGOProfiling.c | 82 ++++++
19 files changed, 250 insertions(+), 55 deletions(-)
diffs (truncated from 721 to 300 lines):
diff -r e128140b9a06 -r 7a0b2b89330c sys/external/bsd/compiler_rt/dist/LICENSE.TXT
--- a/sys/external/bsd/compiler_rt/dist/LICENSE.TXT Wed Jan 15 20:58:53 2014 +0000
+++ b/sys/external/bsd/compiler_rt/dist/LICENSE.TXT Wed Jan 15 21:06:10 2014 +0000
@@ -14,7 +14,7 @@
University of Illinois/NCSA
Open Source License
-Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT
All rights reserved.
@@ -55,7 +55,7 @@
==============================================================================
-Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT
+Copyright (c) 2009-2014 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
diff -r e128140b9a06 -r 7a0b2b89330c sys/external/bsd/compiler_rt/dist/lib/arm/comparesf2.S
--- a/sys/external/bsd/compiler_rt/dist/lib/arm/comparesf2.S Wed Jan 15 20:58:53 2014 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/arm/comparesf2.S Wed Jan 15 21:06:10 2014 +0000
@@ -59,12 +59,14 @@
// Next, we check if a and b have the same or different signs. If they have
// opposite signs, this eor will set the N flag.
+ it ne
eorsne r12, r0, r1
// If a and b are equal (either both zeros or bit identical; again, we're
// ignoring NaNs for now), this subtract will zero out r0. If they have the
// same sign, the flags are updated as they would be for a comparison of the
// absolute values of a and b.
+ it pl
subspl r0, r2, r3
// If a is smaller in magnitude than b and both have the same sign, place
@@ -77,23 +79,27 @@
// still clear from the shift argument in orrs; if a is positive and b
// negative, this places 0 in r0; if a is negative and b positive, -1 is
// placed in r0.
+ it lo
mvnlo r0, r1, asr #31
// If a is greater in magnitude than b and both have the same sign, place
// the sign of b in r0. Thus, if both are negative and a < b, -1 is placed
// in r0, which is the desired result. Conversely, if both are positive
// and a > b, zero is placed in r0.
+ it hi
movhi r0, r1, asr #31
// If you've been keeping track, at this point r0 contains -1 if a < b and
// 0 if a >= b. All that remains to be done is to set it to 1 if a > b.
// If a == b, then the Z flag is set, so we can get the correct final value
// into r0 by simply or'ing with 1 if Z is clear.
- orrne r0, r0, #1
+ it ne
+ orrne r0, r0, #1
// Finally, we need to deal with NaNs. If either argument is NaN, replace
// the value in r0 with 1.
cmp r2, #0xff000000
+ ite ls
cmpls r3, #0xff000000
movhi r0, #1
bx lr
@@ -108,12 +114,18 @@
mov r2, r0, lsl #1
mov r3, r1, lsl #1
orrs r12, r2, r3, lsr #1
+ it ne
eorsne r12, r0, r1
+ it pl
subspl r0, r2, r3
+ it lo
mvnlo r0, r1, asr #31
+ it hi
movhi r0, r1, asr #31
- orrne r0, r0, #1
+ it ne
+ orrne r0, r0, #1
cmp r2, #0xff000000
+ ite ls
cmpls r3, #0xff000000
movhi r0, #-1
bx lr
@@ -125,6 +137,7 @@
mov r3, r1, lsl #1
mov r0, #0
cmp r2, #0xff000000
+ ite ls
cmpls r3, #0xff000000
movhi r0, #1
bx lr
diff -r e128140b9a06 -r 7a0b2b89330c sys/external/bsd/compiler_rt/dist/lib/arm/divmodsi4.S
--- a/sys/external/bsd/compiler_rt/dist/lib/arm/divmodsi4.S Wed Jan 15 20:58:53 2014 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/arm/divmodsi4.S Wed Jan 15 21:06:10 2014 +0000
@@ -24,7 +24,7 @@
.syntax unified
.align 3
DEFINE_COMPILERRT_FUNCTION(__divmodsi4)
-#if __ARM_ARCH_7S__
+#if __ARM_ARCH_EXT_IDIV__
tst r1, r1
beq LOCAL_LABEL(divzero)
mov r3, r0
diff -r e128140b9a06 -r 7a0b2b89330c sys/external/bsd/compiler_rt/dist/lib/arm/divsi3.S
--- a/sys/external/bsd/compiler_rt/dist/lib/arm/divsi3.S Wed Jan 15 20:58:53 2014 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/arm/divsi3.S Wed Jan 15 21:06:10 2014 +0000
@@ -25,7 +25,7 @@
// 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)
-#if __ARM_ARCH_7S__
+#if __ARM_ARCH_EXT_IDIV__
tst r1,r1
beq LOCAL_LABEL(divzero)
sdiv r0, r0, r1
diff -r e128140b9a06 -r 7a0b2b89330c sys/external/bsd/compiler_rt/dist/lib/arm/modsi3.S
--- a/sys/external/bsd/compiler_rt/dist/lib/arm/modsi3.S Wed Jan 15 20:58:53 2014 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/arm/modsi3.S Wed Jan 15 21:06:10 2014 +0000
@@ -23,7 +23,7 @@
.syntax unified
.align 3
DEFINE_COMPILERRT_FUNCTION(__modsi3)
-#if __ARM_ARCH_7S__
+#if __ARM_ARCH_EXT_IDIV__
tst r1, r1
beq LOCAL_LABEL(divzero)
sdiv r2, r0, r1
diff -r e128140b9a06 -r 7a0b2b89330c sys/external/bsd/compiler_rt/dist/lib/arm/switch16.S
--- a/sys/external/bsd/compiler_rt/dist/lib/arm/switch16.S Wed Jan 15 20:58:53 2014 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/arm/switch16.S Wed Jan 15 21:06:10 2014 +0000
@@ -34,8 +34,9 @@
ldrh ip, [lr, #-1] // get first 16-bit word in table
cmp r0, ip // compare with index
add r0, lr, r0, lsl #1 // compute address of element in table
- ldrshcc r0, [r0, #1] // load 16-bit element if r0 is in range
add ip, lr, ip, lsl #1 // compute address of last element in table
+ ite lo
+ ldrshlo r0, [r0, #1] // load 16-bit element if r0 is in range
ldrshhs r0, [ip, #1] // load 16-bit element if r0 out of range
add ip, lr, r0, lsl #1 // compute label = lr + element*2
bx ip // jump to computed label
diff -r e128140b9a06 -r 7a0b2b89330c sys/external/bsd/compiler_rt/dist/lib/arm/switch32.S
--- a/sys/external/bsd/compiler_rt/dist/lib/arm/switch32.S Wed Jan 15 20:58:53 2014 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/arm/switch32.S Wed Jan 15 21:06:10 2014 +0000
@@ -34,9 +34,10 @@
ldr ip, [lr, #-1] // get first 32-bit word in table
cmp r0, ip // compare with index
add r0, lr, r0, lsl #2 // compute address of element in table
- ldrcc r0, [r0, #3] // load 32-bit element if r0 is in range
add ip, lr, ip, lsl #2 // compute address of last element in table
- ldrcs r0, [ip, #3] // load 32-bit element if r0 out of range
+ ite lo
+ ldrlo r0, [r0, #3] // load 32-bit element if r0 is in range
+ ldrhs r0, [ip, #3] // load 32-bit element if r0 out of range
add ip, lr, r0 // compute label = lr + element
bx ip // jump to computed label
diff -r e128140b9a06 -r 7a0b2b89330c sys/external/bsd/compiler_rt/dist/lib/arm/switch8.S
--- a/sys/external/bsd/compiler_rt/dist/lib/arm/switch8.S Wed Jan 15 20:58:53 2014 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/arm/switch8.S Wed Jan 15 21:06:10 2014 +0000
@@ -33,7 +33,8 @@
DEFINE_COMPILERRT_PRIVATE_FUNCTION(__switch8)
ldrb ip, [lr, #-1] // get first byte in table
cmp r0, ip // signed compare with index
- ldrsbcc r0, [lr, r0] // get indexed byte out of table
+ ite lo
+ ldrsblo r0, [lr, r0] // get indexed byte out of table
ldrsbhs r0, [lr, ip] // if out of range, use last entry in table
add ip, lr, r0, lsl #1 // compute label = lr + element*2
bx ip // jump to computed label
diff -r e128140b9a06 -r 7a0b2b89330c sys/external/bsd/compiler_rt/dist/lib/arm/switchu8.S
--- a/sys/external/bsd/compiler_rt/dist/lib/arm/switchu8.S Wed Jan 15 20:58:53 2014 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/arm/switchu8.S Wed Jan 15 21:06:10 2014 +0000
@@ -33,7 +33,8 @@
DEFINE_COMPILERRT_PRIVATE_FUNCTION(__switchu8)
ldrb ip, [lr, #-1] // get first byte in table
cmp r0, ip // compare with index
- ldrbcc r0, [lr, r0] // get indexed byte out of table
+ ite lo
+ ldrblo r0, [lr, r0] // get indexed byte out of table
ldrbhs r0, [lr, ip] // if out of range, use last entry in table
add ip, lr, r0, lsl #1 // compute label = lr + element*2
bx ip // jump to computed label
diff -r e128140b9a06 -r 7a0b2b89330c sys/external/bsd/compiler_rt/dist/lib/arm/udivmodsi4.S
--- a/sys/external/bsd/compiler_rt/dist/lib/arm/udivmodsi4.S Wed Jan 15 20:58:53 2014 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/arm/udivmodsi4.S Wed Jan 15 21:06:10 2014 +0000
@@ -31,7 +31,7 @@
.syntax unified
.align 3
DEFINE_COMPILERRT_FUNCTION(__udivmodsi4)
-#if __ARM_ARCH_7S__
+#if __ARM_ARCH_EXT_IDIV__
tst r1, r1
beq LOCAL_LABEL(divzero)
mov r3, r0
@@ -74,14 +74,17 @@
// this way, we can merge the two branches which is a substantial win for
// such a tight loop on current ARM architectures.
subs r, a, b, lsl i
+ itt hs
orrhs q, q,one, lsl i
movhs a, r
+ it ne
subsne i, i, #1
bhi LOCAL_LABEL(mainLoop)
// Do the final test subtraction and update of quotient (i == 0), as it is
// not performed in the main loop.
subs r, a, b
+ itt hs
orrhs q, #1
movhs a, r
diff -r e128140b9a06 -r 7a0b2b89330c sys/external/bsd/compiler_rt/dist/lib/arm/udivsi3.S
--- a/sys/external/bsd/compiler_rt/dist/lib/arm/udivsi3.S Wed Jan 15 20:58:53 2014 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/arm/udivsi3.S Wed Jan 15 21:06:10 2014 +0000
@@ -33,7 +33,7 @@
// 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__
+#if __ARM_ARCH_EXT_IDIV__
tst r1,r1
beq LOCAL_LABEL(divzero)
udiv r0, r0, r1
@@ -73,14 +73,17 @@
// this way, we can merge the two branches which is a substantial win for
// such a tight loop on current ARM architectures.
subs r, a, b, lsl i
+ itt hs
orrhs q, q,one, lsl i
movhs a, r
+ it ne
subsne i, i, #1
bhi LOCAL_LABEL(mainLoop)
// Do the final test subtraction and update of quotient (i == 0), as it is
// not performed in the main loop.
subs r, a, b
+ it hs
orrhs q, #1
LOCAL_LABEL(return):
diff -r e128140b9a06 -r 7a0b2b89330c sys/external/bsd/compiler_rt/dist/lib/arm/umodsi3.S
--- a/sys/external/bsd/compiler_rt/dist/lib/arm/umodsi3.S Wed Jan 15 20:58:53 2014 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/arm/umodsi3.S Wed Jan 15 21:06:10 2014 +0000
@@ -23,7 +23,7 @@
.syntax unified
.align 3
DEFINE_COMPILERRT_FUNCTION(__umodsi3)
-#if __ARM_ARCH_7S__
+#if __ARM_ARCH_EXT_IDIV__
tst r1, r1
beq LOCAL_LABEL(divzero)
udiv r2, r0, r1
@@ -57,13 +57,16 @@
// this way, we can merge the two branches which is a substantial win for
// such a tight loop on current ARM architectures.
subs r, a, b, lsl i
+ it hs
movhs a, r
+ it ne
subsne i, i, #1
bhi LOCAL_LABEL(mainLoop)
// Do the final test subtraction and update of remainder (i == 0), as it is
// not performed in the main loop.
subs r, a, b
+ it hs
movhs a, r
bx lr
#endif
diff -r e128140b9a06 -r 7a0b2b89330c sys/external/bsd/compiler_rt/dist/lib/assembly.h
--- a/sys/external/bsd/compiler_rt/dist/lib/assembly.h Wed Jan 15 20:58:53 2014 +0000
+++ b/sys/external/bsd/compiler_rt/dist/lib/assembly.h Wed Jan 15 21:06:10 2014 +0000
@@ -26,10 +26,12 @@
#define HIDDEN_DIRECTIVE .private_extern
#define LOCAL_LABEL(name) L_##name
#define FILE_LEVEL_DIRECTIVE .subsections_via_symbols
+#define SYMBOL_IS_FUNC(name)
#else
#define HIDDEN_DIRECTIVE .hidden
#define LOCAL_LABEL(name) .L_##name
-#define FILE_LEVEL_DIRECTIVE
+#define FILE_LEVEL_DIRECTIVE
+#define SYMBOL_IS_FUNC(name) .type name, @function
#endif
#define GLUE2(a, b) a ## b
@@ -46,21 +48,25 @@
#define DEFINE_COMPILERRT_FUNCTION(name) \
FILE_LEVEL_DIRECTIVE SEPARATOR \
.globl SYMBOL_NAME(name) SEPARATOR \
+ SYMBOL_IS_FUNC(SYMBOL_NAME(name)) SEPARATOR \
DECLARE_SYMBOL_VISIBILITY(name) \
Home |
Main Index |
Thread Index |
Old Index