summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-03-31 17:00:45 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-03-31 17:00:45 +0000
commitf28700879116ee0343bfd05317d46756142de6b4 (patch)
treee50a57cbcd41391a5ea042541de043d86427b174
parentf4512a3a9d755d254596eba26eb83d21813a23e1 (diff)
downloadbcm5719-llvm-f28700879116ee0343bfd05317d46756142de6b4.tar.gz
bcm5719-llvm-f28700879116ee0343bfd05317d46756142de6b4.zip
Use a private compilerrt_abort() define instead of calling abort directly.
- Fiddling with abort directly is annoying given the way we use system includes, although it would be nice to fix this so we could make sure calling abort directly is verboten. llvm-svn: 100014
-rw-r--r--compiler-rt/lib/absvdi2.c2
-rw-r--r--compiler-rt/lib/absvsi2.c2
-rw-r--r--compiler-rt/lib/absvti2.c2
-rw-r--r--compiler-rt/lib/addvdi3.c4
-rw-r--r--compiler-rt/lib/addvsi3.c4
-rw-r--r--compiler-rt/lib/addvti3.c4
-rw-r--r--compiler-rt/lib/clear_cache.c2
-rw-r--r--compiler-rt/lib/eprintf.c3
-rw-r--r--compiler-rt/lib/gcc_personality_v0.c4
-rw-r--r--compiler-rt/lib/int_lib.h2
-rw-r--r--compiler-rt/lib/mulvdi3.c8
-rw-r--r--compiler-rt/lib/mulvsi3.c8
-rw-r--r--compiler-rt/lib/mulvti3.c8
-rw-r--r--compiler-rt/lib/negvdi2.c2
-rw-r--r--compiler-rt/lib/negvsi2.c2
-rw-r--r--compiler-rt/lib/negvti2.c2
-rw-r--r--compiler-rt/lib/subvdi3.c4
-rw-r--r--compiler-rt/lib/subvsi3.c4
-rw-r--r--compiler-rt/lib/subvti3.c4
-rw-r--r--compiler-rt/lib/trampoline_setup.c2
20 files changed, 38 insertions, 35 deletions
diff --git a/compiler-rt/lib/absvdi2.c b/compiler-rt/lib/absvdi2.c
index 396802c5c2c..919afd1351d 100644
--- a/compiler-rt/lib/absvdi2.c
+++ b/compiler-rt/lib/absvdi2.c
@@ -24,7 +24,7 @@ __absvdi2(di_int a)
{
const int N = (int)(sizeof(di_int) * CHAR_BIT);
if (a == ((di_int)1 << (N-1)))
- abort();
+ compilerrt_abort();
const di_int t = a >> (N - 1);
return (a ^ t) - t;
}
diff --git a/compiler-rt/lib/absvsi2.c b/compiler-rt/lib/absvsi2.c
index 0c08bf045fa..a2c8e3f1905 100644
--- a/compiler-rt/lib/absvsi2.c
+++ b/compiler-rt/lib/absvsi2.c
@@ -24,7 +24,7 @@ __absvsi2(si_int a)
{
const int N = (int)(sizeof(si_int) * CHAR_BIT);
if (a == (1 << (N-1)))
- abort();
+ compilerrt_abort();
const si_int t = a >> (N - 1);
return (a ^ t) - t;
}
diff --git a/compiler-rt/lib/absvti2.c b/compiler-rt/lib/absvti2.c
index c71275ed401..0978122dcee 100644
--- a/compiler-rt/lib/absvti2.c
+++ b/compiler-rt/lib/absvti2.c
@@ -26,7 +26,7 @@ __absvti2(ti_int a)
{
const int N = (int)(sizeof(ti_int) * CHAR_BIT);
if (a == ((ti_int)1 << (N-1)))
- abort();
+ compilerrt_abort();
const ti_int s = a >> (N - 1);
return (a ^ s) - s;
}
diff --git a/compiler-rt/lib/addvdi3.c b/compiler-rt/lib/addvdi3.c
index 8b885f53fe4..53ab1024bd6 100644
--- a/compiler-rt/lib/addvdi3.c
+++ b/compiler-rt/lib/addvdi3.c
@@ -26,12 +26,12 @@ __addvdi3(di_int a, di_int b)
if (b >= 0)
{
if (s < a)
- abort();
+ compilerrt_abort();
}
else
{
if (s >= a)
- abort();
+ compilerrt_abort();
}
return s;
}
diff --git a/compiler-rt/lib/addvsi3.c b/compiler-rt/lib/addvsi3.c
index 603c680c68d..22cd3154ce6 100644
--- a/compiler-rt/lib/addvsi3.c
+++ b/compiler-rt/lib/addvsi3.c
@@ -26,12 +26,12 @@ __addvsi3(si_int a, si_int b)
if (b >= 0)
{
if (s < a)
- abort();
+ compilerrt_abort();
}
else
{
if (s >= a)
- abort();
+ compilerrt_abort();
}
return s;
}
diff --git a/compiler-rt/lib/addvti3.c b/compiler-rt/lib/addvti3.c
index afc3e3b9057..3df1a742ce3 100644
--- a/compiler-rt/lib/addvti3.c
+++ b/compiler-rt/lib/addvti3.c
@@ -28,12 +28,12 @@ __addvti3(ti_int a, ti_int b)
if (b >= 0)
{
if (s < a)
- abort();
+ compilerrt_abort();
}
else
{
if (s >= a)
- abort();
+ compilerrt_abort();
}
return s;
}
diff --git a/compiler-rt/lib/clear_cache.c b/compiler-rt/lib/clear_cache.c
index 1456823df20..ddc48bcc56e 100644
--- a/compiler-rt/lib/clear_cache.c
+++ b/compiler-rt/lib/clear_cache.c
@@ -33,7 +33,7 @@ void __clear_cache(void* start, void* end)
/* On Darwin, sys_icache_invalidate() provides this functionality */
sys_icache_invalidate(start, end-start);
#else
- abort();
+ compilerrt_abort();
#endif
#endif
}
diff --git a/compiler-rt/lib/eprintf.c b/compiler-rt/lib/eprintf.c
index 8d9ce327a60..786fe6aaa67 100644
--- a/compiler-rt/lib/eprintf.c
+++ b/compiler-rt/lib/eprintf.c
@@ -10,6 +10,7 @@
+#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
@@ -28,5 +29,5 @@ void __eprintf(const char* format, const char* assertion_expression,
{
fprintf(stderr, format, assertion_expression, line, file);
fflush(stderr);
- abort();
+ compilerrt_abort();
}
diff --git a/compiler-rt/lib/gcc_personality_v0.c b/compiler-rt/lib/gcc_personality_v0.c
index b0d93b8a110..862b60539af 100644
--- a/compiler-rt/lib/gcc_personality_v0.c
+++ b/compiler-rt/lib/gcc_personality_v0.c
@@ -142,7 +142,7 @@ static uintptr_t readEncodedPointer(const uint8_t** data, uint8_t encoding)
case DW_EH_PE_sleb128:
default:
/* not supported */
- abort();
+ compilerrt_abort();
break;
}
@@ -160,7 +160,7 @@ static uintptr_t readEncodedPointer(const uint8_t** data, uint8_t encoding)
case DW_EH_PE_aligned:
default:
/* not supported */
- abort();
+ compilerrt_abort();
break;
}
diff --git a/compiler-rt/lib/int_lib.h b/compiler-rt/lib/int_lib.h
index f37d500dd11..f6c2dd45ed8 100644
--- a/compiler-rt/lib/int_lib.h
+++ b/compiler-rt/lib/int_lib.h
@@ -23,6 +23,8 @@
#include "endianness.h"
#include <math.h>
+#define compilerrt_abort() abort()
+
#if !defined(INFINITY) && defined(HUGE_VAL)
#define INFINITY HUGE_VAL
#endif /* INFINITY */
diff --git a/compiler-rt/lib/mulvdi3.c b/compiler-rt/lib/mulvdi3.c
index ebb776950fb..295ae18d3c8 100644
--- a/compiler-rt/lib/mulvdi3.c
+++ b/compiler-rt/lib/mulvdi3.c
@@ -29,13 +29,13 @@ __mulvdi3(di_int a, di_int b)
{
if (b == 0 || b == 1)
return a * b;
- abort();
+ compilerrt_abort();
}
if (b == MIN)
{
if (a == 0 || a == 1)
return a * b;
- abort();
+ compilerrt_abort();
}
di_int sa = a >> (N - 1);
di_int abs_a = (a ^ sa) - sa;
@@ -46,12 +46,12 @@ __mulvdi3(di_int a, di_int b)
if (sa == sb)
{
if (abs_a > MAX / abs_b)
- abort();
+ compilerrt_abort();
}
else
{
if (abs_a > MIN / -abs_b)
- abort();
+ compilerrt_abort();
}
return a * b;
}
diff --git a/compiler-rt/lib/mulvsi3.c b/compiler-rt/lib/mulvsi3.c
index 9edeee2dd2c..b4a509be209 100644
--- a/compiler-rt/lib/mulvsi3.c
+++ b/compiler-rt/lib/mulvsi3.c
@@ -29,13 +29,13 @@ __mulvsi3(si_int a, si_int b)
{
if (b == 0 || b == 1)
return a * b;
- abort();
+ compilerrt_abort();
}
if (b == MIN)
{
if (a == 0 || a == 1)
return a * b;
- abort();
+ compilerrt_abort();
}
si_int sa = a >> (N - 1);
si_int abs_a = (a ^ sa) - sa;
@@ -46,12 +46,12 @@ __mulvsi3(si_int a, si_int b)
if (sa == sb)
{
if (abs_a > MAX / abs_b)
- abort();
+ compilerrt_abort();
}
else
{
if (abs_a > MIN / -abs_b)
- abort();
+ compilerrt_abort();
}
return a * b;
}
diff --git a/compiler-rt/lib/mulvti3.c b/compiler-rt/lib/mulvti3.c
index 080cd635ff8..778222ee6c9 100644
--- a/compiler-rt/lib/mulvti3.c
+++ b/compiler-rt/lib/mulvti3.c
@@ -31,13 +31,13 @@ __mulvti3(ti_int a, ti_int b)
{
if (b == 0 || b == 1)
return a * b;
- abort();
+ compilerrt_abort();
}
if (b == MIN)
{
if (a == 0 || a == 1)
return a * b;
- abort();
+ compilerrt_abort();
}
ti_int sa = a >> (N - 1);
ti_int abs_a = (a ^ sa) - sa;
@@ -48,12 +48,12 @@ __mulvti3(ti_int a, ti_int b)
if (sa == sb)
{
if (abs_a > MAX / abs_b)
- abort();
+ compilerrt_abort();
}
else
{
if (abs_a > MIN / -abs_b)
- abort();
+ compilerrt_abort();
}
return a * b;
}
diff --git a/compiler-rt/lib/negvdi2.c b/compiler-rt/lib/negvdi2.c
index df8a69824c8..0baf377400e 100644
--- a/compiler-rt/lib/negvdi2.c
+++ b/compiler-rt/lib/negvdi2.c
@@ -24,6 +24,6 @@ __negvdi2(di_int a)
{
const di_int MIN = (di_int)1 << ((int)(sizeof(di_int) * CHAR_BIT)-1);
if (a == MIN)
- abort();
+ compilerrt_abort();
return -a;
}
diff --git a/compiler-rt/lib/negvsi2.c b/compiler-rt/lib/negvsi2.c
index a7fbbbd1fcc..e5a36a5dacf 100644
--- a/compiler-rt/lib/negvsi2.c
+++ b/compiler-rt/lib/negvsi2.c
@@ -24,6 +24,6 @@ __negvsi2(si_int a)
{
const si_int MIN = (si_int)1 << ((int)(sizeof(si_int) * CHAR_BIT)-1);
if (a == MIN)
- abort();
+ compilerrt_abort();
return -a;
}
diff --git a/compiler-rt/lib/negvti2.c b/compiler-rt/lib/negvti2.c
index df44935f1a7..d56e1e32ade 100644
--- a/compiler-rt/lib/negvti2.c
+++ b/compiler-rt/lib/negvti2.c
@@ -26,7 +26,7 @@ __negvti2(ti_int a)
{
const ti_int MIN = (ti_int)1 << ((int)(sizeof(ti_int) * CHAR_BIT)-1);
if (a == MIN)
- abort();
+ compilerrt_abort();
return -a;
}
diff --git a/compiler-rt/lib/subvdi3.c b/compiler-rt/lib/subvdi3.c
index 0261a5d7869..e4926b81646 100644
--- a/compiler-rt/lib/subvdi3.c
+++ b/compiler-rt/lib/subvdi3.c
@@ -26,12 +26,12 @@ __subvdi3(di_int a, di_int b)
if (b >= 0)
{
if (s > a)
- abort();
+ compilerrt_abort();
}
else
{
if (s <= a)
- abort();
+ compilerrt_abort();
}
return s;
}
diff --git a/compiler-rt/lib/subvsi3.c b/compiler-rt/lib/subvsi3.c
index 3acb40d3ebf..ce39c815b86 100644
--- a/compiler-rt/lib/subvsi3.c
+++ b/compiler-rt/lib/subvsi3.c
@@ -26,12 +26,12 @@ __subvsi3(si_int a, si_int b)
if (b >= 0)
{
if (s > a)
- abort();
+ compilerrt_abort();
}
else
{
if (s <= a)
- abort();
+ compilerrt_abort();
}
return s;
}
diff --git a/compiler-rt/lib/subvti3.c b/compiler-rt/lib/subvti3.c
index 24464104408..55b7925a14b 100644
--- a/compiler-rt/lib/subvti3.c
+++ b/compiler-rt/lib/subvti3.c
@@ -28,12 +28,12 @@ __subvti3(ti_int a, ti_int b)
if (b >= 0)
{
if (s > a)
- abort();
+ compilerrt_abort();
}
else
{
if (s <= a)
- abort();
+ compilerrt_abort();
}
return s;
}
diff --git a/compiler-rt/lib/trampoline_setup.c b/compiler-rt/lib/trampoline_setup.c
index d62e36b7c9b..551d4d06490 100644
--- a/compiler-rt/lib/trampoline_setup.c
+++ b/compiler-rt/lib/trampoline_setup.c
@@ -28,7 +28,7 @@ void __trampoline_setup(uint32_t* trampOnStack, int trampSizeAllocated,
/* should never happen, but if compiler did not allocate */
/* enough space on stack for the trampoline, abort */
if ( trampSizeAllocated < 40 )
- abort();
+ compilerrt_abort();
/* create trampoline */
trampOnStack[0] = 0x7c0802a6; /* mflr r0 */
OpenPOWER on IntegriCloud