Alexey Samsonov | a6b264b | 2014-02-14 09:20:33 +0000 | [diff] [blame] | 1 | # This directory contains a large amount of C code which provides |
| 2 | # generic implementations of the core runtime library along with optimized |
| 3 | # architecture-specific code in various subdirectories. |
| 4 | |
| 5 | set(GENERIC_SOURCES |
| 6 | absvdi2.c |
| 7 | absvsi2.c |
| 8 | absvti2.c |
| 9 | adddf3.c |
| 10 | addsf3.c |
| 11 | addvdi3.c |
| 12 | addvsi3.c |
| 13 | addvti3.c |
| 14 | apple_versioning.c |
| 15 | ashldi3.c |
| 16 | ashlti3.c |
| 17 | ashrdi3.c |
| 18 | ashrti3.c |
| 19 | # FIXME: atomic.c may only be compiled if host compiler understands _Atomic |
| 20 | # atomic.c |
| 21 | clear_cache.c |
| 22 | clzdi2.c |
| 23 | clzsi2.c |
| 24 | clzti2.c |
| 25 | cmpdi2.c |
| 26 | cmpti2.c |
| 27 | comparedf2.c |
| 28 | comparesf2.c |
| 29 | ctzdi2.c |
| 30 | ctzsi2.c |
| 31 | ctzti2.c |
| 32 | divdc3.c |
| 33 | divdf3.c |
| 34 | divdi3.c |
| 35 | divmoddi4.c |
| 36 | divmodsi4.c |
| 37 | divsc3.c |
| 38 | divsf3.c |
| 39 | divsi3.c |
| 40 | divti3.c |
| 41 | divxc3.c |
| 42 | enable_execute_stack.c |
| 43 | eprintf.c |
| 44 | extendsfdf2.c |
| 45 | ffsdi2.c |
| 46 | ffsti2.c |
| 47 | fixdfdi.c |
| 48 | fixdfsi.c |
| 49 | fixdfti.c |
| 50 | fixsfdi.c |
| 51 | fixsfsi.c |
| 52 | fixsfti.c |
| 53 | fixunsdfdi.c |
| 54 | fixunsdfsi.c |
| 55 | fixunsdfti.c |
| 56 | fixunssfdi.c |
| 57 | fixunssfsi.c |
| 58 | fixunssfti.c |
| 59 | fixunsxfdi.c |
| 60 | fixunsxfsi.c |
| 61 | fixunsxfti.c |
| 62 | fixxfdi.c |
| 63 | fixxfti.c |
| 64 | floatdidf.c |
| 65 | floatdisf.c |
| 66 | floatdixf.c |
| 67 | floatsidf.c |
| 68 | floatsisf.c |
| 69 | floattidf.c |
| 70 | floattisf.c |
| 71 | floattixf.c |
| 72 | floatundidf.c |
| 73 | floatundisf.c |
| 74 | floatundixf.c |
| 75 | floatunsidf.c |
| 76 | floatunsisf.c |
| 77 | floatuntidf.c |
| 78 | floatuntisf.c |
| 79 | floatuntixf.c |
| 80 | gcc_personality_v0.c |
| 81 | int_util.c |
| 82 | lshrdi3.c |
| 83 | lshrti3.c |
| 84 | moddi3.c |
| 85 | modsi3.c |
| 86 | modti3.c |
| 87 | muldc3.c |
| 88 | muldf3.c |
| 89 | muldi3.c |
| 90 | mulodi4.c |
| 91 | mulosi4.c |
| 92 | muloti4.c |
| 93 | mulsc3.c |
| 94 | mulsf3.c |
| 95 | multi3.c |
| 96 | mulvdi3.c |
| 97 | mulvsi3.c |
| 98 | mulvti3.c |
| 99 | mulxc3.c |
| 100 | negdf2.c |
| 101 | negdi2.c |
| 102 | negsf2.c |
| 103 | negti2.c |
| 104 | negvdi2.c |
| 105 | negvsi2.c |
| 106 | negvti2.c |
| 107 | paritydi2.c |
| 108 | paritysi2.c |
| 109 | parityti2.c |
| 110 | popcountdi2.c |
| 111 | popcountsi2.c |
| 112 | popcountti2.c |
| 113 | powidf2.c |
| 114 | powisf2.c |
| 115 | powitf2.c |
| 116 | powixf2.c |
| 117 | subdf3.c |
| 118 | subsf3.c |
| 119 | subvdi3.c |
| 120 | subvsi3.c |
| 121 | subvti3.c |
| 122 | trampoline_setup.c |
| 123 | truncdfsf2.c |
| 124 | ucmpdi2.c |
| 125 | ucmpti2.c |
| 126 | udivdi3.c |
| 127 | udivmoddi4.c |
| 128 | udivmodsi4.c |
| 129 | udivmodti4.c |
| 130 | udivsi3.c |
| 131 | udivti3.c |
| 132 | umoddi3.c |
| 133 | umodsi3.c |
| 134 | umodti3.c) |
| 135 | |
| 136 | set(x86_64_SOURCES |
| 137 | x86_64/floatdidf.c |
| 138 | x86_64/floatdisf.c |
| 139 | x86_64/floatdixf.c |
| 140 | x86_64/floatundidf.S |
| 141 | x86_64/floatundisf.S |
| 142 | x86_64/floatundixf.S |
| 143 | ${GENERIC_SOURCES}) |
| 144 | |
| 145 | set(i386_SOURCES |
| 146 | i386/ashldi3.S |
| 147 | i386/ashrdi3.S |
| 148 | i386/divdi3.S |
| 149 | i386/floatdidf.S |
| 150 | i386/floatdisf.S |
| 151 | i386/floatdixf.S |
| 152 | i386/floatundidf.S |
| 153 | i386/floatundisf.S |
| 154 | i386/floatundixf.S |
| 155 | i386/lshrdi3.S |
| 156 | i386/moddi3.S |
| 157 | i386/muldi3.S |
| 158 | i386/udivdi3.S |
| 159 | i386/umoddi3.S |
| 160 | ${GENERIC_SOURCES}) |
| 161 | |
| 162 | set(arm_SOURCES |
| 163 | arm/adddf3vfp.S |
| 164 | arm/addsf3vfp.S |
| 165 | arm/aeabi_dcmp.S |
| 166 | arm/aeabi_fcmp.S |
| 167 | arm/aeabi_idivmod.S |
| 168 | arm/aeabi_ldivmod.S |
| 169 | arm/aeabi_memcmp.S |
| 170 | arm/aeabi_memcpy.S |
| 171 | arm/aeabi_memmove.S |
| 172 | arm/aeabi_memset.S |
| 173 | arm/aeabi_uidivmod.S |
| 174 | arm/aeabi_uldivmod.S |
| 175 | arm/bswapdi2.S |
| 176 | arm/bswapsi2.S |
| 177 | arm/comparesf2.S |
| 178 | arm/divdf3vfp.S |
| 179 | arm/divmodsi4.S |
| 180 | arm/divsf3vfp.S |
| 181 | arm/divsi3.S |
| 182 | arm/eqdf2vfp.S |
| 183 | arm/eqsf2vfp.S |
| 184 | arm/extendsfdf2vfp.S |
| 185 | arm/fixdfsivfp.S |
| 186 | arm/fixsfsivfp.S |
| 187 | arm/fixunsdfsivfp.S |
| 188 | arm/fixunssfsivfp.S |
| 189 | arm/floatsidfvfp.S |
| 190 | arm/floatsisfvfp.S |
| 191 | arm/floatunssidfvfp.S |
| 192 | arm/floatunssisfvfp.S |
| 193 | arm/gedf2vfp.S |
| 194 | arm/gesf2vfp.S |
| 195 | arm/gtdf2vfp.S |
| 196 | arm/gtsf2vfp.S |
| 197 | arm/ledf2vfp.S |
| 198 | arm/lesf2vfp.S |
| 199 | arm/ltdf2vfp.S |
| 200 | arm/ltsf2vfp.S |
| 201 | arm/modsi3.S |
| 202 | arm/muldf3vfp.S |
| 203 | arm/mulsf3vfp.S |
| 204 | arm/nedf2vfp.S |
| 205 | arm/negdf2vfp.S |
| 206 | arm/negsf2vfp.S |
| 207 | arm/nesf2vfp.S |
| 208 | arm/restore_vfp_d8_d15_regs.S |
| 209 | arm/save_vfp_d8_d15_regs.S |
| 210 | arm/subdf3vfp.S |
| 211 | arm/subsf3vfp.S |
| 212 | arm/switch16.S |
| 213 | arm/switch32.S |
| 214 | arm/switch8.S |
| 215 | arm/switchu8.S |
Tim Northover | 1683caa | 2014-03-04 10:10:17 +0000 | [diff] [blame] | 216 | arm/sync_fetch_and_add_4.S |
| 217 | arm/sync_fetch_and_add_8.S |
| 218 | arm/sync_fetch_and_and_4.S |
| 219 | arm/sync_fetch_and_and_8.S |
| 220 | arm/sync_fetch_and_max_4.S |
| 221 | arm/sync_fetch_and_max_8.S |
| 222 | arm/sync_fetch_and_min_4.S |
| 223 | arm/sync_fetch_and_min_8.S |
| 224 | arm/sync_fetch_and_nand_4.S |
| 225 | arm/sync_fetch_and_nand_8.S |
| 226 | arm/sync_fetch_and_or_4.S |
| 227 | arm/sync_fetch_and_or_8.S |
| 228 | arm/sync_fetch_and_sub_4.S |
| 229 | arm/sync_fetch_and_sub_8.S |
| 230 | arm/sync_fetch_and_umax_4.S |
| 231 | arm/sync_fetch_and_umax_8.S |
| 232 | arm/sync_fetch_and_umin_4.S |
| 233 | arm/sync_fetch_and_umin_8.S |
| 234 | arm/sync_fetch_and_xor_4.S |
| 235 | arm/sync_fetch_and_xor_8.S |
Alexey Samsonov | a6b264b | 2014-02-14 09:20:33 +0000 | [diff] [blame] | 236 | arm/sync_synchronize.S |
| 237 | arm/truncdfsf2vfp.S |
| 238 | arm/udivmodsi4.S |
| 239 | arm/udivsi3.S |
| 240 | arm/umodsi3.S |
| 241 | arm/unorddf2vfp.S |
| 242 | arm/unordsf2vfp.S |
| 243 | ${GENERIC_SOURCES}) |
| 244 | |
Alexey Samsonov | 63a4af7 | 2014-02-18 09:33:45 +0000 | [diff] [blame] | 245 | add_custom_target(builtins) |
| 246 | |
Alexey Samsonov | a6b264b | 2014-02-14 09:20:33 +0000 | [diff] [blame] | 247 | if (NOT WIN32) |
| 248 | foreach(arch x86_64 i386 arm) |
| 249 | if(CAN_TARGET_${arch}) |
Alexey Samsonov | 00997e2 | 2014-05-22 21:12:43 +0000 | [diff] [blame^] | 250 | add_compiler_rt_runtime(clang_rt.builtins-${arch} ${arch} STATIC |
Alexey Samsonov | a6b264b | 2014-02-14 09:20:33 +0000 | [diff] [blame] | 251 | SOURCES ${${arch}_SOURCES} |
| 252 | CFLAGS "-std=c99") |
Alexey Samsonov | 00997e2 | 2014-05-22 21:12:43 +0000 | [diff] [blame^] | 253 | add_dependencies(builtins clang_rt.builtins-${arch}) |
Alexey Samsonov | a6b264b | 2014-02-14 09:20:33 +0000 | [diff] [blame] | 254 | endif() |
| 255 | endforeach() |
| 256 | endif() |
Alexey Samsonov | 63a4af7 | 2014-02-18 09:33:45 +0000 | [diff] [blame] | 257 | |
| 258 | add_dependencies(compiler-rt builtins) |