Skip to content

Commit 13fe638

Browse files
committed
Fix build for several other architectures
1 parent d662ff1 commit 13fe638

17 files changed

+62
-2
lines changed

addtf3.c

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#define QUAD_PRECISION
1616
#include "fp_lib.h"
1717

18+
#if defined(CRT_HAS_IEEE_TF)
19+
1820
#if defined(CRT_HAS_TF_MODE)
1921
#include "fp_add_impl.inc"
2022

@@ -25,3 +27,5 @@ COMPILER_RT_ABI fp_t __addtf3(fp_t a, fp_t b) {
2527
#endif
2628

2729
#endif
30+
31+
#endif

comparetf2.c

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
#define QUAD_PRECISION
4242
#include "fp_lib.h"
4343

44+
#if defined(CRT_HAS_IEEE_TF)
45+
4446
#if defined(CRT_HAS_TF_MODE)
4547
#include "fp_compare_impl.inc"
4648

@@ -65,3 +67,5 @@ COMPILER_RT_ABI CMP_RESULT __unordtf2(fp_t a, fp_t b) {
6567
#endif
6668

6769
#endif
70+
71+
#endif

divtf3.c

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#define QUAD_PRECISION
1717
#include "fp_lib.h"
1818

19+
#if defined(CRT_HAS_IEEE_TF)
20+
1921
#if defined(CRT_HAS_TF_MODE)
2022

2123
#define NUMBER_OF_HALF_ITERATIONS 4
@@ -28,3 +30,5 @@ COMPILER_RT_ABI fp_t __divtf3(fp_t a, fp_t b) { return __divXf3__(a, b); }
2830
#endif
2931

3032
#endif
33+
34+
#endif

fixtfdi.c

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#define QUAD_PRECISION
1212
#include "fp_lib.h"
1313

14+
#if defined(CRT_HAS_IEEE_TF)
15+
1416
#if defined(CRT_HAS_TF_MODE)
1517
typedef di_int fixint_t;
1618
typedef du_int fixuint_t;
@@ -20,3 +22,5 @@ COMPILER_RT_ABI di_int __fixtfdi(fp_t a) { return __fixint(a); }
2022
#endif
2123

2224
#endif
25+
26+
#endif

fixtfsi.c

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#define QUAD_PRECISION
1212
#include "fp_lib.h"
1313

14+
#if defined(CRT_HAS_IEEE_TF)
15+
1416
#if defined(CRT_HAS_TF_MODE)
1517
typedef si_int fixint_t;
1618
typedef su_int fixuint_t;
@@ -20,3 +22,5 @@ COMPILER_RT_ABI si_int __fixtfsi(fp_t a) { return __fixint(a); }
2022
#endif
2123

2224
#endif
25+
26+
#endif

fixtfti.c

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#define QUAD_PRECISION
1212
#include "fp_lib.h"
1313

14+
#if defined(CRT_HAS_IEEE_TF)
15+
1416
#if defined(CRT_HAS_TF_MODE)
1517
typedef ti_int fixint_t;
1618
typedef tu_int fixuint_t;
@@ -20,3 +22,5 @@ COMPILER_RT_ABI ti_int __fixtfti(fp_t a) { return __fixint(a); }
2022
#endif
2123

2224
#endif
25+
26+
#endif

fixunstfdi.c

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#define QUAD_PRECISION
1212
#include "fp_lib.h"
1313

14+
#if defined(CRT_HAS_IEEE_TF)
15+
1416
#if defined(CRT_HAS_TF_MODE)
1517
typedef du_int fixuint_t;
1618
#include "fp_fixuint_impl.inc"
@@ -19,3 +21,5 @@ COMPILER_RT_ABI du_int __fixunstfdi(fp_t a) { return __fixuint(a); }
1921
#endif
2022

2123
#endif
24+
25+
#endif

fixunstfsi.c

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#define QUAD_PRECISION
1212
#include "fp_lib.h"
1313

14+
#if defined(CRT_HAS_IEEE_TF)
15+
1416
#if defined(CRT_HAS_TF_MODE)
1517
typedef su_int fixuint_t;
1618
#include "fp_fixuint_impl.inc"
@@ -19,3 +21,5 @@ COMPILER_RT_ABI su_int __fixunstfsi(fp_t a) { return __fixuint(a); }
1921
#endif
2022

2123
#endif
24+
25+
#endif

fixunstfti.c

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#define QUAD_PRECISION
1212
#include "fp_lib.h"
1313

14+
#if defined(CRT_HAS_IEEE_TF)
15+
1416
#if defined(CRT_HAS_TF_MODE)
1517
typedef tu_int fixuint_t;
1618
#include "fp_fixuint_impl.inc"
@@ -19,3 +21,5 @@ COMPILER_RT_ABI tu_int __fixunstfti(fp_t a) { return __fixuint(a); }
1921
#endif
2022

2123
#endif
24+
25+
#endif

floatditf.c

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#define QUAD_PRECISION
1818
#include "fp_lib.h"
1919

20+
#if defined(CRT_HAS_IEEE_TF)
21+
2022
#if defined(CRT_HAS_TF_MODE)
2123
COMPILER_RT_ABI fp_t __floatditf(di_int a) {
2224

@@ -51,3 +53,5 @@ COMPILER_RT_ABI fp_t __floatditf(di_int a) {
5153
#endif
5254

5355
#endif
56+
57+
#endif

floatsitf.c

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#define QUAD_PRECISION
1818
#include "fp_lib.h"
1919

20+
#if defined(CRT_HAS_IEEE_TF)
21+
2022
#if defined(CRT_HAS_TF_MODE)
2123
COMPILER_RT_ABI fp_t __floatsitf(si_int a) {
2224

@@ -51,3 +53,5 @@ COMPILER_RT_ABI fp_t __floatsitf(si_int a) {
5153
#endif
5254

5355
#endif
56+
57+
#endif

floatunditf.c

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#define QUAD_PRECISION
1818
#include "fp_lib.h"
1919

20+
#if defined(CRT_HAS_IEEE_TF)
21+
2022
#if defined(CRT_HAS_TF_MODE)
2123
COMPILER_RT_ABI fp_t __floatunditf(du_int a) {
2224

@@ -42,3 +44,5 @@ COMPILER_RT_ABI fp_t __floatunditf(du_int a) {
4244
#endif
4345

4446
#endif
47+
48+
#endif

floatunsitf.c

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#define QUAD_PRECISION
1818
#include "fp_lib.h"
1919

20+
#if defined(CRT_HAS_IEEE_TF)
21+
2022
#if defined(CRT_HAS_TF_MODE)
2123
COMPILER_RT_ABI fp_t __floatunsitf(su_int a) {
2224

@@ -42,3 +44,5 @@ COMPILER_RT_ABI fp_t __floatunsitf(su_int a) {
4244
#endif
4345

4446
#endif
47+
48+
#endif

multf3.c

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#define QUAD_PRECISION
1717
#include "fp_lib.h"
1818

19+
#if defined(CRT_HAS_IEEE_TF)
20+
1921
#if defined(CRT_HAS_TF_MODE)
2022
#include "fp_mul_impl.inc"
2123

@@ -24,3 +26,5 @@ COMPILER_RT_ABI fp_t __multf3(fp_t a, fp_t b) { return __mulXf3__(a, b); }
2426
#endif
2527

2628
#endif
29+
30+
#endif

subtf3.c

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#define QUAD_PRECISION
1616
#include "fp_lib.h"
1717

18+
#if defined(CRT_HAS_IEEE_TF)
19+
1820
#if defined(CRT_HAS_TF_MODE)
1921
COMPILER_RT_ABI fp_t __addtf3(fp_t a, fp_t b);
2022

@@ -26,3 +28,5 @@ COMPILER_RT_ABI fp_t __subtf3(fp_t a, fp_t b) {
2628
#endif
2729

2830
#endif
31+
32+
#endif

truncdfbf2.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#ifndef CC_RUNTIME_NO_FLOAT
1010

11-
#ifndef __loongarch64
11+
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)
1212

1313
#define SRC_DOUBLE
1414
#define DST_BFLOAT

truncsfbf2.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#ifndef CC_RUNTIME_NO_FLOAT
1010

11-
#ifndef __loongarch64
11+
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || defined(__riscv)
1212

1313
#define SRC_SINGLE
1414
#define DST_BFLOAT

0 commit comments

Comments
 (0)