summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/builtins/Unit/absvdi2_test.c2
-rw-r--r--test/builtins/Unit/absvsi2_test.c2
-rw-r--r--test/builtins/Unit/absvti2_test.c2
-rw-r--r--test/builtins/Unit/adddf3vfp_test.c3
-rw-r--r--test/builtins/Unit/addsf3vfp_test.c3
-rw-r--r--test/builtins/Unit/addtf3_test.c3
-rw-r--r--test/builtins/Unit/addvdi3_test.c2
-rw-r--r--test/builtins/Unit/addvsi3_test.c2
-rw-r--r--test/builtins/Unit/addvti3_test.c2
-rw-r--r--test/builtins/Unit/ashldi3_test.c2
-rw-r--r--test/builtins/Unit/ashlti3_test.c2
-rw-r--r--test/builtins/Unit/ashrdi3_test.c2
-rw-r--r--test/builtins/Unit/ashrti3_test.c2
-rw-r--r--test/builtins/Unit/clzdi2_test.c2
-rw-r--r--test/builtins/Unit/clzsi2_test.c2
-rw-r--r--test/builtins/Unit/clzti2_test.c2
-rw-r--r--test/builtins/Unit/cmpdi2_test.c2
-rw-r--r--test/builtins/Unit/cmpti2_test.c2
-rw-r--r--test/builtins/Unit/ctzdi2_test.c2
-rw-r--r--test/builtins/Unit/ctzsi2_test.c2
-rw-r--r--test/builtins/Unit/ctzti2_test.c2
-rw-r--r--test/builtins/Unit/divdc3_test.c3
-rw-r--r--test/builtins/Unit/divdf3vfp_test.c3
-rw-r--r--test/builtins/Unit/divdi3_test.c2
-rw-r--r--test/builtins/Unit/divmodsi4_test.c2
-rw-r--r--test/builtins/Unit/divsc3_test.c3
-rw-r--r--test/builtins/Unit/divsf3vfp_test.c3
-rw-r--r--test/builtins/Unit/divsi3_test.c2
-rw-r--r--test/builtins/Unit/divtc3_test.c2
-rw-r--r--test/builtins/Unit/divtf3_test.c3
-rw-r--r--test/builtins/Unit/divti3_test.c2
-rw-r--r--test/builtins/Unit/divxc3_test.c2
-rw-r--r--test/builtins/Unit/extebdsfdf2vfp_test.c3
-rw-r--r--test/builtins/Unit/extenddftf2_test.c3
-rw-r--r--test/builtins/Unit/extendsftf2_test.c3
-rw-r--r--test/builtins/Unit/ffsdi2_test.c2
-rw-r--r--test/builtins/Unit/ffsti2_test.c2
-rw-r--r--test/builtins/Unit/fixdfdi_test.c2
-rw-r--r--test/builtins/Unit/fixdfti_test.c2
-rw-r--r--test/builtins/Unit/fixsfdi_test.c2
-rw-r--r--test/builtins/Unit/fixsfti_test.c2
-rw-r--r--test/builtins/Unit/fixunsdfdi_test.c2
-rw-r--r--test/builtins/Unit/fixunsdfsi_test.c2
-rw-r--r--test/builtins/Unit/fixunsdfsivfp_test.c3
-rw-r--r--test/builtins/Unit/fixunsdfti_test.c2
-rw-r--r--test/builtins/Unit/fixunssfdi_test.c2
-rw-r--r--test/builtins/Unit/fixunssfsi_test.c2
-rw-r--r--test/builtins/Unit/fixunssfti_test.c2
-rw-r--r--test/builtins/Unit/fixunstfdi_test.c2
-rw-r--r--test/builtins/Unit/fixunsxfdi_test.c2
-rw-r--r--test/builtins/Unit/fixunsxfsi_test.c2
-rw-r--r--test/builtins/Unit/fixunsxfti_test.c2
-rw-r--r--test/builtins/Unit/fixxfdi_test.c2
-rw-r--r--test/builtins/Unit/fixxfti_test.c2
-rw-r--r--test/builtins/Unit/floatdidf_test.c2
-rw-r--r--test/builtins/Unit/floatdisf_test.c2
-rw-r--r--test/builtins/Unit/floatdixf_test.c2
-rw-r--r--test/builtins/Unit/floatsidfvfp_test.c3
-rw-r--r--test/builtins/Unit/floatsisfvfp_test.c3
-rw-r--r--test/builtins/Unit/floatsitf_test.c3
-rw-r--r--test/builtins/Unit/floattidf_test.c2
-rw-r--r--test/builtins/Unit/floattisf_test.c2
-rw-r--r--test/builtins/Unit/floattixf_test.c2
-rw-r--r--test/builtins/Unit/floatundidf_test.c2
-rw-r--r--test/builtins/Unit/floatundisf_test.c2
-rw-r--r--test/builtins/Unit/floatundixf_test.c2
-rw-r--r--test/builtins/Unit/floatunsitf_test.c3
-rw-r--r--test/builtins/Unit/floatunssidfvfp_test.c3
-rw-r--r--test/builtins/Unit/floatunssisfvfp_test.c4
-rw-r--r--test/builtins/Unit/floatuntidf_test.c2
-rw-r--r--test/builtins/Unit/floatuntisf_test.c2
-rw-r--r--test/builtins/Unit/floatuntixf_test.c2
-rw-r--r--test/builtins/Unit/lshrdi3_test.c2
-rw-r--r--test/builtins/Unit/lshrti3_test.c2
-rw-r--r--test/builtins/Unit/moddi3_test.c2
-rw-r--r--test/builtins/Unit/modsi3_test.c2
-rw-r--r--test/builtins/Unit/modti3_test.c2
-rw-r--r--test/builtins/Unit/muldc3_test.c3
-rw-r--r--test/builtins/Unit/muldf3vfp_test.c3
-rw-r--r--test/builtins/Unit/muldi3_test.c2
-rw-r--r--test/builtins/Unit/mulodi4_test.c2
-rw-r--r--test/builtins/Unit/mulosi4_test.c2
-rw-r--r--test/builtins/Unit/muloti4_test.c2
-rw-r--r--test/builtins/Unit/mulsc3_test.c3
-rw-r--r--test/builtins/Unit/mulsf3vfp_test.c3
-rw-r--r--test/builtins/Unit/multc3_test.c2
-rw-r--r--test/builtins/Unit/multf3_test.c2
-rw-r--r--test/builtins/Unit/multi3_test.c2
-rw-r--r--test/builtins/Unit/mulvdi3_test.c2
-rw-r--r--test/builtins/Unit/mulvsi3_test.c2
-rw-r--r--test/builtins/Unit/mulvti3_test.c2
-rw-r--r--test/builtins/Unit/mulxc3_test.c2
-rw-r--r--test/builtins/Unit/negdf2vfp_test.c2
-rw-r--r--test/builtins/Unit/negdi2_test.c2
-rw-r--r--test/builtins/Unit/negsf2vfp_test.c3
-rw-r--r--test/builtins/Unit/negti2_test.c2
-rw-r--r--test/builtins/Unit/negvdi2_test.c2
-rw-r--r--test/builtins/Unit/negvsi2_test.c2
-rw-r--r--test/builtins/Unit/negvti2_test.c4
-rw-r--r--test/builtins/Unit/paritydi2_test.c2
-rw-r--r--test/builtins/Unit/paritysi2_test.c2
-rw-r--r--test/builtins/Unit/parityti2_test.c2
-rw-r--r--test/builtins/Unit/popcountdi2_test.c2
-rw-r--r--test/builtins/Unit/popcountsi2_test.c2
-rw-r--r--test/builtins/Unit/popcountti2_test.c2
-rw-r--r--test/builtins/Unit/powidf2_test.c2
-rw-r--r--test/builtins/Unit/powisf2_test.c2
-rw-r--r--test/builtins/Unit/powitf2_test.c2
-rw-r--r--test/builtins/Unit/powixf2_test.c2
-rw-r--r--test/builtins/Unit/ppc/floatditf_test.c2
-rw-r--r--test/builtins/Unit/ppc/floatunditf_test.c2
-rw-r--r--test/builtins/Unit/subdf3vfp_test.c2
-rw-r--r--test/builtins/Unit/subsf3vfp_test.c3
-rw-r--r--test/builtins/Unit/subtf3_test.c2
-rw-r--r--test/builtins/Unit/subvdi3_test.c2
-rw-r--r--test/builtins/Unit/subvsi3_test.c2
-rw-r--r--test/builtins/Unit/subvti3_test.c2
-rw-r--r--test/builtins/Unit/truncdfsf2vfp_test.c3
-rw-r--r--test/builtins/Unit/trunctfdf2_test.c3
-rw-r--r--test/builtins/Unit/trunctfsf2_test.c3
-rw-r--r--test/builtins/Unit/ucmpdi2_test.c2
-rw-r--r--test/builtins/Unit/ucmpti2_test.c2
-rw-r--r--test/builtins/Unit/udivdi3_test.c2
-rw-r--r--test/builtins/Unit/udivmoddi4_test.c2
-rw-r--r--test/builtins/Unit/udivmodsi4_test.c2
-rw-r--r--test/builtins/Unit/udivmodti4_test.c2
-rw-r--r--test/builtins/Unit/udivsi3_test.c2
-rw-r--r--test/builtins/Unit/udivti3_test.c2
-rw-r--r--test/builtins/Unit/umoddi3_test.c2
-rw-r--r--test/builtins/Unit/umodsi3_test.c2
-rw-r--r--test/builtins/Unit/umodti3_test.c2
131 files changed, 159 insertions, 133 deletions
diff --git a/test/builtins/Unit/absvdi2_test.c b/test/builtins/Unit/absvdi2_test.c
index f0bf56068..f69ae4151 100644
--- a/test/builtins/Unit/absvdi2_test.c
+++ b/test/builtins/Unit/absvdi2_test.c
@@ -19,7 +19,7 @@
// Effects: aborts if abs(x) < 0
-di_int __absvdi2(di_int a);
+COMPILER_RT_ABI di_int __absvdi2(di_int a);
int test__absvdi2(di_int a)
{
diff --git a/test/builtins/Unit/absvsi2_test.c b/test/builtins/Unit/absvsi2_test.c
index 3b88078df..c395cca7a 100644
--- a/test/builtins/Unit/absvsi2_test.c
+++ b/test/builtins/Unit/absvsi2_test.c
@@ -19,7 +19,7 @@
// Effects: aborts if abs(x) < 0
-si_int __absvsi2(si_int a);
+COMPILER_RT_ABI si_int __absvsi2(si_int a);
int test__absvsi2(si_int a)
{
diff --git a/test/builtins/Unit/absvti2_test.c b/test/builtins/Unit/absvti2_test.c
index 9b71f200a..6c626e97d 100644
--- a/test/builtins/Unit/absvti2_test.c
+++ b/test/builtins/Unit/absvti2_test.c
@@ -21,7 +21,7 @@
// Effects: aborts if abs(x) < 0
-ti_int __absvti2(ti_int a);
+COMPILER_RT_ABI ti_int __absvti2(ti_int a);
int test__absvti2(ti_int a)
{
diff --git a/test/builtins/Unit/adddf3vfp_test.c b/test/builtins/Unit/adddf3vfp_test.c
index 5ad42f7b3..739515291 100644
--- a/test/builtins/Unit/adddf3vfp_test.c
+++ b/test/builtins/Unit/adddf3vfp_test.c
@@ -11,13 +11,14 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if __arm__
-extern double __adddf3vfp(double a, double b);
+extern COMPILER_RT_ABI double __adddf3vfp(double a, double b);
int test__adddf3vfp(double a, double b)
{
diff --git a/test/builtins/Unit/addsf3vfp_test.c b/test/builtins/Unit/addsf3vfp_test.c
index 95e057c36..4b3dcccac 100644
--- a/test/builtins/Unit/addsf3vfp_test.c
+++ b/test/builtins/Unit/addsf3vfp_test.c
@@ -11,12 +11,13 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-extern float __addsf3vfp(float a, float b);
+extern COMPILER_RT_ABI float __addsf3vfp(float a, float b);
#if __arm__
int test__addsf3vfp(float a, float b)
diff --git a/test/builtins/Unit/addtf3_test.c b/test/builtins/Unit/addtf3_test.c
index 4a3aacd96..7b92ccee1 100644
--- a/test/builtins/Unit/addtf3_test.c
+++ b/test/builtins/Unit/addtf3_test.c
@@ -11,6 +11,7 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#if __LDBL_MANT_DIG__ == 113
@@ -18,7 +19,7 @@
#include "fp_test.h"
// Returns: a + b
-long double __addtf3(long double a, long double b);
+COMPILER_RT_ABI long double __addtf3(long double a, long double b);
int test__addtf3(long double a, long double b,
uint64_t expectedHi, uint64_t expectedLo)
diff --git a/test/builtins/Unit/addvdi3_test.c b/test/builtins/Unit/addvdi3_test.c
index 0d7271d5a..5f8729a61 100644
--- a/test/builtins/Unit/addvdi3_test.c
+++ b/test/builtins/Unit/addvdi3_test.c
@@ -18,7 +18,7 @@
// Effects: aborts if a + b overflows
-di_int __addvdi3(di_int a, di_int b);
+COMPILER_RT_ABI di_int __addvdi3(di_int a, di_int b);
int test__addvdi3(di_int a, di_int b)
{
diff --git a/test/builtins/Unit/addvsi3_test.c b/test/builtins/Unit/addvsi3_test.c
index 59fd9d2ae..b5358d0f5 100644
--- a/test/builtins/Unit/addvsi3_test.c
+++ b/test/builtins/Unit/addvsi3_test.c
@@ -18,7 +18,7 @@
// Effects: aborts if a + b overflows
-si_int __addvsi3(si_int a, si_int b);
+COMPILER_RT_ABI si_int __addvsi3(si_int a, si_int b);
int test__addvsi3(si_int a, si_int b)
{
diff --git a/test/builtins/Unit/addvti3_test.c b/test/builtins/Unit/addvti3_test.c
index fe093e3b2..e2f75cf86 100644
--- a/test/builtins/Unit/addvti3_test.c
+++ b/test/builtins/Unit/addvti3_test.c
@@ -20,7 +20,7 @@
// Effects: aborts if a + b overflows
-ti_int __addvti3(ti_int a, ti_int b);
+COMPILER_RT_ABI ti_int __addvti3(ti_int a, ti_int b);
int test__addvti3(ti_int a, ti_int b)
{
diff --git a/test/builtins/Unit/ashldi3_test.c b/test/builtins/Unit/ashldi3_test.c
index fb80c6f77..398fb69be 100644
--- a/test/builtins/Unit/ashldi3_test.c
+++ b/test/builtins/Unit/ashldi3_test.c
@@ -18,7 +18,7 @@
// Precondition: 0 <= b < bits_in_dword
-di_int __ashldi3(di_int a, si_int b);
+COMPILER_RT_ABI di_int __ashldi3(di_int a, si_int b);
int test__ashldi3(di_int a, si_int b, di_int expected)
{
diff --git a/test/builtins/Unit/ashlti3_test.c b/test/builtins/Unit/ashlti3_test.c
index 2361d16b3..595e35306 100644
--- a/test/builtins/Unit/ashlti3_test.c
+++ b/test/builtins/Unit/ashlti3_test.c
@@ -20,7 +20,7 @@
// Precondition: 0 <= b < bits_in_tword
-ti_int __ashlti3(ti_int a, si_int b);
+COMPILER_RT_ABI ti_int __ashlti3(ti_int a, si_int b);
int test__ashlti3(ti_int a, si_int b, ti_int expected)
{
diff --git a/test/builtins/Unit/ashrdi3_test.c b/test/builtins/Unit/ashrdi3_test.c
index ac517e191..ee6409c87 100644
--- a/test/builtins/Unit/ashrdi3_test.c
+++ b/test/builtins/Unit/ashrdi3_test.c
@@ -18,7 +18,7 @@
// Precondition: 0 <= b < bits_in_dword
-di_int __ashrdi3(di_int a, si_int b);
+COMPILER_RT_ABI di_int __ashrdi3(di_int a, si_int b);
int test__ashrdi3(di_int a, si_int b, di_int expected)
{
diff --git a/test/builtins/Unit/ashrti3_test.c b/test/builtins/Unit/ashrti3_test.c
index 62ba1017e..201582d4e 100644
--- a/test/builtins/Unit/ashrti3_test.c
+++ b/test/builtins/Unit/ashrti3_test.c
@@ -20,7 +20,7 @@
// Precondition: 0 <= b < bits_in_tword
-ti_int __ashrti3(ti_int a, si_int b);
+COMPILER_RT_ABI ti_int __ashrti3(ti_int a, si_int b);
int test__ashrti3(ti_int a, si_int b, ti_int expected)
{
diff --git a/test/builtins/Unit/clzdi2_test.c b/test/builtins/Unit/clzdi2_test.c
index 58403f091..41e120932 100644
--- a/test/builtins/Unit/clzdi2_test.c
+++ b/test/builtins/Unit/clzdi2_test.c
@@ -18,7 +18,7 @@
// Precondition: a != 0
-si_int __clzdi2(di_int a);
+COMPILER_RT_ABI si_int __clzdi2(di_int a);
int test__clzdi2(di_int a, si_int expected)
{
diff --git a/test/builtins/Unit/clzsi2_test.c b/test/builtins/Unit/clzsi2_test.c
index cc1da64b0..80b300fee 100644
--- a/test/builtins/Unit/clzsi2_test.c
+++ b/test/builtins/Unit/clzsi2_test.c
@@ -18,7 +18,7 @@
// Precondition: a != 0
-si_int __clzsi2(si_int a);
+COMPILER_RT_ABI si_int __clzsi2(si_int a);
int test__clzsi2(si_int a, si_int expected)
{
diff --git a/test/builtins/Unit/clzti2_test.c b/test/builtins/Unit/clzti2_test.c
index 5a0e3e8b1..3a2c6fabb 100644
--- a/test/builtins/Unit/clzti2_test.c
+++ b/test/builtins/Unit/clzti2_test.c
@@ -20,7 +20,7 @@
// Precondition: a != 0
-si_int __clzti2(ti_int a);
+COMPILER_RT_ABI si_int __clzti2(ti_int a);
int test__clzti2(ti_int a, si_int expected)
{
diff --git a/test/builtins/Unit/cmpdi2_test.c b/test/builtins/Unit/cmpdi2_test.c
index 609ab1a63..33a12a042 100644
--- a/test/builtins/Unit/cmpdi2_test.c
+++ b/test/builtins/Unit/cmpdi2_test.c
@@ -18,7 +18,7 @@
// if (a == b) returns 1
// if (a > b) returns 2
-si_int __cmpdi2(di_int a, di_int b);
+COMPILER_RT_ABI si_int __cmpdi2(di_int a, di_int b);
int test__cmpdi2(di_int a, di_int b, si_int expected)
{
diff --git a/test/builtins/Unit/cmpti2_test.c b/test/builtins/Unit/cmpti2_test.c
index 15ee4fc68..d951923b2 100644
--- a/test/builtins/Unit/cmpti2_test.c
+++ b/test/builtins/Unit/cmpti2_test.c
@@ -20,7 +20,7 @@
// if (a == b) returns 1
// if (a > b) returns 2
-si_int __cmpti2(ti_int a, ti_int b);
+COMPILER_RT_ABI si_int __cmpti2(ti_int a, ti_int b);
int test__cmpti2(ti_int a, ti_int b, si_int expected)
{
diff --git a/test/builtins/Unit/ctzdi2_test.c b/test/builtins/Unit/ctzdi2_test.c
index 1f2d101a1..bde66b1e5 100644
--- a/test/builtins/Unit/ctzdi2_test.c
+++ b/test/builtins/Unit/ctzdi2_test.c
@@ -18,7 +18,7 @@
// Precondition: a != 0
-si_int __ctzdi2(di_int a);
+COMPILER_RT_ABI si_int __ctzdi2(di_int a);
int test__ctzdi2(di_int a, si_int expected)
{
diff --git a/test/builtins/Unit/ctzsi2_test.c b/test/builtins/Unit/ctzsi2_test.c
index 36f221595..cbc101fca 100644
--- a/test/builtins/Unit/ctzsi2_test.c
+++ b/test/builtins/Unit/ctzsi2_test.c
@@ -18,7 +18,7 @@
// Precondition: a != 0
-si_int __ctzsi2(si_int a);
+COMPILER_RT_ABI si_int __ctzsi2(si_int a);
int test__ctzsi2(si_int a, si_int expected)
{
diff --git a/test/builtins/Unit/ctzti2_test.c b/test/builtins/Unit/ctzti2_test.c
index 9a972f9e2..0ca1920bd 100644
--- a/test/builtins/Unit/ctzti2_test.c
+++ b/test/builtins/Unit/ctzti2_test.c
@@ -20,7 +20,7 @@
// Precondition: a != 0
-si_int __ctzti2(ti_int a);
+COMPILER_RT_ABI si_int __ctzti2(ti_int a);
int test__ctzti2(ti_int a, si_int expected)
{
diff --git a/test/builtins/Unit/divdc3_test.c b/test/builtins/Unit/divdc3_test.c
index 9224cddce..80b9e86e1 100644
--- a/test/builtins/Unit/divdc3_test.c
+++ b/test/builtins/Unit/divdc3_test.c
@@ -18,7 +18,8 @@
// Returns: the quotient of (a + ib) / (c + id)
-double _Complex __divdc3(double __a, double __b, double __c, double __d);
+COMPILER_RT_ABI double _Complex
+__divdc3(double __a, double __b, double __c, double __d);
enum {zero, non_zero, inf, NaN, non_zero_nan};
diff --git a/test/builtins/Unit/divdf3vfp_test.c b/test/builtins/Unit/divdf3vfp_test.c
index e13822ffc..6f0808abc 100644
--- a/test/builtins/Unit/divdf3vfp_test.c
+++ b/test/builtins/Unit/divdf3vfp_test.c
@@ -11,13 +11,14 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if __arm__
-extern double __divdf3vfp(double a, double b);
+extern COMPILER_RT_ABI double __divdf3vfp(double a, double b);
int test__divdf3vfp(double a, double b)
{
diff --git a/test/builtins/Unit/divdi3_test.c b/test/builtins/Unit/divdi3_test.c
index c25f917a4..1d459803e 100644
--- a/test/builtins/Unit/divdi3_test.c
+++ b/test/builtins/Unit/divdi3_test.c
@@ -16,7 +16,7 @@
// Returns: a / b
-di_int __divdi3(di_int a, di_int b);
+COMPILER_RT_ABI di_int __divdi3(di_int a, di_int b);
int test__divdi3(di_int a, di_int b, di_int expected)
{
diff --git a/test/builtins/Unit/divmodsi4_test.c b/test/builtins/Unit/divmodsi4_test.c
index bea31ea9a..6fb1c985a 100644
--- a/test/builtins/Unit/divmodsi4_test.c
+++ b/test/builtins/Unit/divmodsi4_test.c
@@ -16,7 +16,7 @@
// Returns: a / b
-extern si_int __divmodsi4(si_int a, si_int b, si_int* rem);
+extern COMPILER_RT_ABI si_int __divmodsi4(si_int a, si_int b, si_int* rem);
int test__divmodsi4(si_int a, si_int b,
diff --git a/test/builtins/Unit/divsc3_test.c b/test/builtins/Unit/divsc3_test.c
index 9d060a2d1..2d7c65937 100644
--- a/test/builtins/Unit/divsc3_test.c
+++ b/test/builtins/Unit/divsc3_test.c
@@ -18,7 +18,8 @@
// Returns: the quotient of (a + ib) / (c + id)
-float _Complex __divsc3(float __a, float __b, float __c, float __d);
+COMPILER_RT_ABI float _Complex
+__divsc3(float __a, float __b, float __c, float __d);
enum {zero, non_zero, inf, NaN, non_zero_nan};
diff --git a/test/builtins/Unit/divsf3vfp_test.c b/test/builtins/Unit/divsf3vfp_test.c
index 838255841..f74244199 100644
--- a/test/builtins/Unit/divsf3vfp_test.c
+++ b/test/builtins/Unit/divsf3vfp_test.c
@@ -11,12 +11,13 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-extern float __divsf3vfp(float a, float b);
+extern COMPILER_RT_ABI float __divsf3vfp(float a, float b);
#if __arm__
int test__divsf3vfp(float a, float b)
diff --git a/test/builtins/Unit/divsi3_test.c b/test/builtins/Unit/divsi3_test.c
index 6fda54ff3..c52336745 100644
--- a/test/builtins/Unit/divsi3_test.c
+++ b/test/builtins/Unit/divsi3_test.c
@@ -16,7 +16,7 @@
// Returns: a / b
-si_int __divsi3(si_int a, si_int b);
+COMPILER_RT_ABI si_int __divsi3(si_int a, si_int b);
int test__divsi3(si_int a, si_int b, si_int expected)
{
diff --git a/test/builtins/Unit/divtc3_test.c b/test/builtins/Unit/divtc3_test.c
index 50918d68f..ad2c96dc0 100644
--- a/test/builtins/Unit/divtc3_test.c
+++ b/test/builtins/Unit/divtc3_test.c
@@ -21,7 +21,7 @@
// Returns: the quotient of (a + ib) / (c + id)
-long double _Complex
+COMPILER_RT_ABI long double _Complex
__divtc3(long double __a, long double __b, long double __c, long double __d);
enum {zero, non_zero, inf, NaN, non_zero_nan};
diff --git a/test/builtins/Unit/divtf3_test.c b/test/builtins/Unit/divtf3_test.c
index dad631cc4..e0def45ff 100644
--- a/test/builtins/Unit/divtf3_test.c
+++ b/test/builtins/Unit/divtf3_test.c
@@ -11,6 +11,7 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#if __LDBL_MANT_DIG__ == 113
@@ -18,7 +19,7 @@
#include "fp_test.h"
// Returns: a / b
-long double __divtf3(long double a, long double b);
+COMPILER_RT_ABI long double __divtf3(long double a, long double b);
int test__divtf3(long double a, long double b,
uint64_t expectedHi, uint64_t expectedLo)
diff --git a/test/builtins/Unit/divti3_test.c b/test/builtins/Unit/divti3_test.c
index bc81c2a54..3a94dab8c 100644
--- a/test/builtins/Unit/divti3_test.c
+++ b/test/builtins/Unit/divti3_test.c
@@ -18,7 +18,7 @@
// Returns: a / b
-ti_int __divti3(ti_int a, ti_int b);
+COMPILER_RT_ABI ti_int __divti3(ti_int a, ti_int b);
int test__divti3(ti_int a, ti_int b, ti_int expected)
{
diff --git a/test/builtins/Unit/divxc3_test.c b/test/builtins/Unit/divxc3_test.c
index aa8a7625d..509b4b18e 100644
--- a/test/builtins/Unit/divxc3_test.c
+++ b/test/builtins/Unit/divxc3_test.c
@@ -20,7 +20,7 @@
// Returns: the quotient of (a + ib) / (c + id)
-long double _Complex
+COMPILER_RT_ABI long double _Complex
__divxc3(long double __a, long double __b, long double __c, long double __d);
enum {zero, non_zero, inf, NaN, non_zero_nan};
diff --git a/test/builtins/Unit/extebdsfdf2vfp_test.c b/test/builtins/Unit/extebdsfdf2vfp_test.c
index 3a009cf2d..53c72828f 100644
--- a/test/builtins/Unit/extebdsfdf2vfp_test.c
+++ b/test/builtins/Unit/extebdsfdf2vfp_test.c
@@ -11,12 +11,13 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-extern double __extendsfdf2vfp(float a);
+extern COMPILER_RT_ABI double __extendsfdf2vfp(float a);
#if __arm__
int test__extendsfdf2vfp(float a)
diff --git a/test/builtins/Unit/extenddftf2_test.c b/test/builtins/Unit/extenddftf2_test.c
index 05acc08c0..2cfb32b26 100644
--- a/test/builtins/Unit/extenddftf2_test.c
+++ b/test/builtins/Unit/extenddftf2_test.c
@@ -11,13 +11,14 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#if __LDBL_MANT_DIG__ == 113
#include "fp_test.h"
-long double __extenddftf2(double a);
+COMPILER_RT_ABI long double __extenddftf2(double a);
int test__extenddftf2(double a, uint64_t expectedHi, uint64_t expectedLo)
{
diff --git a/test/builtins/Unit/extendsftf2_test.c b/test/builtins/Unit/extendsftf2_test.c
index 5f41928b8..7dff5b6be 100644
--- a/test/builtins/Unit/extendsftf2_test.c
+++ b/test/builtins/Unit/extendsftf2_test.c
@@ -11,13 +11,14 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#if __LDBL_MANT_DIG__ == 113
#include "fp_test.h"
-long double __extendsftf2(float a);
+COMPILER_RT_ABI long double __extendsftf2(float a);
int test__extendsftf2(float a, uint64_t expectedHi, uint64_t expectedLo)
{
diff --git a/test/builtins/Unit/ffsdi2_test.c b/test/builtins/Unit/ffsdi2_test.c
index 9041127d1..a27d154fd 100644
--- a/test/builtins/Unit/ffsdi2_test.c
+++ b/test/builtins/Unit/ffsdi2_test.c
@@ -17,7 +17,7 @@
// 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.
-si_int __ffsdi2(di_int a);
+COMPILER_RT_ABI si_int __ffsdi2(di_int a);
int test__ffsdi2(di_int a, si_int expected)
{
diff --git a/test/builtins/Unit/ffsti2_test.c b/test/builtins/Unit/ffsti2_test.c
index f944ed0a1..396269d51 100644
--- a/test/builtins/Unit/ffsti2_test.c
+++ b/test/builtins/Unit/ffsti2_test.c
@@ -19,7 +19,7 @@
// 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.
-si_int __ffsti2(ti_int a);
+COMPILER_RT_ABI si_int __ffsti2(ti_int a);
int test__ffsti2(ti_int a, si_int expected)
{
diff --git a/test/builtins/Unit/fixdfdi_test.c b/test/builtins/Unit/fixdfdi_test.c
index d08afe3a5..4a7cfa31c 100644
--- a/test/builtins/Unit/fixdfdi_test.c
+++ b/test/builtins/Unit/fixdfdi_test.c
@@ -22,7 +22,7 @@
// seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-di_int __fixdfdi(double a);
+COMPILER_RT_ABI di_int __fixdfdi(double a);
int test__fixdfdi(double a, di_int expected)
{
diff --git a/test/builtins/Unit/fixdfti_test.c b/test/builtins/Unit/fixdfti_test.c
index bfa88fd70..b5da456fc 100644
--- a/test/builtins/Unit/fixdfti_test.c
+++ b/test/builtins/Unit/fixdfti_test.c
@@ -24,7 +24,7 @@
// seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-ti_int __fixdfti(double a);
+COMPILER_RT_ABI ti_int __fixdfti(double a);
int test__fixdfti(double a, ti_int expected)
{
diff --git a/test/builtins/Unit/fixsfdi_test.c b/test/builtins/Unit/fixsfdi_test.c
index d3e934a5c..f37ecef04 100644
--- a/test/builtins/Unit/fixsfdi_test.c
+++ b/test/builtins/Unit/fixsfdi_test.c
@@ -22,7 +22,7 @@
// seee eeee emmm mmmm mmmm mmmm mmmm mmmm
-di_int __fixsfdi(float a);
+COMPILER_RT_ABI di_int __fixsfdi(float a);
int test__fixsfdi(float a, di_int expected)
{
diff --git a/test/builtins/Unit/fixsfti_test.c b/test/builtins/Unit/fixsfti_test.c
index 2b0b99774..38748aabc 100644
--- a/test/builtins/Unit/fixsfti_test.c
+++ b/test/builtins/Unit/fixsfti_test.c
@@ -24,7 +24,7 @@
// seee eeee emmm mmmm mmmm mmmm mmmm mmmm
-ti_int __fixsfti(float a);
+COMPILER_RT_ABI ti_int __fixsfti(float a);
int test__fixsfti(float a, ti_int expected)
{
diff --git a/test/builtins/Unit/fixunsdfdi_test.c b/test/builtins/Unit/fixunsdfdi_test.c
index 0803fd28f..399848287 100644
--- a/test/builtins/Unit/fixunsdfdi_test.c
+++ b/test/builtins/Unit/fixunsdfdi_test.c
@@ -24,7 +24,7 @@
// seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-du_int __fixunsdfdi(double a);
+COMPILER_RT_ABI du_int __fixunsdfdi(double a);
int test__fixunsdfdi(double a, du_int expected)
{
diff --git a/test/builtins/Unit/fixunsdfsi_test.c b/test/builtins/Unit/fixunsdfsi_test.c
index 54fe35b5c..551fc88a5 100644
--- a/test/builtins/Unit/fixunsdfsi_test.c
+++ b/test/builtins/Unit/fixunsdfsi_test.c
@@ -24,7 +24,7 @@
// seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-su_int __fixunsdfsi(double a);
+COMPILER_RT_ABI su_int __fixunsdfsi(double a);
int test__fixunsdfsi(double a, su_int expected)
{
diff --git a/test/builtins/Unit/fixunsdfsivfp_test.c b/test/builtins/Unit/fixunsdfsivfp_test.c
index 3727cf7b0..ebd0be274 100644
--- a/test/builtins/Unit/fixunsdfsivfp_test.c
+++ b/test/builtins/Unit/fixunsdfsivfp_test.c
@@ -11,12 +11,13 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-extern unsigned int __fixunsdfsivfp(double a);
+extern COMPILER_RT_ABI unsigned int __fixunsdfsivfp(double a);
#if __arm__
int test__fixunsdfsivfp(double a)
diff --git a/test/builtins/Unit/fixunsdfti_test.c b/test/builtins/Unit/fixunsdfti_test.c
index 9f89de493..e1aa56d76 100644
--- a/test/builtins/Unit/fixunsdfti_test.c
+++ b/test/builtins/Unit/fixunsdfti_test.c
@@ -26,7 +26,7 @@
#ifdef CRT_HAS_128BIT
-tu_int __fixunsdfti(double a);
+COMPILER_RT_ABI tu_int __fixunsdfti(double a);
int test__fixunsdfti(double a, tu_int expected)
{
diff --git a/test/builtins/Unit/fixunssfdi_test.c b/test/builtins/Unit/fixunssfdi_test.c
index ac89be7bb..812457a00 100644
--- a/test/builtins/Unit/fixunssfdi_test.c
+++ b/test/builtins/Unit/fixunssfdi_test.c
@@ -24,7 +24,7 @@
// seee eeee emmm mmmm mmmm mmmm mmmm mmmm
-du_int __fixunssfdi(float a);
+COMPILER_RT_ABI du_int __fixunssfdi(float a);
int test__fixunssfdi(float a, du_int expected)
{
diff --git a/test/builtins/Unit/fixunssfsi_test.c b/test/builtins/Unit/fixunssfsi_test.c
index ce6a92875..94a8b0867 100644
--- a/test/builtins/Unit/fixunssfsi_test.c
+++ b/test/builtins/Unit/fixunssfsi_test.c
@@ -24,7 +24,7 @@
// seee eeee emmm mmmm mmmm mmmm mmmm mmmm
-su_int __fixunssfsi(float a);
+COMPILER_RT_ABI su_int __fixunssfsi(float a);
int test__fixunssfsi(float a, su_int expected)
{
diff --git a/test/builtins/Unit/fixunssfti_test.c b/test/builtins/Unit/fixunssfti_test.c
index 7965b9500..979d66191 100644
--- a/test/builtins/Unit/fixunssfti_test.c
+++ b/test/builtins/Unit/fixunssfti_test.c
@@ -26,7 +26,7 @@
// seee eeee emmm mmmm mmmm mmmm mmmm mmmm
-tu_int __fixunssfti(float a);
+COMPILER_RT_ABI tu_int __fixunssfti(float a);
int test__fixunssfti(float a, tu_int expected)
{
diff --git a/test/builtins/Unit/fixunstfdi_test.c b/test/builtins/Unit/fixunstfdi_test.c
index a5a946050..60ea503d2 100644
--- a/test/builtins/Unit/fixunstfdi_test.c
+++ b/test/builtins/Unit/fixunstfdi_test.c
@@ -25,7 +25,7 @@
// value in long double is representable in du_int or is negative
// (no range checking performed)
-du_int __fixunstfdi(long double a);
+COMPILER_RT_ABI du_int __fixunstfdi(long double a);
int test__fixunstfdi(long double a, du_int expected)
{
diff --git a/test/builtins/Unit/fixunsxfdi_test.c b/test/builtins/Unit/fixunsxfdi_test.c
index 4308f6f4e..6f4207969 100644
--- a/test/builtins/Unit/fixunsxfdi_test.c
+++ b/test/builtins/Unit/fixunsxfdi_test.c
@@ -28,7 +28,7 @@
// gggg gggg gggg gggg gggg gggg gggg gggg | gggg gggg gggg gggg seee eeee eeee eeee |
// 1mmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-du_int __fixunsxfdi(long double a);
+COMPILER_RT_ABI du_int __fixunsxfdi(long double a);
int test__fixunsxfdi(long double a, du_int expected)
{
diff --git a/test/builtins/Unit/fixunsxfsi_test.c b/test/builtins/Unit/fixunsxfsi_test.c
index cb2a7f487..0d78dcb53 100644
--- a/test/builtins/Unit/fixunsxfsi_test.c
+++ b/test/builtins/Unit/fixunsxfsi_test.c
@@ -26,7 +26,7 @@
// gggg gggg gggg gggg gggg gggg gggg gggg | gggg gggg gggg gggg seee eeee eeee eeee |
// 1mmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-su_int __fixunsxfsi(long double a);
+COMPILER_RT_ABI su_int __fixunsxfsi(long double a);
int test__fixunsxfsi(long double a, su_int expected)
{
diff --git a/test/builtins/Unit/fixunsxfti_test.c b/test/builtins/Unit/fixunsxfti_test.c
index 7d18b1267..94b5aebe4 100644
--- a/test/builtins/Unit/fixunsxfti_test.c
+++ b/test/builtins/Unit/fixunsxfti_test.c
@@ -27,7 +27,7 @@
// gggg gggg gggg gggg gggg gggg gggg gggg | gggg gggg gggg gggg seee eeee eeee eeee |
// 1mmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-tu_int __fixunsxfti(long double a);
+COMPILER_RT_ABI tu_int __fixunsxfti(long double a);
int test__fixunsxfti(long double a, tu_int expected)
{
diff --git a/test/builtins/Unit/fixxfdi_test.c b/test/builtins/Unit/fixxfdi_test.c
index 43ac0f8aa..0a90a56e6 100644
--- a/test/builtins/Unit/fixxfdi_test.c
+++ b/test/builtins/Unit/fixxfdi_test.c
@@ -25,7 +25,7 @@
// gggg gggg gggg gggg gggg gggg gggg gggg | gggg gggg gggg gggg seee eeee eeee eeee |
// 1mmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-di_int __fixxfdi(long double a);
+COMPILER_RT_ABI di_int __sfixxfdi(long double a);
int test__fixxfdi(long double a, di_int expected)
{
diff --git a/test/builtins/Unit/fixxfti_test.c b/test/builtins/Unit/fixxfti_test.c
index 87914c534..b8573cc14 100644
--- a/test/builtins/Unit/fixxfti_test.c
+++ b/test/builtins/Unit/fixxfti_test.c
@@ -25,7 +25,7 @@
// gggg gggg gggg gggg gggg gggg gggg gggg | gggg gggg gggg gggg seee eeee eeee eeee |
// 1mmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-ti_int __fixxfti(long double a);
+COMPILER_RT_ABI ti_int __fixxfti(long double a);
int test__fixxfti(long double a, ti_int expected)
{
diff --git a/test/builtins/Unit/floatdidf_test.c b/test/builtins/Unit/floatdidf_test.c
index af3dacd4f..9bf2be97c 100644
--- a/test/builtins/Unit/floatdidf_test.c
+++ b/test/builtins/Unit/floatdidf_test.c
@@ -22,7 +22,7 @@
// seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-double __floatdidf(di_int a);
+COMPILER_RT_ABI double __floatdidf(di_int a);
int test__floatdidf(di_int a, double expected)
{
diff --git a/test/builtins/Unit/floatdisf_test.c b/test/builtins/Unit/floatdisf_test.c
index 3e71df7b2..a55c6a961 100644
--- a/test/builtins/Unit/floatdisf_test.c
+++ b/test/builtins/Unit/floatdisf_test.c
@@ -22,7 +22,7 @@
// seee eeee emmm mmmm mmmm mmmm mmmm mmmm
-float __floatdisf(di_int a);
+COMPILER_RT_ABI float __floatdisf(di_int a);
int test__floatdisf(di_int a, float expected)
{
diff --git a/test/builtins/Unit/floatdixf_test.c b/test/builtins/Unit/floatdixf_test.c
index 337666426..f6ab5a466 100644
--- a/test/builtins/Unit/floatdixf_test.c
+++ b/test/builtins/Unit/floatdixf_test.c
@@ -23,7 +23,7 @@
// gggg gggg gggg gggg gggg gggg gggg gggg | gggg gggg gggg gggg seee eeee eeee eeee |
// 1mmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-long double __floatdixf(di_int a);
+long COMPILER_RT_ABI double __floatdixf(di_int a);
int test__floatdixf(di_int a, long double expected)
{
diff --git a/test/builtins/Unit/floatsidfvfp_test.c b/test/builtins/Unit/floatsidfvfp_test.c
index e21ecda59..e5ea3a4d4 100644
--- a/test/builtins/Unit/floatsidfvfp_test.c
+++ b/test/builtins/Unit/floatsidfvfp_test.c
@@ -11,12 +11,13 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-extern double __floatsidfvfp(int a);
+extern COMPILER_RT_ABI double __floatsidfvfp(int a);
#if __arm__
int test__floatsidfvfp(int a)
diff --git a/test/builtins/Unit/floatsisfvfp_test.c b/test/builtins/Unit/floatsisfvfp_test.c
index d20905bd9..ab21e2e7f 100644
--- a/test/builtins/Unit/floatsisfvfp_test.c
+++ b/test/builtins/Unit/floatsisfvfp_test.c
@@ -11,12 +11,13 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-extern float __floatsisfvfp(int a);
+extern COMPILER_RT_ABI float __floatsisfvfp(int a);
#if __arm__
int test__floatsisfvfp(int a)
diff --git a/test/builtins/Unit/floatsitf_test.c b/test/builtins/Unit/floatsitf_test.c
index db4d020af..8373c7d96 100644
--- a/test/builtins/Unit/floatsitf_test.c
+++ b/test/builtins/Unit/floatsitf_test.c
@@ -11,13 +11,14 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#if __LDBL_MANT_DIG__ == 113
#include "fp_test.h"
-long double __floatsitf(int a);
+long COMPILER_RT_ABI double __floatsitf(int a);
int test__floatsitf(int a, uint64_t expectedHi, uint64_t expectedLo)
{
diff --git a/test/builtins/Unit/floattidf_test.c b/test/builtins/Unit/floattidf_test.c
index 476304f96..3af382ac0 100644
--- a/test/builtins/Unit/floattidf_test.c
+++ b/test/builtins/Unit/floattidf_test.c
@@ -24,7 +24,7 @@
// seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-double __floattidf(ti_int a);
+COMPILER_RT_ABI double __floattidf(ti_int a);
int test__floattidf(ti_int a, double expected)
{
diff --git a/test/builtins/Unit/floattisf_test.c b/test/builtins/Unit/floattisf_test.c
index 75b8e917f..0f5dc544d 100644
--- a/test/builtins/Unit/floattisf_test.c
+++ b/test/builtins/Unit/floattisf_test.c
@@ -24,7 +24,7 @@
// seee eeee emmm mmmm mmmm mmmm mmmm mmmm
-float __floattisf(ti_int a);
+COMPILER_RT_ABI float __floattisf(ti_int a);
int test__floattisf(ti_int a, float expected)
{
diff --git a/test/builtins/Unit/floattixf_test.c b/test/builtins/Unit/floattixf_test.c
index ce3566867..d281debdc 100644
--- a/test/builtins/Unit/floattixf_test.c
+++ b/test/builtins/Unit/floattixf_test.c
@@ -25,7 +25,7 @@
// gggg gggg gggg gggg gggg gggg gggg gggg | gggg gggg gggg gggg seee eeee eeee eeee |
// 1mmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-long double __floattixf(ti_int a);
+COMPILER_RT_ABI long double __floattixf(ti_int a);
int test__floattixf(ti_int a, long double expected)
{
diff --git a/test/builtins/Unit/floatundidf_test.c b/test/builtins/Unit/floatundidf_test.c
index ae91ac374..97fb1e5ec 100644
--- a/test/builtins/Unit/floatundidf_test.c
+++ b/test/builtins/Unit/floatundidf_test.c
@@ -22,7 +22,7 @@
// seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-double __floatundidf(du_int a);
+COMPILER_RT_ABI double __floatundidf(du_int a);
int test__floatundidf(di_int a, double expected)
{
diff --git a/test/builtins/Unit/floatundisf_test.c b/test/builtins/Unit/floatundisf_test.c
index 394c945a3..40b6bcc45 100644
--- a/test/builtins/Unit/floatundisf_test.c
+++ b/test/builtins/Unit/floatundisf_test.c
@@ -22,7 +22,7 @@
// seee eeee emmm mmmm mmmm mmmm mmmm mmmm
-float __floatundisf(du_int a);
+COMPILER_RT_ABI float __floatundisf(du_int a);
int test__floatundisf(du_int a, float expected)
{
diff --git a/test/builtins/Unit/floatundixf_test.c b/test/builtins/Unit/floatundixf_test.c
index 1974fa010..690dce199 100644
--- a/test/builtins/Unit/floatundixf_test.c
+++ b/test/builtins/Unit/floatundixf_test.c
@@ -24,7 +24,7 @@
// gggg gggg gggg gggg gggg gggg gggg gggg | gggg gggg gggg gggg seee eeee eeee eeee |
// 1mmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-long double __floatundixf(du_int a);
+COMPILER_RT_ABI long double __floatundixf(du_int a);
int test__floatundixf(du_int a, long double expected)
{
diff --git a/test/builtins/Unit/floatunsitf_test.c b/test/builtins/Unit/floatunsitf_test.c
index 1af72d246..c3d3fe949 100644
--- a/test/builtins/Unit/floatunsitf_test.c
+++ b/test/builtins/Unit/floatunsitf_test.c
@@ -11,13 +11,14 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#if __LDBL_MANT_DIG__ == 113
#include "fp_test.h"
-long double __floatunsitf(unsigned int a);
+COMPILER_RT_ABI long double __floatunsitf(unsigned int a);
int test__floatunsitf(unsigned int a, uint64_t expectedHi, uint64_t expectedLo)
{
diff --git a/test/builtins/Unit/floatunssidfvfp_test.c b/test/builtins/Unit/floatunssidfvfp_test.c
index 4883af1cf..75e4bbd6c 100644
--- a/test/builtins/Unit/floatunssidfvfp_test.c
+++ b/test/builtins/Unit/floatunssidfvfp_test.c
@@ -11,12 +11,13 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-extern double __floatunssidfvfp(unsigned int a);
+extern COMPILER_RT_ABI double __floatunssidfvfp(unsigned int a);
#if __arm__
int test__floatunssidfvfp(unsigned int a)
diff --git a/test/builtins/Unit/floatunssisfvfp_test.c b/test/builtins/Unit/floatunssisfvfp_test.c
index 917061a91..47f837cc8 100644
--- a/test/builtins/Unit/floatunssisfvfp_test.c
+++ b/test/builtins/Unit/floatunssisfvfp_test.c
@@ -14,9 +14,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include "int_lib.h"
-
-extern float __floatunssisfvfp(unsigned int a);
+extern COMPILER_RT_ABI float __floatunssisfvfp(unsigned int a);
#if __arm__
int test__floatunssisfvfp(unsigned int a)
diff --git a/test/builtins/Unit/floatuntidf_test.c b/test/builtins/Unit/floatuntidf_test.c
index 3cab02705..9855ff797 100644
--- a/test/builtins/Unit/floatuntidf_test.c
+++ b/test/builtins/Unit/floatuntidf_test.c
@@ -24,7 +24,7 @@
// seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-double __floatuntidf(tu_int a);
+COMPILER_RT_ABI double __floatuntidf(tu_int a);
int test__floatuntidf(tu_int a, double expected)
{
diff --git a/test/builtins/Unit/floatuntisf_test.c b/test/builtins/Unit/floatuntisf_test.c
index aeac3ee41..9b5ff790a 100644
--- a/test/builtins/Unit/floatuntisf_test.c
+++ b/test/builtins/Unit/floatuntisf_test.c
@@ -24,7 +24,7 @@
// seee eeee emmm mmmm mmmm mmmm mmmm mmmm
-float __floatuntisf(tu_int a);
+COMPILER_RT_ABI float __floatuntisf(tu_int a);
int test__floatuntisf(tu_int a, float expected)
{
diff --git a/test/builtins/Unit/floatuntixf_test.c b/test/builtins/Unit/floatuntixf_test.c
index 9c3434fdd..c58b55d3e 100644
--- a/test/builtins/Unit/floatuntixf_test.c
+++ b/test/builtins/Unit/floatuntixf_test.c
@@ -25,7 +25,7 @@
// gggg gggg gggg gggg gggg gggg gggg gggg | gggg gggg gggg gggg seee eeee eeee eeee |
// 1mmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-long double __floatuntixf(tu_int a);
+COMPILER_RT_ABI long double __floatuntixf(tu_int a);
int test__floatuntixf(tu_int a, long double expected)
{
diff --git a/test/builtins/Unit/lshrdi3_test.c b/test/builtins/Unit/lshrdi3_test.c
index ffc6a69d0..d48ae4dd7 100644
--- a/test/builtins/Unit/lshrdi3_test.c
+++ b/test/builtins/Unit/lshrdi3_test.c
@@ -18,7 +18,7 @@
// Precondition: 0 <= b < bits_in_dword
-di_int __lshrdi3(di_int a, si_int b);
+COMPILER_RT_ABI di_int __lshrdi3(di_int a, si_int b);
int test__lshrdi3(di_int a, si_int b, di_int expected)
{
diff --git a/test/builtins/Unit/lshrti3_test.c b/test/builtins/Unit/lshrti3_test.c
index 3f33c089c..f5a0dd616 100644
--- a/test/builtins/Unit/lshrti3_test.c
+++ b/test/builtins/Unit/lshrti3_test.c
@@ -20,7 +20,7 @@
// Precondition: 0 <= b < bits_in_dword
-ti_int __lshrti3(ti_int a, si_int b);
+COMPILER_RT_ABI ti_int __lshrti3(ti_int a, si_int b);
int test__lshrti3(ti_int a, si_int b, ti_int expected)
{
diff --git a/test/builtins/Unit/moddi3_test.c b/test/builtins/Unit/moddi3_test.c
index 9f6801d6f..62e8f227b 100644
--- a/test/builtins/Unit/moddi3_test.c
+++ b/test/builtins/Unit/moddi3_test.c
@@ -16,7 +16,7 @@
// Returns: a % b
-di_int __moddi3(di_int a, di_int b);
+COMPILER_RT_ABI di_int __moddi3(di_int a, di_int b);
int test__moddi3(di_int a, di_int b, di_int expected)
{
diff --git a/test/builtins/Unit/modsi3_test.c b/test/builtins/Unit/modsi3_test.c
index 52ec9a0ae..8c9f58832 100644
--- a/test/builtins/Unit/modsi3_test.c
+++ b/test/builtins/Unit/modsi3_test.c
@@ -17,7 +17,7 @@
/* Returns: a % b */
-si_int __modsi3(si_int a, si_int b);
+COMPILER_RT_ABI si_int __modsi3(si_int a, si_int b);
int test__modsi3(si_int a, si_int b, si_int expected) {
si_int x = __modsi3(a, b);
diff --git a/test/builtins/Unit/modti3_test.c b/test/builtins/Unit/modti3_test.c
index ba9f9804d..99413aaa2 100644
--- a/test/builtins/Unit/modti3_test.c
+++ b/test/builtins/Unit/modti3_test.c
@@ -18,7 +18,7 @@
// Returns: a % b
-ti_int __modti3(ti_int a, ti_int b);
+COMPILER_RT_ABI ti_int __modti3(ti_int a, ti_int b);
int test__modti3(ti_int a, ti_int b, ti_int expected)
{
diff --git a/test/builtins/Unit/muldc3_test.c b/test/builtins/Unit/muldc3_test.c
index 112b61203..6902ef322 100644
--- a/test/builtins/Unit/muldc3_test.c
+++ b/test/builtins/Unit/muldc3_test.c
@@ -18,7 +18,8 @@
// Returns: the product of a + ib and c + id
-double _Complex __muldc3(double __a, double __b, double __c, double __d);
+COMPILER_RT_ABI double _Complex
+__muldc3(double __a, double __b, double __c, double __d);
enum {zero, non_zero, inf, NaN, non_zero_nan};
diff --git a/test/builtins/Unit/muldf3vfp_test.c b/test/builtins/Unit/muldf3vfp_test.c
index 73454bf29..766972d7d 100644
--- a/test/builtins/Unit/muldf3vfp_test.c
+++ b/test/builtins/Unit/muldf3vfp_test.c
@@ -11,13 +11,14 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#if __arm__
-extern double __muldf3vfp(double a, double b);
+extern COMPILER_RT_ABI double __muldf3vfp(double a, double b);
int test__muldf3vfp(double a, double b)
{
diff --git a/test/builtins/Unit/muldi3_test.c b/test/builtins/Unit/muldi3_test.c
index 83b525592..651dd0177 100644
--- a/test/builtins/Unit/muldi3_test.c
+++ b/test/builtins/Unit/muldi3_test.c
@@ -14,7 +14,7 @@
#include "int_lib.h"
#include <stdio.h>
-di_int __muldi3(di_int a, di_int b);
+COMPILER_RT_ABI di_int __muldi3(di_int a, di_int b);
int test__muldi3(di_int a, di_int b, di_int expected)
{
diff --git a/test/builtins/Unit/mulodi4_test.c b/test/builtins/Unit/mulodi4_test.c
index 10a0eaac6..4546609fb 100644
--- a/test/builtins/Unit/mulodi4_test.c
+++ b/test/builtins/Unit/mulodi4_test.c
@@ -14,7 +14,7 @@
#include "int_lib.h"
#include <stdio.h>
-extern di_int __mulodi4(di_int a, di_int b, int* overflow);
+extern COMPILER_RT_ABI di_int __mulodi4(di_int a, di_int b, int* overflow);
int test__mulodi4(di_int a, di_int b, di_int expected, int expected_overflow)
{
diff --git a/test/builtins/Unit/mulosi4_test.c b/test/builtins/Unit/mulosi4_test.c
index fc509db2c..6a27d69bd 100644
--- a/test/builtins/Unit/mulosi4_test.c
+++ b/test/builtins/Unit/mulosi4_test.c
@@ -18,7 +18,7 @@
// Effects: aborts if a * b overflows
-si_int __mulosi4(si_int a, si_int b, int *overflow);
+COMPILER_RT_ABI si_int __mulosi4(si_int a, si_int b, int *overflow);
int test__mulosi4(si_int a, si_int b, si_int expected, int expected_overflow)
{
diff --git a/test/builtins/Unit/muloti4_test.c b/test/builtins/Unit/muloti4_test.c
index 95439a419..d00e7bb6b 100644
--- a/test/builtins/Unit/muloti4_test.c
+++ b/test/builtins/Unit/muloti4_test.c
@@ -20,7 +20,7 @@
// Effects: sets overflow if a * b overflows
-ti_int __muloti4(ti_int a, ti_int b, int *overflow);
+COMPILER_RT_ABI ti_int __muloti4(ti_int a, ti_int b, int *overflow);
int test__muloti4(ti_int a, ti_int b, ti_int expected, int expected_overflow)
{
diff --git a/test/builtins/Unit/mulsc3_test.c b/test/builtins/Unit/mulsc3_test.c
index 7a1b3ae00..eeb537ac1 100644
--- a/test/builtins/Unit/mulsc3_test.c
+++ b/test/builtins/Unit/mulsc3_test.c
@@ -18,7 +18,8 @@
// Returns: the product of a + ib and c + id
-float _Complex __mulsc3(float __a, float __b, float __c, float __d);
+COMPILER_RT_ABI float _Complex
+__mulsc3(float __a, float __b, float __c, float __d);
enum {zero, non_zero, inf, NaN, non_zero_nan};
diff --git a/test/builtins/Unit/mulsf3vfp_test.c b/test/builtins/Unit/mulsf3vfp_test.c
index 92cf1f128..5b0f6c143 100644
--- a/test/builtins/Unit/mulsf3vfp_test.c
+++ b/test/builtins/Unit/mulsf3vfp_test.c
@@ -11,12 +11,13 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-extern float __mulsf3vfp(float a, float b);
+extern COMPILER_RT_ABI float __mulsf3vfp(float a, float b);
#if __arm__
int test__mulsf3vfp(float a, float b)
diff --git a/test/builtins/Unit/multc3_test.c b/test/builtins/Unit/multc3_test.c
index 8d3480157..b1482638a 100644
--- a/test/builtins/Unit/multc3_test.c
+++ b/test/builtins/Unit/multc3_test.c
@@ -21,7 +21,7 @@
// Returns: the product of a + ib and c + id
-long double _Complex
+COMPILER_RT_ABI long double _Complex
__multc3(long double __a, long double __b, long double __c, long double __d);
enum {zero, non_zero, inf, NaN, non_zero_nan};
diff --git a/test/builtins/Unit/multf3_test.c b/test/builtins/Unit/multf3_test.c
index 89610056b..98a8f7a32 100644
--- a/test/builtins/Unit/multf3_test.c
+++ b/test/builtins/Unit/multf3_test.c
@@ -18,7 +18,7 @@
#include "fp_test.h"
// Returns: a * b
-long double __multf3(long double a, long double b);
+COMPILER_RT_ABI long double __multf3(long double a, long double b);
int test__multf3(long double a, long double b,
uint64_t expectedHi, uint64_t expectedLo)
diff --git a/test/builtins/Unit/multi3_test.c b/test/builtins/Unit/multi3_test.c
index 2ccbd06c3..04b1b8aa8 100644
--- a/test/builtins/Unit/multi3_test.c
+++ b/test/builtins/Unit/multi3_test.c
@@ -16,7 +16,7 @@
#ifdef CRT_HAS_128BIT
-ti_int __multi3(ti_int a, ti_int b);
+COMPILER_RT_ABI ti_int __multi3(ti_int a, ti_int b);
int test__multi3(ti_int a, ti_int b, ti_int expected)
{
diff --git a/test/builtins/Unit/mulvdi3_test.c b/test/builtins/Unit/mulvdi3_test.c
index a023bf611..7f16c4c4f 100644
--- a/test/builtins/Unit/mulvdi3_test.c
+++ b/test/builtins/Unit/mulvdi3_test.c
@@ -18,7 +18,7 @@
// Effects: aborts if a * b overflows
-di_int __mulvdi3(di_int a, di_int b);
+COMPILER_RT_ABI di_int __mulvdi3(di_int a, di_int b);
int test__mulvdi3(di_int a, di_int b, di_int expected)
{
diff --git a/test/builtins/Unit/mulvsi3_test.c b/test/builtins/Unit/mulvsi3_test.c
index 1eb53a5d5..64df4fe24 100644
--- a/test/builtins/Unit/mulvsi3_test.c
+++ b/test/builtins/Unit/mulvsi3_test.c
@@ -18,7 +18,7 @@
// Effects: aborts if a * b overflows
-si_int __mulvsi3(si_int a, si_int b);
+COMPILER_RT_ABI si_int __mulvsi3(si_int a, si_int b);
int test__mulvsi3(si_int a, si_int b, si_int expected)
{
diff --git a/test/builtins/Unit/mulvti3_test.c b/test/builtins/Unit/mulvti3_test.c
index 6336f4550..bf2f7316b 100644
--- a/test/builtins/Unit/mulvti3_test.c
+++ b/test/builtins/Unit/mulvti3_test.c
@@ -20,7 +20,7 @@
// Effects: aborts if a * b overflows
-ti_int __mulvti3(ti_int a, ti_int b);
+COMPILER_RT_ABI ti_int __mulvti3(ti_int a, ti_int b);
int test__mulvti3(ti_int a, ti_int b, ti_int expected)
{
diff --git a/test/builtins/Unit/mulxc3_test.c b/test/builtins/Unit/mulxc3_test.c
index 4297c162b..e77e94fa9 100644
--- a/test/builtins/Unit/mulxc3_test.c
+++ b/test/builtins/Unit/mulxc3_test.c
@@ -20,7 +20,7 @@
// Returns: the product of a + ib and c + id
-long double _Complex
+COMPILER_RT_ABI long double _Complex
__mulxc3(long double __a, long double __b, long double __c, long double __d);
enum {zero, non_zero, inf, NaN, non_zero_nan};
diff --git a/test/builtins/Unit/negdf2vfp_test.c b/test/builtins/Unit/negdf2vfp_test.c
index dc55428d6..f0e66777e 100644
--- a/test/builtins/Unit/negdf2vfp_test.c
+++ b/test/builtins/Unit/negdf2vfp_test.c
@@ -16,7 +16,7 @@
#include <math.h>
-extern double __negdf2vfp(double a);
+extern COMPILER_RT_ABI double __negdf2vfp(double a);
#if __arm__
int test__negdf2vfp(double a)
diff --git a/test/builtins/Unit/negdi2_test.c b/test/builtins/Unit/negdi2_test.c
index 510b3b046..beccd71ee 100644
--- a/test/builtins/Unit/negdi2_test.c
+++ b/test/builtins/Unit/negdi2_test.c
@@ -16,7 +16,7 @@
// Returns: -a
-di_int __negdi2(di_int a);
+COMPILER_RT_ABI di_int __negdi2(di_int a);
int test__negdi2(di_int a, di_int expected)
{
diff --git a/test/builtins/Unit/negsf2vfp_test.c b/test/builtins/Unit/negsf2vfp_test.c
index ef54cee1d..9e47d8909 100644
--- a/test/builtins/Unit/negsf2vfp_test.c
+++ b/test/builtins/Unit/negsf2vfp_test.c
@@ -11,12 +11,13 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-extern float __negsf2vfp(float a);
+extern COMPILER_RT_ABI float __negsf2vfp(float a);
#if __arm__
int test__negsf2vfp(float a)
diff --git a/test/builtins/Unit/negti2_test.c b/test/builtins/Unit/negti2_test.c
index a40c0c324..b07597868 100644
--- a/test/builtins/Unit/negti2_test.c
+++ b/test/builtins/Unit/negti2_test.c
@@ -18,7 +18,7 @@
// Returns: -a
-ti_int __negti2(ti_int a);
+COMPILER_RT_ABI ti_int __negti2(ti_int a);
int test__negti2(ti_int a, ti_int expected)
{
diff --git a/test/builtins/Unit/negvdi2_test.c b/test/builtins/Unit/negvdi2_test.c
index 9617b95ff..5c202e55c 100644
--- a/test/builtins/Unit/negvdi2_test.c
+++ b/test/builtins/Unit/negvdi2_test.c
@@ -18,7 +18,7 @@
// Effects: aborts if -a overflows
-di_int __negvdi2(di_int a);
+COMPILER_RT_ABI di_int __negvdi2(di_int a);
int test__negvdi2(di_int a)
{
diff --git a/test/builtins/Unit/negvsi2_test.c b/test/builtins/Unit/negvsi2_test.c
index 5ea0e2e86..6330803d5 100644
--- a/test/builtins/Unit/negvsi2_test.c
+++ b/test/builtins/Unit/negvsi2_test.c
@@ -18,7 +18,7 @@
// Effects: aborts if -a overflows
-si_int __negvsi2(si_int a);
+COMPILER_RT_ABI si_int __negvsi2(si_int a);
int test__negvsi2(si_int a)
{
diff --git a/test/builtins/Unit/negvti2_test.c b/test/builtins/Unit/negvti2_test.c
index 8126cdb5b..005f8a8ac 100644
--- a/test/builtins/Unit/negvti2_test.c
+++ b/test/builtins/Unit/negvti2_test.c
@@ -20,8 +20,8 @@
// Effects: aborts if -a overflows
-ti_int __negvti2(ti_int a);
-ti_int __negti2(ti_int a);
+COMPILER_RT_ABI ti_int __negvti2(ti_int a);
+COMPILER_RT_ABI ti_int __negti2(ti_int a);
int test__negvti2(ti_int a)
{
diff --git a/test/builtins/Unit/paritydi2_test.c b/test/builtins/Unit/paritydi2_test.c
index 5360e374d..98220bd8c 100644
--- a/test/builtins/Unit/paritydi2_test.c
+++ b/test/builtins/Unit/paritydi2_test.c
@@ -17,7 +17,7 @@
// Returns: 1 if number of bits is odd else returns 0
-si_int __paritydi2(di_int a);
+COMPILER_RT_ABI si_int __paritydi2(di_int a);
int naive_parity(di_int a)
{
diff --git a/test/builtins/Unit/paritysi2_test.c b/test/builtins/Unit/paritysi2_test.c
index 3ea8473aa..175aeb2c9 100644
--- a/test/builtins/Unit/paritysi2_test.c
+++ b/test/builtins/Unit/paritysi2_test.c
@@ -17,7 +17,7 @@
// Returns: 1 if number of bits is odd else returns 0
-si_int __paritysi2(si_int a);
+COMPILER_RT_ABI si_int __paritysi2(si_int a);
int naive_parity(si_int a)
{
diff --git a/test/builtins/Unit/parityti2_test.c b/test/builtins/Unit/parityti2_test.c
index 8f065b953..cc1e999f2 100644
--- a/test/builtins/Unit/parityti2_test.c
+++ b/test/builtins/Unit/parityti2_test.c
@@ -19,7 +19,7 @@
// Returns: 1 if number of bits is odd else returns 0
-si_int __parityti2(ti_int a);
+COMPILER_RT_ABI si_int __parityti2(ti_int a);
int naive_parity(ti_int a)
{
diff --git a/test/builtins/Unit/popcountdi2_test.c b/test/builtins/Unit/popcountdi2_test.c
index 4c5611796..bfd4977b4 100644
--- a/test/builtins/Unit/popcountdi2_test.c
+++ b/test/builtins/Unit/popcountdi2_test.c
@@ -17,7 +17,7 @@
// Returns: count of 1 bits
-si_int __popcountdi2(di_int a);
+COMPILER_RT_ABI si_int __popcountdi2(di_int a);
int naive_popcount(di_int a)
{
diff --git a/test/builtins/Unit/popcountsi2_test.c b/test/builtins/Unit/popcountsi2_test.c
index d0a05c45e..10b757d81 100644
--- a/test/builtins/Unit/popcountsi2_test.c
+++ b/test/builtins/Unit/popcountsi2_test.c
@@ -17,7 +17,7 @@
// Returns: count of 1 bits
-si_int __popcountsi2(si_int a);
+COMPILER_RT_ABI si_int __popcountsi2(si_int a);
int naive_popcount(si_int a)
{
diff --git a/test/builtins/Unit/popcountti2_test.c b/test/builtins/Unit/popcountti2_test.c
index d17e03afd..3a3c3cb4f 100644
--- a/test/builtins/Unit/popcountti2_test.c
+++ b/test/builtins/Unit/popcountti2_test.c
@@ -19,7 +19,7 @@
// Returns: count of 1 bits
-si_int __popcountti2(ti_int a);
+COMPILER_RT_ABI si_int __popcountti2(ti_int a);
int naive_popcount(ti_int a)
{
diff --git a/test/builtins/Unit/powidf2_test.c b/test/builtins/Unit/powidf2_test.c
index 2abc84de7..c499d9aba 100644
--- a/test/builtins/Unit/powidf2_test.c
+++ b/test/builtins/Unit/powidf2_test.c
@@ -17,7 +17,7 @@
// Returns: a ^ b
-double __powidf2(double a, si_int b);
+COMPILER_RT_ABI double __powidf2(double a, si_int b);
int test__powidf2(double a, si_int b, double expected)
{
diff --git a/test/builtins/Unit/powisf2_test.c b/test/builtins/Unit/powisf2_test.c
index 98409f432..1186ef4af 100644
--- a/test/builtins/Unit/powisf2_test.c
+++ b/test/builtins/Unit/powisf2_test.c
@@ -17,7 +17,7 @@
// Returns: a ^ b
-float __powisf2(float a, si_int b);
+COMPILER_RT_ABI float __powisf2(float a, si_int b);
int test__powisf2(float a, si_int b, float expected)
{
diff --git a/test/builtins/Unit/powitf2_test.c b/test/builtins/Unit/powitf2_test.c
index dfe758837..13c890a0d 100644
--- a/test/builtins/Unit/powitf2_test.c
+++ b/test/builtins/Unit/powitf2_test.c
@@ -20,7 +20,7 @@
// Returns: a ^ b
-long double __powitf2(long double a, si_int b);
+COMPILER_RT_ABI long double __powitf2(long double a, si_int b);
int test__powitf2(long double a, si_int b, long double expected)
{
diff --git a/test/builtins/Unit/powixf2_test.c b/test/builtins/Unit/powixf2_test.c
index 201870b37..a28f1f969 100644
--- a/test/builtins/Unit/powixf2_test.c
+++ b/test/builtins/Unit/powixf2_test.c
@@ -19,7 +19,7 @@
// Returns: a ^ b
-long double __powixf2(long double a, si_int b);
+COMPILER_RT_ABI long double __powixf2(long double a, si_int b);
int test__powixf2(long double a, si_int b, long double expected)
{
diff --git a/test/builtins/Unit/ppc/floatditf_test.c b/test/builtins/Unit/ppc/floatditf_test.c
index 578260aed..71ecf7c4b 100644
--- a/test/builtins/Unit/ppc/floatditf_test.c
+++ b/test/builtins/Unit/ppc/floatditf_test.c
@@ -1,7 +1,7 @@
#include <stdint.h>
#include <stdio.h>
-long double __floatditf(int64_t);
+COMPILER_RT_ABI long double __floatditf(int64_t);
#include "floatunditf_test.h"
#include "DD.h"
diff --git a/test/builtins/Unit/ppc/floatunditf_test.c b/test/builtins/Unit/ppc/floatunditf_test.c
index 68390d197..4d1ce0884 100644
--- a/test/builtins/Unit/ppc/floatunditf_test.c
+++ b/test/builtins/Unit/ppc/floatunditf_test.c
@@ -1,7 +1,7 @@
#include <stdint.h>
#include <stdio.h>
-long double __floatunditf(uint64_t);
+COMPILER_RT_ABI long double __floatunditf(uint64_t);
#include "floatunditf_test.h"
#include "DD.h"
diff --git a/test/builtins/Unit/subdf3vfp_test.c b/test/builtins/Unit/subdf3vfp_test.c
index 86d6f2fef..5d5d71170 100644
--- a/test/builtins/Unit/subdf3vfp_test.c
+++ b/test/builtins/Unit/subdf3vfp_test.c
@@ -17,7 +17,7 @@
#if __arm__
-extern double __subdf3vfp(double a, double b);
+extern COMPILER_RT_ABI double __subdf3vfp(double a, double b);
int test__subdf3vfp(double a, double b)
{
diff --git a/test/builtins/Unit/subsf3vfp_test.c b/test/builtins/Unit/subsf3vfp_test.c
index 223e7f8f3..fe60058de 100644
--- a/test/builtins/Unit/subsf3vfp_test.c
+++ b/test/builtins/Unit/subsf3vfp_test.c
@@ -11,12 +11,13 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-extern float __subsf3vfp(float a, float b);
+extern COMPILER_RT_ABI float __subsf3vfp(float a, float b);
#if __arm__
int test__subsf3vfp(float a, float b)
diff --git a/test/builtins/Unit/subtf3_test.c b/test/builtins/Unit/subtf3_test.c
index 2ab249a99..ad115a40c 100644
--- a/test/builtins/Unit/subtf3_test.c
+++ b/test/builtins/Unit/subtf3_test.c
@@ -18,7 +18,7 @@
#include "fp_test.h"
// Returns: a - b
-long double __subtf3(long double a, long double b);
+COMPILER_RT_ABI long double __subtf3(long double a, long double b);
int test__subtf3(long double a, long double b,
uint64_t expectedHi, uint64_t expectedLo)
diff --git a/test/builtins/Unit/subvdi3_test.c b/test/builtins/Unit/subvdi3_test.c
index 0fb8f5156..96e825caf 100644
--- a/test/builtins/Unit/subvdi3_test.c
+++ b/test/builtins/Unit/subvdi3_test.c
@@ -19,7 +19,7 @@
// Effects: aborts if a - b overflows
-di_int __subvdi3(di_int a, di_int b);
+COMPILER_RT_ABI di_int __subvdi3(di_int a, di_int b);
int test__subvdi3(di_int a, di_int b)
{
diff --git a/test/builtins/Unit/subvsi3_test.c b/test/builtins/Unit/subvsi3_test.c
index 14e6ce193..03ef5045d 100644
--- a/test/builtins/Unit/subvsi3_test.c
+++ b/test/builtins/Unit/subvsi3_test.c
@@ -19,7 +19,7 @@
// Effects: aborts if a - b overflows
-si_int __subvsi3(si_int a, si_int b);
+COMPILER_RT_ABI si_int __subvsi3(si_int a, si_int b);
int test__subvsi3(si_int a, si_int b)
{
diff --git a/test/builtins/Unit/subvti3_test.c b/test/builtins/Unit/subvti3_test.c
index b2c225c3a..40eb51869 100644
--- a/test/builtins/Unit/subvti3_test.c
+++ b/test/builtins/Unit/subvti3_test.c
@@ -21,7 +21,7 @@
// Effects: aborts if a - b overflows
-ti_int __subvti3(ti_int a, ti_int b);
+COMPILER_RT_ABI ti_int __subvti3(ti_int a, ti_int b);
int test__subvti3(ti_int a, ti_int b)
{
diff --git a/test/builtins/Unit/truncdfsf2vfp_test.c b/test/builtins/Unit/truncdfsf2vfp_test.c
index afc7868b0..eaeda6582 100644
--- a/test/builtins/Unit/truncdfsf2vfp_test.c
+++ b/test/builtins/Unit/truncdfsf2vfp_test.c
@@ -11,12 +11,13 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-extern float __truncdfsf2vfp(double a);
+extern COMPILER_RT_ABI float __truncdfsf2vfp(double a);
#if __arm__
int test__truncdfsf2vfp(double a)
diff --git a/test/builtins/Unit/trunctfdf2_test.c b/test/builtins/Unit/trunctfdf2_test.c
index 46855e31b..0366a8ce9 100644
--- a/test/builtins/Unit/trunctfdf2_test.c
+++ b/test/builtins/Unit/trunctfdf2_test.c
@@ -11,13 +11,14 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#if __LDBL_MANT_DIG__ == 113
#include "fp_test.h"
-double __trunctfdf2(long double a);
+COMPILER_RT_ABI double __trunctfdf2(long double a);
int test__trunctfdf2(long double a, uint64_t expected)
{
diff --git a/test/builtins/Unit/trunctfsf2_test.c b/test/builtins/Unit/trunctfsf2_test.c
index 44e7fd182..a6b922ce1 100644
--- a/test/builtins/Unit/trunctfsf2_test.c
+++ b/test/builtins/Unit/trunctfsf2_test.c
@@ -11,13 +11,14 @@
//
//===----------------------------------------------------------------------===//
+#include "int_lib.h"
#include <stdio.h>
#if __LDBL_MANT_DIG__ == 113
#include "fp_test.h"
-float __trunctfsf2(long double a);
+COMPILER_RT_ABI float __trunctfsf2(long double a);
int test__trunctfsf2(long double a, uint32_t expected)
{
diff --git a/test/builtins/Unit/ucmpdi2_test.c b/test/builtins/Unit/ucmpdi2_test.c
index 22059077c..65ae4fce0 100644
--- a/test/builtins/Unit/ucmpdi2_test.c
+++ b/test/builtins/Unit/ucmpdi2_test.c
@@ -18,7 +18,7 @@
// if (a == b) returns 1
// if (a > b) returns 2
-si_int __ucmpdi2(du_int a, du_int b);
+COMPILER_RT_ABI si_int __ucmpdi2(du_int a, du_int b);
int test__ucmpdi2(du_int a, du_int b, si_int expected)
{
diff --git a/test/builtins/Unit/ucmpti2_test.c b/test/builtins/Unit/ucmpti2_test.c
index 0713da897..826cd6439 100644
--- a/test/builtins/Unit/ucmpti2_test.c
+++ b/test/builtins/Unit/ucmpti2_test.c
@@ -20,7 +20,7 @@
// if (a == b) returns 1
// if (a > b) returns 2
-si_int __ucmpti2(tu_int a, tu_int b);
+COMPILER_RT_ABI si_int __ucmpti2(tu_int a, tu_int b);
int test__ucmpti2(tu_int a, tu_int b, si_int expected)
{
diff --git a/test/builtins/Unit/udivdi3_test.c b/test/builtins/Unit/udivdi3_test.c
index 24843f8bd..48c99e309 100644
--- a/test/builtins/Unit/udivdi3_test.c
+++ b/test/builtins/Unit/udivdi3_test.c
@@ -16,7 +16,7 @@
// Returns: a / b
-du_int __udivdi3(du_int a, du_int b);
+COMPILER_RT_ABI du_int __udivdi3(du_int a, du_int b);
int test__udivdi3(du_int a, du_int b, du_int expected_q)
{
diff --git a/test/builtins/Unit/udivmoddi4_test.c b/test/builtins/Unit/udivmoddi4_test.c
index 43bf1a11f..79af1eeff 100644
--- a/test/builtins/Unit/udivmoddi4_test.c
+++ b/test/builtins/Unit/udivmoddi4_test.c
@@ -17,7 +17,7 @@
// Effects: if rem != 0, *rem = a % b
// Returns: a / b
-du_int __udivmoddi4(du_int a, du_int b, du_int* rem);
+COMPILER_RT_ABI du_int __udivmoddi4(du_int a, du_int b, du_int* rem);
int test__udivmoddi4(du_int a, du_int b, du_int expected_q, du_int expected_r)
{
diff --git a/test/builtins/Unit/udivmodsi4_test.c b/test/builtins/Unit/udivmodsi4_test.c
index d734cd1fd..4c14e297d 100644
--- a/test/builtins/Unit/udivmodsi4_test.c
+++ b/test/builtins/Unit/udivmodsi4_test.c
@@ -16,7 +16,7 @@
// Returns: a / b
-extern su_int __udivmodsi4(su_int a, su_int b, su_int* rem);
+extern COMPILER_RT_ABI su_int __udivmodsi4(su_int a, su_int b, su_int* rem);
int test__udivmodsi4(su_int a, su_int b,
su_int expected_result, su_int expected_rem)
diff --git a/test/builtins/Unit/udivmodti4_test.c b/test/builtins/Unit/udivmodti4_test.c
index 751aa8683..c4246613d 100644
--- a/test/builtins/Unit/udivmodti4_test.c
+++ b/test/builtins/Unit/udivmodti4_test.c
@@ -19,7 +19,7 @@
// Effects: if rem != 0, *rem = a % b
// Returns: a / b
-tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);
+COMPILER_RT_ABI tu_int __udivmodti4(tu_int a, tu_int b, tu_int* rem);
int test__udivmodti4(tu_int a, tu_int b, tu_int expected_q, tu_int expected_r)
{
diff --git a/test/builtins/Unit/udivsi3_test.c b/test/builtins/Unit/udivsi3_test.c
index 325e4e6e8..49053865b 100644
--- a/test/builtins/Unit/udivsi3_test.c
+++ b/test/builtins/Unit/udivsi3_test.c
@@ -16,7 +16,7 @@
// Returns: a / b
-su_int __udivsi3(su_int a, su_int b);
+COMPILER_RT_ABI su_int __udivsi3(su_int a, su_int b);
int test__udivsi3(su_int a, su_int b, su_int expected_q)
{
diff --git a/test/builtins/Unit/udivti3_test.c b/test/builtins/Unit/udivti3_test.c
index af5aad9a3..f24ff03b2 100644
--- a/test/builtins/Unit/udivti3_test.c
+++ b/test/builtins/Unit/udivti3_test.c
@@ -18,7 +18,7 @@
// Returns: a / b
-tu_int __udivti3(tu_int a, tu_int b);
+COMPILER_RT_ABI tu_int __udivti3(tu_int a, tu_int b);
int test__udivti3(tu_int a, tu_int b, tu_int expected_q)
{
diff --git a/test/builtins/Unit/umoddi3_test.c b/test/builtins/Unit/umoddi3_test.c
index a8f39b415..b46fb4022 100644
--- a/test/builtins/Unit/umoddi3_test.c
+++ b/test/builtins/Unit/umoddi3_test.c
@@ -16,7 +16,7 @@
// Returns: a % b
-du_int __umoddi3(du_int a, du_int b);
+COMPILER_RT_ABI du_int __umoddi3(du_int a, du_int b);
int test__umoddi3(du_int a, du_int b, du_int expected_r)
{
diff --git a/test/builtins/Unit/umodsi3_test.c b/test/builtins/Unit/umodsi3_test.c
index 66da695ff..3655da139 100644
--- a/test/builtins/Unit/umodsi3_test.c
+++ b/test/builtins/Unit/umodsi3_test.c
@@ -16,7 +16,7 @@
// Returns: a % b
-su_int __umodsi3(su_int a, su_int b);
+COMPILER_RT_ABI su_int __umodsi3(su_int a, su_int b);
int test__umodsi3(su_int a, su_int b, su_int expected_r)
{
diff --git a/test/builtins/Unit/umodti3_test.c b/test/builtins/Unit/umodti3_test.c
index 93b556cca..21e82a4a2 100644
--- a/test/builtins/Unit/umodti3_test.c
+++ b/test/builtins/Unit/umodti3_test.c
@@ -18,7 +18,7 @@
// Returns: a % b
-tu_int __umodti3(tu_int a, tu_int b);
+COMPILER_RT_ABI tu_int __umodti3(tu_int a, tu_int b);
int test__umodti3(tu_int a, tu_int b, tu_int expected_r)
{