Zonr Chang | 932648d | 2010-10-13 22:23:56 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2010, The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 17 | #ifdef USE_VFP_RUNTIME |
| 18 | # define DEF_GENERIC_OR_VFP_RUNTIME(func) DEF_VFP_RUNTIME(func) |
| 19 | # define DEF_LLVM_OR_VFP_RUNTIME(func) DEF_VFP_RUNTIME(func) |
| 20 | #else |
| 21 | # undef DEF_VFP_RUNTIME |
| 22 | # define DEF_VFP_RUNTIME(func) |
| 23 | # define DEF_GENERIC_OR_VFP_RUNTIME(func) DEF_GENERIC_RUNTIME(func) |
| 24 | # define DEF_LLVM_OR_VFP_RUNTIME(func) DEF_LLVM_RUNTIME(func) |
| 25 | #endif |
| 26 | |
| 27 | // Sorted |
| 28 | DEF_LLVM_RUNTIME(__absvdi2) |
| 29 | DEF_LLVM_RUNTIME(__absvsi2) |
| 30 | |
| 31 | DEF_GENERIC_OR_VFP_RUNTIME(__adddf3) |
| 32 | DEF_GENERIC_OR_VFP_RUNTIME(__addsf3) |
| 33 | |
| 34 | DEF_LLVM_RUNTIME(__addvdi3) |
| 35 | DEF_LLVM_RUNTIME(__addvsi3) |
Logan | 7583c13 | 2011-02-27 08:22:46 +0800 | [diff] [blame] | 36 | |
| 37 | #if defined(__arm__) |
| 38 | // ARM Runtime ABI: |
| 39 | // http://infocenter.arm.com/help/topic/com.arm.doc.ihi0043c/IHI0043C_rtabi.pdf |
| 40 | // See also: external/llvm/lib/Target/ARM/ARMISelLowering.cpp |
| 41 | |
| 42 | DEF_GENERIC_RUNTIME(__aeabi_d2f) |
| 43 | DEF_GENERIC_RUNTIME(__aeabi_d2iz) |
| 44 | DEF_GENERIC_RUNTIME(__aeabi_d2lz) |
| 45 | DEF_GENERIC_RUNTIME(__aeabi_d2uiz) |
| 46 | DEF_GENERIC_RUNTIME(__aeabi_d2ulz) |
| 47 | DEF_GENERIC_RUNTIME(__aeabi_dadd) |
| 48 | DEF_GENERIC_RUNTIME(__aeabi_dcmpeq) |
| 49 | DEF_GENERIC_RUNTIME(__aeabi_dcmpge) |
| 50 | DEF_GENERIC_RUNTIME(__aeabi_dcmpgt) |
| 51 | DEF_GENERIC_RUNTIME(__aeabi_dcmple) |
| 52 | DEF_GENERIC_RUNTIME(__aeabi_dcmplt) |
| 53 | DEF_GENERIC_RUNTIME(__aeabi_dcmpun) |
| 54 | DEF_GENERIC_RUNTIME(__aeabi_ddiv) |
| 55 | DEF_GENERIC_RUNTIME(__aeabi_dmul) |
| 56 | DEF_GENERIC_RUNTIME(__aeabi_dsub) |
| 57 | DEF_GENERIC_RUNTIME(__aeabi_f2d) |
| 58 | DEF_GENERIC_RUNTIME(__aeabi_f2iz) |
| 59 | DEF_GENERIC_RUNTIME(__aeabi_f2lz) |
Logan | a6f41a7 | 2011-02-27 15:24:00 +0800 | [diff] [blame] | 60 | DEF_GENERIC_RUNTIME(__aeabi_f2uiz) |
Logan | 7583c13 | 2011-02-27 08:22:46 +0800 | [diff] [blame] | 61 | DEF_GENERIC_RUNTIME(__aeabi_f2ulz) |
| 62 | DEF_GENERIC_RUNTIME(__aeabi_fadd) |
| 63 | DEF_GENERIC_RUNTIME(__aeabi_fcmpeq) |
| 64 | DEF_GENERIC_RUNTIME(__aeabi_fcmpge) |
| 65 | DEF_GENERIC_RUNTIME(__aeabi_fcmpgt) |
| 66 | DEF_GENERIC_RUNTIME(__aeabi_fcmple) |
| 67 | DEF_GENERIC_RUNTIME(__aeabi_fcmplt) |
| 68 | DEF_GENERIC_RUNTIME(__aeabi_fcmpun) |
| 69 | DEF_GENERIC_RUNTIME(__aeabi_fdiv) |
| 70 | DEF_GENERIC_RUNTIME(__aeabi_fmul) |
| 71 | DEF_GENERIC_RUNTIME(__aeabi_fsub) |
| 72 | DEF_GENERIC_RUNTIME(__aeabi_i2d) |
| 73 | DEF_GENERIC_RUNTIME(__aeabi_i2f) |
| 74 | DEF_GENERIC_RUNTIME(__aeabi_idiv) |
| 75 | DEF_GENERIC_RUNTIME(__aeabi_l2d) |
| 76 | DEF_GENERIC_RUNTIME(__aeabi_l2f) |
| 77 | DEF_GENERIC_RUNTIME(__aeabi_lasr) |
| 78 | DEF_GENERIC_RUNTIME(__aeabi_ldivmod) |
| 79 | DEF_GENERIC_RUNTIME(__aeabi_llsl) |
| 80 | DEF_GENERIC_RUNTIME(__aeabi_llsr) |
| 81 | DEF_GENERIC_RUNTIME(__aeabi_lmul) |
Shih-wei Liao | 2d4c5f6 | 2011-06-22 11:18:47 -0700 | [diff] [blame] | 82 | DEF_GENERIC_RUNTIME(__aeabi_memcpy) |
| 83 | DEF_GENERIC_RUNTIME(__aeabi_memmove) |
| 84 | DEF_GENERIC_RUNTIME(__aeabi_memset) |
Logan | 7583c13 | 2011-02-27 08:22:46 +0800 | [diff] [blame] | 85 | DEF_GENERIC_RUNTIME(__aeabi_ui2d) |
| 86 | DEF_GENERIC_RUNTIME(__aeabi_ui2f) |
| 87 | DEF_GENERIC_RUNTIME(__aeabi_uidiv) |
| 88 | DEF_GENERIC_RUNTIME(__aeabi_ul2d) |
| 89 | DEF_GENERIC_RUNTIME(__aeabi_ul2f) |
| 90 | DEF_GENERIC_RUNTIME(__aeabi_uldivmod) |
| 91 | #endif // defined(__arm__) |
| 92 | |
Kenny Root | 34678ab | 2011-02-07 10:56:27 -0800 | [diff] [blame] | 93 | #if !defined(__i386__) && !defined(__SSE2__) |
| 94 | DEF_LLVM_RUNTIME(__ashldi3) |
| 95 | #endif |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 96 | #ifndef ANDROID // has one in bionic |
| 97 | DEF_LLVM_RUNTIME(__ashrdi3) |
| 98 | #endif |
| 99 | |
| 100 | #ifdef USE_VFP_RUNTIME |
| 101 | // DEF_GENERIC_RUNTIME(__bswapdi2) |
| 102 | // DEF_GENERIC_RUNTIME(__bswapsi2) |
| 103 | #endif |
| 104 | |
| 105 | DEF_LLVM_RUNTIME(__clzdi2) |
| 106 | DEF_LLVM_RUNTIME(__clzsi2) |
| 107 | DEF_LLVM_RUNTIME(__cmpdi2) |
| 108 | DEF_LLVM_RUNTIME(__ctzdi2) |
| 109 | DEF_LLVM_RUNTIME(__ctzsi2) |
| 110 | |
| 111 | #ifndef ANDROID // no complex extension |
| 112 | DEF_LLVM_RUNTIME(__divdc3) |
| 113 | #endif |
| 114 | |
| 115 | DEF_GENERIC_OR_VFP_RUNTIME(__divdf3) |
| 116 | |
Kenny Root | 34678ab | 2011-02-07 10:56:27 -0800 | [diff] [blame] | 117 | #if !defined(__i386__) |
| 118 | DEF_LLVM_RUNTIME(__divdi3) |
| 119 | #endif |
Stephen Hines | 33f8af8 | 2011-06-23 16:47:59 -0700 | [diff] [blame] | 120 | DEF_LLVM_RUNTIME(__divsi3) |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 121 | |
| 122 | #ifndef ANDROID // no complex extension |
| 123 | DEF_LLVM_RUNTIME(__divsc3) |
| 124 | #endif |
| 125 | |
| 126 | DEF_GENERIC_OR_VFP_RUNTIME(__divsf3) |
| 127 | |
| 128 | DEF_LLVM_RUNTIME(__eprintf) |
| 129 | |
| 130 | DEF_GENERIC_OR_VFP_RUNTIME(__eqdf2) |
| 131 | DEF_GENERIC_OR_VFP_RUNTIME(__eqsf2) |
| 132 | DEF_GENERIC_OR_VFP_RUNTIME(__extendsfdf2) |
| 133 | |
| 134 | DEF_LLVM_RUNTIME(__ffsdi2) |
| 135 | DEF_LLVM_RUNTIME(__fixdfdi) |
| 136 | |
| 137 | DEF_GENERIC_OR_VFP_RUNTIME(__fixdfsi) |
| 138 | |
| 139 | DEF_LLVM_RUNTIME(__fixsfdi) |
| 140 | |
| 141 | DEF_GENERIC_OR_VFP_RUNTIME(__fixsfsi) |
| 142 | |
| 143 | DEF_LLVM_RUNTIME(__fixunsdfdi) |
| 144 | DEF_LLVM_OR_VFP_RUNTIME(__fixunsdfsi) |
| 145 | DEF_LLVM_RUNTIME(__fixunssfdi) |
| 146 | |
| 147 | DEF_LLVM_OR_VFP_RUNTIME(__fixunssfsi) |
| 148 | |
Kenny Root | 34678ab | 2011-02-07 10:56:27 -0800 | [diff] [blame] | 149 | #if !defined(__i386__) |
| 150 | DEF_LLVM_RUNTIME(__floatdidf) |
| 151 | DEF_LLVM_RUNTIME(__floatdisf) |
| 152 | #endif |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 153 | |
| 154 | DEF_GENERIC_OR_VFP_RUNTIME(__floatsidf) |
| 155 | DEF_GENERIC_OR_VFP_RUNTIME(__floatsisf) |
| 156 | |
Kenny Root | 34678ab | 2011-02-07 10:56:27 -0800 | [diff] [blame] | 157 | #if !defined(__i386__) |
| 158 | DEF_LLVM_RUNTIME(__floatundidf) |
| 159 | DEF_LLVM_RUNTIME(__floatundisf) |
| 160 | #endif |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 161 | |
| 162 | DEF_GENERIC_RUNTIME(__floatunsidf) |
| 163 | DEF_GENERIC_RUNTIME(__floatunsisf) |
| 164 | |
| 165 | DEF_VFP_RUNTIME(__floatunssidf) |
| 166 | DEF_VFP_RUNTIME(__floatunssisf) |
| 167 | |
| 168 | DEF_GENERIC_OR_VFP_RUNTIME(__gedf2) |
| 169 | DEF_GENERIC_OR_VFP_RUNTIME(__gesf2) |
| 170 | DEF_VFP_RUNTIME(__gtdf2) |
| 171 | DEF_VFP_RUNTIME(__gtsf2) |
| 172 | |
| 173 | DEF_GENERIC_OR_VFP_RUNTIME(__ledf2) |
| 174 | DEF_GENERIC_OR_VFP_RUNTIME(__lesf2) |
| 175 | |
Kenny Root | 34678ab | 2011-02-07 10:56:27 -0800 | [diff] [blame] | 176 | #if !defined(__i386__) && !defined(__SSE2__) |
| 177 | DEF_LLVM_RUNTIME(__lshrdi3) |
| 178 | #endif |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 179 | |
| 180 | DEF_VFP_RUNTIME(__ltdf2) |
| 181 | DEF_VFP_RUNTIME(__ltsf2) |
| 182 | |
Kenny Root | 34678ab | 2011-02-07 10:56:27 -0800 | [diff] [blame] | 183 | #if !defined(__i386__) |
| 184 | DEF_LLVM_RUNTIME(__moddi3) |
| 185 | #endif |
Stephen Hines | 33f8af8 | 2011-06-23 16:47:59 -0700 | [diff] [blame] | 186 | DEF_LLVM_RUNTIME(__modsi3) |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 187 | |
| 188 | #ifndef ANDROID // no complex extension |
| 189 | DEF_LLVM_RUNTIME(__muldc3) |
| 190 | #endif |
| 191 | |
| 192 | DEF_GENERIC_OR_VFP_RUNTIME(__muldf3) |
Kenny Root | 34678ab | 2011-02-07 10:56:27 -0800 | [diff] [blame] | 193 | #if !defined(__i386__) |
| 194 | DEF_LLVM_RUNTIME(__muldi3) |
Kenny Root | 34678ab | 2011-02-07 10:56:27 -0800 | [diff] [blame] | 195 | #endif |
Shih-wei Liao | 210eb40 | 2010-08-26 08:55:40 -0700 | [diff] [blame] | 196 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 197 | #ifndef ANDROID // no complex extension |
| 198 | DEF_LLVM_RUNTIME(__mulsc3) |
| 199 | #endif |
| 200 | |
| 201 | DEF_GENERIC_OR_VFP_RUNTIME(__mulsf3) |
| 202 | |
| 203 | DEF_LLVM_RUNTIME(__mulvdi3) |
| 204 | DEF_LLVM_RUNTIME(__mulvsi3) |
| 205 | |
| 206 | DEF_VFP_RUNTIME(__nedf2) |
| 207 | |
| 208 | DEF_GENERIC_OR_VFP_RUNTIME(__negdf2) |
| 209 | |
| 210 | DEF_LLVM_RUNTIME(__negdi2) |
| 211 | |
| 212 | DEF_GENERIC_OR_VFP_RUNTIME(__negsf2) |
| 213 | |
| 214 | DEF_LLVM_RUNTIME(__negvdi2) |
| 215 | DEF_LLVM_RUNTIME(__negvsi2) |
| 216 | |
| 217 | DEF_VFP_RUNTIME(__nesf2) |
| 218 | |
| 219 | DEF_LLVM_RUNTIME(__paritydi2) |
| 220 | DEF_LLVM_RUNTIME(__paritysi2) |
| 221 | DEF_LLVM_RUNTIME(__popcountdi2) |
| 222 | DEF_LLVM_RUNTIME(__popcountsi2) |
| 223 | DEF_LLVM_RUNTIME(__powidf2) |
| 224 | DEF_LLVM_RUNTIME(__powisf2) |
| 225 | |
| 226 | DEF_GENERIC_OR_VFP_RUNTIME(__subdf3) |
| 227 | DEF_GENERIC_OR_VFP_RUNTIME(__subsf3) |
| 228 | |
| 229 | DEF_LLVM_RUNTIME(__subvdi3) |
| 230 | DEF_LLVM_RUNTIME(__subvsi3) |
| 231 | |
| 232 | DEF_GENERIC_OR_VFP_RUNTIME(__truncdfsf2) |
| 233 | |
| 234 | DEF_LLVM_RUNTIME(__ucmpdi2) |
Kenny Root | 34678ab | 2011-02-07 10:56:27 -0800 | [diff] [blame] | 235 | #if !defined(__i386__) |
| 236 | DEF_LLVM_RUNTIME(__udivdi3) |
| 237 | #endif |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 238 | DEF_LLVM_RUNTIME(__udivmoddi4) |
Shih-wei Liao | 210eb40 | 2010-08-26 08:55:40 -0700 | [diff] [blame] | 239 | DEF_LLVM_RUNTIME(__udivsi3) |
Kenny Root | 34678ab | 2011-02-07 10:56:27 -0800 | [diff] [blame] | 240 | #if !defined(__i386__) |
| 241 | DEF_LLVM_RUNTIME(__umoddi3) |
| 242 | #endif |
Stephen Hines | 33f8af8 | 2011-06-23 16:47:59 -0700 | [diff] [blame] | 243 | DEF_LLVM_RUNTIME(__umodsi3) |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 244 | |
| 245 | DEF_GENERIC_OR_VFP_RUNTIME(__unorddf2) |
| 246 | DEF_GENERIC_OR_VFP_RUNTIME(__unordsf2) |
| 247 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 248 | #undef DEF_GENERIC_RUNTIME |
| 249 | #undef DEF_LLVM_RUNTIME |
| 250 | #undef DEF_VFP_RUNTIME |
Shih-wei Liao | abd1e3d | 2010-04-28 01:47:00 -0700 | [diff] [blame] | 251 | #undef DEF_BCC_RUNTIME |