summaryrefslogtreecommitdiff
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
commit48f46ac1d9a82210f6e469567cb60aa7e7cd2f3b (patch)
tree2430003e391c78e6b21cdf3b8aaca12d94b430be
parent95f271b12981bf7f9254fcd4f51be441aa73e638 (diff)
downloadcompiler-rt-48f46ac1d9a82210f6e469567cb60aa7e7cd2f3b.tar.gz
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@100014 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/absvdi2.c2
-rw-r--r--lib/absvsi2.c2
-rw-r--r--lib/absvti2.c2
-rw-r--r--lib/addvdi3.c4
-rw-r--r--lib/addvsi3.c4
-rw-r--r--lib/addvti3.c4
-rw-r--r--lib/clear_cache.c2
-rw-r--r--lib/eprintf.c3
-rw-r--r--lib/gcc_personality_v0.c4
-rw-r--r--lib/int_lib.h2
-rw-r--r--lib/mulvdi3.c8
-rw-r--r--lib/mulvsi3.c8
-rw-r--r--lib/mulvti3.c8
-rw-r--r--lib/negvdi2.c2
-rw-r--r--lib/negvsi2.c2
-rw-r--r--lib/negvti2.c2
-rw-r--r--lib/subvdi3.c4
-rw-r--r--lib/subvsi3.c4
-rw-r--r--lib/subvti3.c4
-rw-r--r--lib/trampoline_setup.c2
20 files changed, 38 insertions, 35 deletions
diff --git a/lib/absvdi2.c b/lib/absvdi2.c
index 396802c5c..919afd135 100644
--- a/lib/absvdi2.c
+++ b/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/lib/absvsi2.c b/lib/absvsi2.c
index 0c08bf045..a2c8e3f19 100644
--- a/lib/absvsi2.c
+++ b/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/lib/absvti2.c b/lib/absvti2.c
index c71275ed4..0978122dc 100644
--- a/lib/absvti2.c
+++ b/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/lib/addvdi3.c b/lib/addvdi3.c
index 8b885f53f..53ab1024b 100644
--- a/lib/addvdi3.c
+++ b/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/lib/addvsi3.c b/lib/addvsi3.c
index 603c680c6..22cd3154c 100644
--- a/lib/addvsi3.c
+++ b/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/lib/addvti3.c b/lib/addvti3.c
index afc3e3b90..3df1a742c 100644
--- a/lib/addvti3.c
+++ b/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/lib/clear_cache.c b/lib/clear_cache.c
index 1456823df..ddc48bcc5 100644
--- a/lib/clear_cache.c
+++ b/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/lib/eprintf.c b/lib/eprintf.c
index 8d9ce327a..786fe6aaa 100644
--- a/lib/eprintf.c
+++ b/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/lib/gcc_personality_v0.c b/lib/gcc_personality_v0.c
index b0d93b8a1..862b60539 100644
--- a/lib/gcc_personality_v0.c
+++ b/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/lib/int_lib.h b/lib/int_lib.h
index f37d500dd..f6c2dd45e 100644
--- a/lib/int_lib.h
+++ b/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/lib/mulvdi3.c b/lib/mulvdi3.c
index ebb776950..295ae18d3 100644
--- a/lib/mulvdi3.c
+++ b/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/lib/mulvsi3.c b/lib/mulvsi3.c
index 9edeee2dd..b4a509be2 100644
--- a/lib/mulvsi3.c
+++ b/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/lib/mulvti3.c b/lib/mulvti3.c
index 080cd635f..778222ee6 100644
--- a/lib/mulvti3.c
+++ b/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/lib/negvdi2.c b/lib/negvdi2.c
index df8a69824..0baf37740 100644
--- a/lib/negvdi2.c
+++ b/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/lib/negvsi2.c b/lib/negvsi2.c
index a7fbbbd1f..e5a36a5da 100644
--- a/lib/negvsi2.c
+++ b/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/lib/negvti2.c b/lib/negvti2.c
index df44935f1..d56e1e32a 100644
--- a/lib/negvti2.c
+++ b/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/lib/subvdi3.c b/lib/subvdi3.c
index 0261a5d78..e4926b816 100644
--- a/lib/subvdi3.c
+++ b/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/lib/subvsi3.c b/lib/subvsi3.c
index 3acb40d3e..ce39c815b 100644
--- a/lib/subvsi3.c
+++ b/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/lib/subvti3.c b/lib/subvti3.c
index 244641044..55b7925a1 100644
--- a/lib/subvti3.c
+++ b/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/lib/trampoline_setup.c b/lib/trampoline_setup.c
index d62e36b7c..551d4d064 100644
--- a/lib/trampoline_setup.c
+++ b/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 */