llvm-project
157 строк · 6.0 Кб
1// Detect if we're using arm-*-*-gnueabihf
2#if defined(__arm__) && \
3defined(__ARM_ARCH_7A__) && defined(__ARM_EABI__) && \
4defined(__ARM_FP) && (__ARM_FP >= 0x04)
5#define ARM_GNUEABIHF
6#endif
7
8#if !defined(__x86_64__) && \
9!defined(__aarch64__) && \
10!defined(__i386__) && \
11!defined(ARM_GNUEABIHF)
12#error The only platforms that are currently supported are x86_64, i386, arm-gnueabihf, and aarch64.
13#endif
14
15#if defined(__x86_64__) || defined(__i386__)
16#define GLOBAL_X86
17#endif
18
19#if __SIZEOF_POINTER__ >= 8
20#define GLOBAL_64BIT
21#else
22#define GLOBAL_32BIT
23#endif
24
25GCC_3.0 {
26__absvdi2; __absvsi2; __addvdi3; __addvsi3; __clear_cache; __ffsdi2;
27__fixunsdfdi; __fixunssfdi; __mulvdi3; __mulvsi3; __negvdi2; __negvsi2;
28__subvdi3; __subvsi3;
29_Unwind_DeleteException;
30_Unwind_ForcedUnwind;
31_Unwind_GetDataRelBase;
32_Unwind_GetLanguageSpecificData;
33_Unwind_GetRegionStart;
34_Unwind_GetTextRelBase;
35_Unwind_RaiseException;
36_Unwind_Resume;
37};
38
39GCC_3.3 { _Unwind_GetCFA; _Unwind_Resume_or_Rethrow; };
40GCC_3.3.1 { __gcc_personality_v0; };
41GCC_3.4 { __clzdi2; __ctzdi2; __paritydi2; __popcountdi2; };
42GCC_3.4.2 { __enable_execute_stack; };
43GCC_4.0.0 { __divdc3; __divsc3; __muldc3; __mulsc3; __powidf2; __powisf2; };
44GCC_4.3.0 { __bswapdi2; __bswapsi2; __emutls_get_address; };
45
46#if defined(GLOBAL_32BIT)
47GCC_3.0 {
48__ashldi3; __ashrdi3; __cmpdi2; __fixdfdi; __fixsfdi; __fixunsdfsi;
49__fixunssfsi; __floatdidf; __floatdisf; __lshrdi3; __muldi3; __negdi2;
50__ucmpdi2; __udivmoddi4;
51};
52
53GCC_3.4 { __clzsi2; __ctzsi2; __paritysi2; __popcountsi2; };
54GCC_4.2.0 { __floatundidf; __floatundisf; };
55GCC_4.3.0 { __ffssi2; };
56GCC_7.0.0 { __divmoddi4; };
57GLIBC_2.0 { __divdi3; __moddi3; __udivdi3; __umoddi3; };
58#elif defined(GLOBAL_64BIT)
59GCC_3.0 {
60__ashlti3; __ashrti3; __cmpti2; __divti3; __ffsti2; __fixdfti;
61__fixsfti; __fixunssfti; __floattidf; __lshrti3; __modti3; __multi3;
62__negti2; __ucmpti2; __udivmodti4; __udivti3; __umodti3; __fixunsdfti;
63__floattisf;
64};
65
66GCC_3.4 { __clzti2; __ctzti2; __parityti2; __popcountti2; };
67GCC_3.4.4 { __absvti2; __addvti3; __mulvti3; __negvti2; __subvti3; };
68GCC_4.2.0 { __floatuntidf; __floatuntisf; };
69GCC_7.0.0 { __divmodti4; };
70#endif
71
72#if defined(GLOBAL_X86)
73GCC_3.0 { __fixunsxfdi; };
74GCC_4.0.0 { __divxc3; __mulxc3; __powixf2; };
75GCC_4.8.0 { __cpu_indicator_init; };
76#endif
77
78#if !defined(ARM_GNUEABIHF)
79GCC_3.0 {
80_Unwind_Find_FDE; _Unwind_GetGR; _Unwind_GetIP; _Unwind_SetGR; _Unwind_SetIP;
81};
82
83GCC_3.3 { _Unwind_Backtrace; _Unwind_FindEnclosingFunction; };
84GCC_4.2.0 { _Unwind_GetIPInfo; };
85#else // defined(ARM_GNUEABIHF)
86GCC_3.0 {
87__adddf3; __addsf3; __divdf3; __divsf3; __divsi3; __eqdf2;
88__eqsf2; __extendsfdf2; __fixdfsi; __fixsfsi; __floatsidf; __floatsisf;
89__gedf2; __gesf2; __gtdf2; __gtsf2; __ledf2; __lesf2;
90__ltdf2; __ltsf2; __modsi3; __muldf3; __mulsf3; __nedf2;
91__negdf2; __negsf2; __nesf2; __subdf3; __subsf3; __truncdfsf2;
92__udivsi3; __umodsi3;
93};
94
95GCC_3.3.4 { __unorddf2; __unordsf2; };
96
97GCC_3.5 {
98__aeabi_cdcmpeq; __aeabi_cdcmple; __aeabi_cdrcmple; __aeabi_cfcmpeq;
99__aeabi_cfcmple; __aeabi_cfrcmple; __aeabi_d2f; __aeabi_d2iz;
100__aeabi_d2lz; __aeabi_d2uiz; __aeabi_d2ulz; __aeabi_dadd;
101__aeabi_dcmpeq; __aeabi_dcmpge; __aeabi_dcmpgt; __aeabi_dcmple;
102__aeabi_dcmplt; __aeabi_dcmpun; __aeabi_ddiv; __aeabi_dmul;
103__aeabi_dneg; __aeabi_drsub; __aeabi_dsub; __aeabi_f2d;
104__aeabi_f2iz; __aeabi_f2lz; __aeabi_f2uiz; __aeabi_f2ulz;
105__aeabi_fadd; __aeabi_fcmpeq; __aeabi_fcmpge; __aeabi_fcmpgt;
106__aeabi_fcmple; __aeabi_fcmplt; __aeabi_fcmpun; __aeabi_fdiv;
107__aeabi_fmul; __aeabi_fneg; __aeabi_frsub; __aeabi_fsub;
108__aeabi_i2d; __aeabi_i2f; __aeabi_idiv; __aeabi_idiv0;
109__aeabi_idivmod; __aeabi_l2d; __aeabi_l2f; __aeabi_lasr;
110__aeabi_lcmp; __aeabi_ldiv0; __aeabi_ldivmod; __aeabi_llsl;
111__aeabi_llsr; __aeabi_lmul; __aeabi_ui2d; __aeabi_ui2f;
112__aeabi_uidiv; __aeabi_uidivmod; __aeabi_ul2d; __aeabi_ul2f;
113__aeabi_ulcmp; __aeabi_uldivmod; __aeabi_unwind_cpp_pr0;
114__aeabi_unwind_cpp_pr1; __aeabi_unwind_cpp_pr2;
115__gnu_unwind_frame;
116_Unwind_Complete;
117_Unwind_VRS_Get;
118_Unwind_VRS_Pop;
119_Unwind_VRS_Set;
120};
121
122GCC_4.2.0 { __floatunsidf; __floatunsisf; };
123GCC_4.3.0 { _Unwind_Backtrace; };
124#endif
125
126#if defined(__aarch64__)
127GCC_3.0 {
128__addtf3; __divtf3; __eqtf2; __extenddftf2; __extendsftf2;
129__fixtfdi; __fixtfsi; __fixtfti; __fixunstfdi; __fixunstfsi;
130__fixunstfti; __floatditf; __floatsitf; __floattitf; __getf2;
131__gttf2; __letf2; __lttf2; __multf3; __netf2;
132__subtf3; __trunctfdf2; __trunctfsf2;
133};
134
135GCC_4.0.0 { __powitf2; __divtc3; __multc3; };
136GCC_4.2.0 { __floatunditf; __floatunsitf; __floatuntitf; };
137GCC_4.5.0 { __unordtf2; };
138#endif
139
140#if defined(__aarch64__) || defined(__i386__)
141GLIBC_2.0 { __deregister_frame; __register_frame; };
142#endif
143
144#if defined(__i386__)
145GCC_3.0 { __fixunsxfsi; __fixxfdi; __floatdixf; };
146GCC_4.2.0 { __floatundixf; };
147#endif
148
149#if defined(__x86_64__)
150GCC_3.0 {
151__deregister_frame; __register_frame;
152__fixunsxfti; __fixxfti; __floattixf;
153};
154
155GCC_4.2.0 { __floatuntixf; };
156GCC_4.3.0 { __divtc3; __multc3; };
157#endif
158