646 lines · plain
1add_subdirectory(generic)2if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_ARCHITECTURE})3 add_subdirectory(${LIBC_TARGET_ARCHITECTURE})4endif()5 6function(add_math_entrypoint_object name)7 # We prefer machine specific implementation if available. Hence we check8 # that first and return early if we are able to add an alias target for the9 # machine specific implementation.10 get_fq_target_name("${LIBC_TARGET_ARCHITECTURE}.${name}" fq_machine_specific_target_name)11 if(TARGET ${fq_machine_specific_target_name})12 add_entrypoint_object(13 ${name}14 ALIAS15 DEPENDS16 .${LIBC_TARGET_ARCHITECTURE}.${name}17 )18 return()19 endif()20 21 get_fq_target_name("generic.${name}" fq_generic_target_name)22 if(TARGET ${fq_generic_target_name})23 add_entrypoint_object(24 ${name}25 ALIAS26 DEPENDS27 .generic.${name}28 )29 return()30 endif()31 32 # Add a dummy entrypoint object for missing implementations. They will be skipped33 # anyway as there will be no entry for them in the target entrypoints list.34 add_entrypoint_object(35 ${name}36 SRCS37 dummy_srcs38 HDRS39 dummy_hdrs40 )41endfunction()42 43add_math_entrypoint_object(acos)44add_math_entrypoint_object(acosf)45add_math_entrypoint_object(acosf16)46 47add_math_entrypoint_object(acosh)48add_math_entrypoint_object(acoshf)49add_math_entrypoint_object(acoshf16)50 51add_math_entrypoint_object(acospif16)52 53add_math_entrypoint_object(asin)54add_math_entrypoint_object(asinf)55add_math_entrypoint_object(asinf16)56 57add_math_entrypoint_object(asinh)58add_math_entrypoint_object(asinhf)59add_math_entrypoint_object(asinhf16)60 61add_math_entrypoint_object(asinpif16)62 63add_math_entrypoint_object(atan)64add_math_entrypoint_object(atanf)65add_math_entrypoint_object(atanf16)66 67add_math_entrypoint_object(atan2)68add_math_entrypoint_object(atan2f)69add_math_entrypoint_object(atan2l)70add_math_entrypoint_object(atan2f128)71 72add_math_entrypoint_object(atanh)73add_math_entrypoint_object(atanhf)74add_math_entrypoint_object(atanhf16)75 76add_math_entrypoint_object(atanpif16)77 78add_math_entrypoint_object(canonicalize)79add_math_entrypoint_object(canonicalizef)80add_math_entrypoint_object(canonicalizel)81add_math_entrypoint_object(canonicalizef16)82add_math_entrypoint_object(canonicalizef128)83add_math_entrypoint_object(canonicalizebf16)84 85add_math_entrypoint_object(iscanonical)86add_math_entrypoint_object(iscanonicalf)87add_math_entrypoint_object(iscanonicall)88add_math_entrypoint_object(iscanonicalf16)89add_math_entrypoint_object(iscanonicalf128)90add_math_entrypoint_object(iscanonicalbf16)91 92add_math_entrypoint_object(cbrt)93add_math_entrypoint_object(cbrtf)94 95add_math_entrypoint_object(ceil)96add_math_entrypoint_object(ceilf)97add_math_entrypoint_object(ceill)98add_math_entrypoint_object(ceilf16)99add_math_entrypoint_object(ceilf128)100add_math_entrypoint_object(ceilbf16)101 102add_math_entrypoint_object(copysign)103add_math_entrypoint_object(copysignf)104add_math_entrypoint_object(copysignl)105add_math_entrypoint_object(copysignf16)106add_math_entrypoint_object(copysignf128)107add_math_entrypoint_object(copysignbf16)108 109add_math_entrypoint_object(cos)110add_math_entrypoint_object(cosf)111add_math_entrypoint_object(cosf16)112 113add_math_entrypoint_object(cosh)114add_math_entrypoint_object(coshf)115add_math_entrypoint_object(coshf16)116 117add_math_entrypoint_object(cospif)118add_math_entrypoint_object(cospif16)119 120add_math_entrypoint_object(daddl)121add_math_entrypoint_object(daddf128)122add_math_entrypoint_object(ddivl)123add_math_entrypoint_object(ddivf128)124add_math_entrypoint_object(dmull)125add_math_entrypoint_object(dmulf128)126 127add_math_entrypoint_object(dfmal)128add_math_entrypoint_object(dfmaf128)129 130add_math_entrypoint_object(dsqrtl)131add_math_entrypoint_object(dsqrtf128)132 133add_math_entrypoint_object(dsubl)134add_math_entrypoint_object(dsubf128)135 136add_math_entrypoint_object(erf)137add_math_entrypoint_object(erff)138 139add_math_entrypoint_object(exp)140add_math_entrypoint_object(expf)141add_math_entrypoint_object(expf16)142 143add_math_entrypoint_object(exp2)144add_math_entrypoint_object(exp2f)145add_math_entrypoint_object(exp2f16)146 147add_math_entrypoint_object(exp2m1f)148add_math_entrypoint_object(exp2m1f16)149 150add_math_entrypoint_object(exp10)151add_math_entrypoint_object(exp10f)152add_math_entrypoint_object(exp10f16)153 154add_math_entrypoint_object(exp10m1f)155add_math_entrypoint_object(exp10m1f16)156 157add_math_entrypoint_object(expm1)158add_math_entrypoint_object(expm1f)159add_math_entrypoint_object(expm1f16)160 161add_math_entrypoint_object(f16add)162add_math_entrypoint_object(f16addf)163add_math_entrypoint_object(f16addl)164add_math_entrypoint_object(f16addf128)165 166add_math_entrypoint_object(f16div)167add_math_entrypoint_object(f16divf)168add_math_entrypoint_object(f16divl)169add_math_entrypoint_object(f16divf128)170 171add_math_entrypoint_object(f16fma)172add_math_entrypoint_object(f16fmaf)173add_math_entrypoint_object(f16fmal)174add_math_entrypoint_object(f16fmaf128)175 176add_math_entrypoint_object(f16mul)177add_math_entrypoint_object(f16mulf)178add_math_entrypoint_object(f16mull)179add_math_entrypoint_object(f16mulf128)180 181add_math_entrypoint_object(f16sqrt)182add_math_entrypoint_object(f16sqrtf)183add_math_entrypoint_object(f16sqrtl)184add_math_entrypoint_object(f16sqrtf128)185 186add_math_entrypoint_object(fsqrt)187add_math_entrypoint_object(fsqrtl)188add_math_entrypoint_object(fsqrtf128)189 190add_math_entrypoint_object(f16sub)191add_math_entrypoint_object(f16subf)192add_math_entrypoint_object(f16subl)193add_math_entrypoint_object(f16subf128)194 195add_math_entrypoint_object(fabs)196add_math_entrypoint_object(fabsf)197add_math_entrypoint_object(fabsl)198add_math_entrypoint_object(fabsf16)199add_math_entrypoint_object(fabsf128)200add_math_entrypoint_object(fabsbf16)201 202add_math_entrypoint_object(fadd)203add_math_entrypoint_object(faddl)204add_math_entrypoint_object(faddf128)205 206add_math_entrypoint_object(fdim)207add_math_entrypoint_object(fdimf)208add_math_entrypoint_object(fdiml)209add_math_entrypoint_object(fdimf16)210add_math_entrypoint_object(fdimf128)211add_math_entrypoint_object(fdimbf16)212 213add_math_entrypoint_object(fdiv)214add_math_entrypoint_object(fdivl)215add_math_entrypoint_object(fdivf128)216 217add_math_entrypoint_object(ffma)218add_math_entrypoint_object(ffmal)219add_math_entrypoint_object(ffmaf128)220 221add_math_entrypoint_object(floor)222add_math_entrypoint_object(floorf)223add_math_entrypoint_object(floorl)224add_math_entrypoint_object(floorf16)225add_math_entrypoint_object(floorf128)226add_math_entrypoint_object(floorbf16)227 228add_math_entrypoint_object(fma)229add_math_entrypoint_object(fmaf)230add_math_entrypoint_object(fmaf16)231 232add_math_entrypoint_object(fmax)233add_math_entrypoint_object(fmaxf)234add_math_entrypoint_object(fmaxl)235add_math_entrypoint_object(fmaxf128)236add_math_entrypoint_object(fmaxf16)237add_math_entrypoint_object(fmaxbf16)238 239add_math_entrypoint_object(fmin)240add_math_entrypoint_object(fminf)241add_math_entrypoint_object(fminl)242add_math_entrypoint_object(fminf128)243add_math_entrypoint_object(fminf16)244add_math_entrypoint_object(fminbf16)245 246add_math_entrypoint_object(fmaximum)247add_math_entrypoint_object(fmaximumf)248add_math_entrypoint_object(fmaximuml)249add_math_entrypoint_object(fmaximumf16)250add_math_entrypoint_object(fmaximumf128)251add_math_entrypoint_object(fmaximumbf16)252 253add_math_entrypoint_object(fmaximum_num)254add_math_entrypoint_object(fmaximum_numf)255add_math_entrypoint_object(fmaximum_numl)256add_math_entrypoint_object(fmaximum_numf16)257add_math_entrypoint_object(fmaximum_numf128)258add_math_entrypoint_object(fmaximum_numbf16)259 260add_math_entrypoint_object(fmaximum_mag)261add_math_entrypoint_object(fmaximum_magf)262add_math_entrypoint_object(fmaximum_magl)263add_math_entrypoint_object(fmaximum_magf16)264add_math_entrypoint_object(fmaximum_magf128)265add_math_entrypoint_object(fmaximum_magbf16)266 267add_math_entrypoint_object(fmaximum_mag_num)268add_math_entrypoint_object(fmaximum_mag_numf)269add_math_entrypoint_object(fmaximum_mag_numl)270add_math_entrypoint_object(fmaximum_mag_numf16)271add_math_entrypoint_object(fmaximum_mag_numf128)272add_math_entrypoint_object(fmaximum_mag_numbf16)273 274add_math_entrypoint_object(fminimum)275add_math_entrypoint_object(fminimumf)276add_math_entrypoint_object(fminimuml)277add_math_entrypoint_object(fminimumf16)278add_math_entrypoint_object(fminimumf128)279add_math_entrypoint_object(fminimumbf16)280 281add_math_entrypoint_object(fminimum_num)282add_math_entrypoint_object(fminimum_numf)283add_math_entrypoint_object(fminimum_numl)284add_math_entrypoint_object(fminimum_numf16)285add_math_entrypoint_object(fminimum_numf128)286add_math_entrypoint_object(fminimum_numbf16)287 288add_math_entrypoint_object(fminimum_mag)289add_math_entrypoint_object(fminimum_magf)290add_math_entrypoint_object(fminimum_magl)291add_math_entrypoint_object(fminimum_magf16)292add_math_entrypoint_object(fminimum_magf128)293add_math_entrypoint_object(fminimum_magbf16)294 295add_math_entrypoint_object(fminimum_mag_num)296add_math_entrypoint_object(fminimum_mag_numf)297add_math_entrypoint_object(fminimum_mag_numl)298add_math_entrypoint_object(fminimum_mag_numf16)299add_math_entrypoint_object(fminimum_mag_numf128)300add_math_entrypoint_object(fminimum_mag_numbf16)301 302add_math_entrypoint_object(fmul)303add_math_entrypoint_object(fmull)304add_math_entrypoint_object(fmulf128)305 306add_math_entrypoint_object(fmod)307add_math_entrypoint_object(fmodf)308add_math_entrypoint_object(fmodl)309add_math_entrypoint_object(fmodf16)310add_math_entrypoint_object(fmodf128)311add_math_entrypoint_object(fmodbf16)312 313add_math_entrypoint_object(frexp)314add_math_entrypoint_object(frexpf)315add_math_entrypoint_object(frexpl)316add_math_entrypoint_object(frexpf16)317add_math_entrypoint_object(frexpf128)318add_math_entrypoint_object(frexpbf16)319 320add_math_entrypoint_object(fromfp)321add_math_entrypoint_object(fromfpf)322add_math_entrypoint_object(fromfpl)323add_math_entrypoint_object(fromfpf16)324add_math_entrypoint_object(fromfpf128)325add_math_entrypoint_object(fromfpbf16)326 327add_math_entrypoint_object(fromfpx)328add_math_entrypoint_object(fromfpxf)329add_math_entrypoint_object(fromfpxl)330add_math_entrypoint_object(fromfpxf16)331add_math_entrypoint_object(fromfpxf128)332add_math_entrypoint_object(fromfpxbf16)333 334add_math_entrypoint_object(fsub)335add_math_entrypoint_object(fsubl)336add_math_entrypoint_object(fsubf128)337 338add_math_entrypoint_object(getpayload)339add_math_entrypoint_object(getpayloadf)340add_math_entrypoint_object(getpayloadl)341add_math_entrypoint_object(getpayloadf16)342add_math_entrypoint_object(getpayloadf128)343add_math_entrypoint_object(getpayloadbf16)344 345add_math_entrypoint_object(hypot)346add_math_entrypoint_object(hypotf)347add_math_entrypoint_object(hypotf16)348 349add_math_entrypoint_object(ilogb)350add_math_entrypoint_object(ilogbf)351add_math_entrypoint_object(ilogbl)352add_math_entrypoint_object(ilogbf16)353add_math_entrypoint_object(ilogbf128)354add_math_entrypoint_object(ilogbbf16)355 356add_math_entrypoint_object(isnan)357add_math_entrypoint_object(isnanf)358add_math_entrypoint_object(isnanl)359 360add_math_entrypoint_object(issignaling)361add_math_entrypoint_object(issignalingf)362add_math_entrypoint_object(issignalingl)363add_math_entrypoint_object(issignalingf16)364add_math_entrypoint_object(issignalingf128)365add_math_entrypoint_object(issignalingbf16)366 367add_math_entrypoint_object(llogb)368add_math_entrypoint_object(llogbf)369add_math_entrypoint_object(llogbl)370add_math_entrypoint_object(llogbf16)371add_math_entrypoint_object(llogbf128)372add_math_entrypoint_object(llogbbf16)373 374add_math_entrypoint_object(ldexp)375add_math_entrypoint_object(ldexpf)376add_math_entrypoint_object(ldexpl)377add_math_entrypoint_object(ldexpf16)378add_math_entrypoint_object(ldexpf128)379add_math_entrypoint_object(ldexpbf16)380 381add_math_entrypoint_object(log10)382add_math_entrypoint_object(log10f)383add_math_entrypoint_object(log10f16)384 385add_math_entrypoint_object(log1p)386add_math_entrypoint_object(log1pf)387 388add_math_entrypoint_object(log2)389add_math_entrypoint_object(log2f)390add_math_entrypoint_object(log2f16)391 392add_math_entrypoint_object(log)393add_math_entrypoint_object(logf)394add_math_entrypoint_object(logf16)395add_math_entrypoint_object(log_bf16)396 397add_math_entrypoint_object(logb)398add_math_entrypoint_object(logbf)399add_math_entrypoint_object(logbl)400add_math_entrypoint_object(logbf16)401add_math_entrypoint_object(logbf128)402add_math_entrypoint_object(logbbf16)403 404add_math_entrypoint_object(llrint)405add_math_entrypoint_object(llrintf)406add_math_entrypoint_object(llrintl)407add_math_entrypoint_object(llrintf16)408add_math_entrypoint_object(llrintf128)409add_math_entrypoint_object(llrintbf16)410 411add_math_entrypoint_object(llround)412add_math_entrypoint_object(llroundf)413add_math_entrypoint_object(llroundl)414add_math_entrypoint_object(llroundf16)415add_math_entrypoint_object(llroundf128)416add_math_entrypoint_object(llroundbf16)417 418add_math_entrypoint_object(lrint)419add_math_entrypoint_object(lrintf)420add_math_entrypoint_object(lrintl)421add_math_entrypoint_object(lrintf16)422add_math_entrypoint_object(lrintf128)423add_math_entrypoint_object(lrintbf16)424 425add_math_entrypoint_object(lround)426add_math_entrypoint_object(lroundf)427add_math_entrypoint_object(lroundl)428add_math_entrypoint_object(lroundf16)429add_math_entrypoint_object(lroundf128)430add_math_entrypoint_object(lroundbf16)431 432add_math_entrypoint_object(modf)433add_math_entrypoint_object(modff)434add_math_entrypoint_object(modfl)435add_math_entrypoint_object(modff16)436add_math_entrypoint_object(modff128)437add_math_entrypoint_object(modfbf16)438 439add_math_entrypoint_object(nan)440add_math_entrypoint_object(nanf)441add_math_entrypoint_object(nanl)442add_math_entrypoint_object(nanf16)443add_math_entrypoint_object(nanf128)444add_math_entrypoint_object(nanbf16)445 446add_math_entrypoint_object(nearbyint)447add_math_entrypoint_object(nearbyintf)448add_math_entrypoint_object(nearbyintl)449add_math_entrypoint_object(nearbyintf16)450add_math_entrypoint_object(nearbyintf128)451add_math_entrypoint_object(nearbyintbf16)452 453add_math_entrypoint_object(nextafter)454add_math_entrypoint_object(nextafterf)455add_math_entrypoint_object(nextafterl)456add_math_entrypoint_object(nextafterf16)457add_math_entrypoint_object(nextafterf128)458add_math_entrypoint_object(nextafterbf16)459 460add_math_entrypoint_object(nexttoward)461add_math_entrypoint_object(nexttowardf)462add_math_entrypoint_object(nexttowardl)463add_math_entrypoint_object(nexttowardf16)464add_math_entrypoint_object(nexttowardbf16)465 466add_math_entrypoint_object(nextdown)467add_math_entrypoint_object(nextdownf)468add_math_entrypoint_object(nextdownl)469add_math_entrypoint_object(nextdownf16)470add_math_entrypoint_object(nextdownf128)471add_math_entrypoint_object(nextdownbf16)472 473add_math_entrypoint_object(nextup)474add_math_entrypoint_object(nextupf)475add_math_entrypoint_object(nextupl)476add_math_entrypoint_object(nextupf16)477add_math_entrypoint_object(nextupf128)478add_math_entrypoint_object(nextupbf16)479 480add_math_entrypoint_object(pow)481add_math_entrypoint_object(powf)482add_math_entrypoint_object(powi)483add_math_entrypoint_object(powif)484 485add_math_entrypoint_object(remainder)486add_math_entrypoint_object(remainderf)487add_math_entrypoint_object(remainderl)488add_math_entrypoint_object(remainderf16)489add_math_entrypoint_object(remainderf128)490add_math_entrypoint_object(remainderbf16)491 492add_math_entrypoint_object(remquo)493add_math_entrypoint_object(remquof)494add_math_entrypoint_object(remquol)495add_math_entrypoint_object(remquof16)496add_math_entrypoint_object(remquof128)497add_math_entrypoint_object(remquobf16)498 499add_math_entrypoint_object(rint)500add_math_entrypoint_object(rintf)501add_math_entrypoint_object(rintl)502add_math_entrypoint_object(rintf16)503add_math_entrypoint_object(rintf128)504add_math_entrypoint_object(rintbf16)505 506add_math_entrypoint_object(round)507add_math_entrypoint_object(roundf)508add_math_entrypoint_object(roundl)509add_math_entrypoint_object(roundf16)510add_math_entrypoint_object(roundf128)511add_math_entrypoint_object(roundbf16)512 513add_math_entrypoint_object(roundeven)514add_math_entrypoint_object(roundevenf)515add_math_entrypoint_object(roundevenl)516add_math_entrypoint_object(roundevenf16)517add_math_entrypoint_object(roundevenf128)518add_math_entrypoint_object(roundevenbf16)519 520add_math_entrypoint_object(rsqrtf)521add_math_entrypoint_object(rsqrtf16)522 523add_math_entrypoint_object(scalbln)524add_math_entrypoint_object(scalblnf)525add_math_entrypoint_object(scalblnl)526add_math_entrypoint_object(scalblnf16)527add_math_entrypoint_object(scalblnf128)528add_math_entrypoint_object(scalblnbf16)529 530add_math_entrypoint_object(scalbn)531add_math_entrypoint_object(scalbnf)532add_math_entrypoint_object(scalbnl)533add_math_entrypoint_object(scalbnf16)534add_math_entrypoint_object(scalbnf128)535add_math_entrypoint_object(scalbnbf16)536 537add_math_entrypoint_object(setpayload)538add_math_entrypoint_object(setpayloadf)539add_math_entrypoint_object(setpayloadl)540add_math_entrypoint_object(setpayloadf16)541add_math_entrypoint_object(setpayloadf128)542add_math_entrypoint_object(setpayloadbf16)543 544add_math_entrypoint_object(setpayloadsig)545add_math_entrypoint_object(setpayloadsigf)546add_math_entrypoint_object(setpayloadsigl)547add_math_entrypoint_object(setpayloadsigf16)548add_math_entrypoint_object(setpayloadsigf128)549add_math_entrypoint_object(setpayloadsigbf16)550 551add_math_entrypoint_object(sincos)552add_math_entrypoint_object(sincosf)553 554add_math_entrypoint_object(sin)555add_math_entrypoint_object(sinf)556add_math_entrypoint_object(sinf16)557add_math_entrypoint_object(sinpif)558add_math_entrypoint_object(sinpif16)559 560add_math_entrypoint_object(sinh)561add_math_entrypoint_object(sinhf)562add_math_entrypoint_object(sinhf16)563 564add_math_entrypoint_object(sqrt)565add_math_entrypoint_object(sqrtf)566add_math_entrypoint_object(sqrtl)567add_math_entrypoint_object(sqrtf16)568add_math_entrypoint_object(sqrtf128)569add_math_entrypoint_object(sqrtbf16)570 571add_math_entrypoint_object(tan)572add_math_entrypoint_object(tanf)573add_math_entrypoint_object(tanf16)574 575add_math_entrypoint_object(tanh)576add_math_entrypoint_object(tanhf)577add_math_entrypoint_object(tanhf16)578 579add_math_entrypoint_object(tanpif)580add_math_entrypoint_object(tanpif16)581 582add_math_entrypoint_object(tgamma)583add_math_entrypoint_object(tgammaf)584add_math_entrypoint_object(lgamma)585add_math_entrypoint_object(lgamma_r)586 587add_math_entrypoint_object(totalorder)588add_math_entrypoint_object(totalorderf)589add_math_entrypoint_object(totalorderl)590add_math_entrypoint_object(totalorderf16)591add_math_entrypoint_object(totalorderf128)592add_math_entrypoint_object(totalorderbf16)593 594add_math_entrypoint_object(totalordermag)595add_math_entrypoint_object(totalordermagf)596add_math_entrypoint_object(totalordermagl)597add_math_entrypoint_object(totalordermagf16)598add_math_entrypoint_object(totalordermagf128)599add_math_entrypoint_object(totalordermagbf16)600 601add_math_entrypoint_object(trunc)602add_math_entrypoint_object(truncf)603add_math_entrypoint_object(truncl)604add_math_entrypoint_object(truncf16)605add_math_entrypoint_object(truncf128)606add_math_entrypoint_object(truncbf16)607 608add_math_entrypoint_object(ufromfp)609add_math_entrypoint_object(ufromfpf)610add_math_entrypoint_object(ufromfpl)611add_math_entrypoint_object(ufromfpf16)612add_math_entrypoint_object(ufromfpf128)613add_math_entrypoint_object(ufromfpbf16)614 615add_math_entrypoint_object(ufromfpx)616add_math_entrypoint_object(ufromfpxf)617add_math_entrypoint_object(ufromfpxl)618add_math_entrypoint_object(ufromfpxf16)619add_math_entrypoint_object(ufromfpxf128)620add_math_entrypoint_object(ufromfpxbf16)621 622add_math_entrypoint_object(bf16add)623add_math_entrypoint_object(bf16addf)624add_math_entrypoint_object(bf16addl)625add_math_entrypoint_object(bf16addf128)626 627add_math_entrypoint_object(bf16div)628add_math_entrypoint_object(bf16divf)629add_math_entrypoint_object(bf16divl)630add_math_entrypoint_object(bf16divf128)631 632add_math_entrypoint_object(bf16fma)633add_math_entrypoint_object(bf16fmaf)634add_math_entrypoint_object(bf16fmal)635add_math_entrypoint_object(bf16fmaf128)636 637add_math_entrypoint_object(bf16mul)638add_math_entrypoint_object(bf16mulf)639add_math_entrypoint_object(bf16mull)640add_math_entrypoint_object(bf16mulf128)641 642add_math_entrypoint_object(bf16sub)643add_math_entrypoint_object(bf16subf)644add_math_entrypoint_object(bf16subl)645add_math_entrypoint_object(bf16subf128)646