├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── build.sh ├── build_flang_runtime.sh ├── build_fortran_sources.sh ├── build_llc.sh ├── flang.sh ├── gfortran ├── ios_flang_runtime ├── build │ └── Release-iphoneos │ │ └── ios_flang_runtime.framework │ │ ├── Headers │ │ └── ios_flang_runtime.h │ │ ├── Info.plist │ │ ├── Modules │ │ └── module.modulemap │ │ ├── _CodeSignature │ │ └── CodeResources │ │ └── ios_flang_runtime ├── ios_flang_runtime.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── ios_flang_runtime.xcscheme │ └── xcuserdata │ │ └── adrianlabbe.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ └── xcschememanagement.plist └── ios_flang_runtime │ ├── Info.plist │ ├── common │ ├── CMakeLists.txt │ ├── acos │ │ ├── CMakeLists.txt │ │ └── fma3 │ │ │ ├── CMakeLists.txt │ │ │ ├── acos_defs.h │ │ │ ├── dacos_defs.h │ │ │ ├── sdacos.cpp │ │ │ ├── ssacos.cpp │ │ │ ├── vdacos2.cpp │ │ │ ├── vdacos4.cpp │ │ │ ├── vdacos8.cpp │ │ │ ├── vsacos16.cpp │ │ │ ├── vsacos4.cpp │ │ │ └── vsacos8.cpp │ ├── acosd.c │ ├── amod.c │ ├── arm64intrin.h │ ├── asin │ │ ├── CMakeLists.txt │ │ └── fma3 │ │ │ ├── CMakeLists.txt │ │ │ ├── asin_defs.h │ │ │ ├── dasin_defs.h │ │ │ ├── sdasin.cpp │ │ │ ├── ssasin.cpp │ │ │ ├── vdasin2.cpp │ │ │ ├── vdasin4.cpp │ │ │ ├── vdasin8.cpp │ │ │ ├── vsasin16.cpp │ │ │ ├── vsasin4.cpp │ │ │ └── vsasin8.cpp │ ├── asind.c │ ├── atan │ │ ├── CMakeLists.txt │ │ ├── atan_d_vec.h │ │ ├── common.h │ │ ├── fd_atan_scalar.cpp │ │ └── fd_atan_vector.cpp │ ├── atan2 │ │ ├── CMakeLists.txt │ │ ├── atan2_d_vec.h │ │ ├── common.h │ │ ├── fd_atan2_scalar.cpp │ │ └── fd_atan2_vector.cpp │ ├── atan2d.c │ ├── atan2f │ │ ├── CMakeLists.txt │ │ ├── atan2_vec.h │ │ ├── common.h │ │ ├── fs_atan2_scalar.cpp │ │ └── fs_atan2_vector.cpp │ ├── atand.c │ ├── atanf │ │ ├── CMakeLists.txt │ │ ├── atan_vec.h │ │ ├── common.h │ │ ├── fs_atan_scalar.cpp │ │ └── fs_atan_vector.cpp │ ├── bessel_j0.c │ ├── bessel_j1.c │ ├── bessel_jn.c │ ├── bessel_y0.c │ ├── bessel_y1.c │ ├── bessel_yn.c │ ├── cabs.c │ ├── cacos.c │ ├── casin.c │ ├── catan.c │ ├── ccos.c │ ├── ccosh.c │ ├── cdabs.c │ ├── cdacos.c │ ├── cdasin.c │ ├── cdatan.c │ ├── cdcos.c │ ├── cdcosh.c │ ├── cddiv.c │ ├── cddivd.c │ ├── cdexp.c │ ├── cdiv.c │ ├── cdiv │ │ ├── gcdiv_128.c │ │ ├── gcdiv_256.c │ │ └── gcdiv_512.c │ ├── cdivr.c │ ├── cdlog.c │ ├── cdpowcd.c │ ├── cdpowi.c │ ├── cdpowk.c │ ├── cdsin.c │ ├── cdsinh.c │ ├── cdsqrt.c │ ├── cdtan.c │ ├── cdtanh.c │ ├── ceil.c │ ├── cexp.c │ ├── cexp │ │ ├── CMakeLists.txt │ │ ├── cexp.c │ │ ├── cis_d_common.h │ │ ├── exp_d_common.h │ │ ├── ldexp_d_common.h │ │ └── names.h │ ├── cexpf │ │ ├── CMakeLists.txt │ │ ├── cexpf.c │ │ ├── cis_common.h │ │ ├── common.h │ │ ├── exp_common.h │ │ ├── ldexp_common.h │ │ └── names.h │ ├── clog.c │ ├── cosd.c │ ├── cpowc.c │ ├── cpowi.c │ ├── cpowk.c │ ├── csin.c │ ├── csinh.c │ ├── csqrt.c │ ├── csqrt │ │ ├── gcsqrt_128.c │ │ ├── gcsqrt_256.c │ │ └── gcsqrt_512.c │ ├── ctan.c │ ├── ctanh.c │ ├── cvt.c │ ├── dacosd.c │ ├── dasind.c │ ├── datan2d.c │ ├── datand.c │ ├── dbessel_j0.c │ ├── dbessel_j1.c │ ├── dbessel_jn.c │ ├── dbessel_y0.c │ ├── dbessel_y1.c │ ├── dbessel_yn.c │ ├── dceil.c │ ├── dcosd.c │ ├── debug_prn.h │ ├── dfloor.c │ ├── dispatch.c │ ├── dmod.c │ ├── dpowi.c │ ├── dpowk.c │ ├── dsign.c │ ├── dsind.c │ ├── dtand.c │ ├── erf.c │ ├── erfc.c │ ├── erfc_scaled.c │ ├── erfc_scaledf.c │ ├── erfcf.c │ ├── erff.c │ ├── exp │ │ ├── CMakeLists.txt │ │ ├── fma3 │ │ │ ├── CMakeLists.txt │ │ │ ├── dexp_defs.h │ │ │ ├── exp_defs.h │ │ │ ├── sdexp.cpp │ │ │ ├── ssexp.cpp │ │ │ ├── vdexp2.cpp │ │ │ ├── vdexp4.cpp │ │ │ ├── vdexp8.cpp │ │ │ ├── vsexp16.cpp │ │ │ ├── vsexp4.cpp │ │ │ └── vsexp8.cpp │ │ ├── gdexp2.c │ │ └── gsexp4.c │ ├── floor.c │ ├── fltfenv.c │ ├── fltmanip.c │ ├── fpcvt.c │ ├── gamma.c │ ├── gammaf.c │ ├── helperavx2.h │ ├── helperavx2_128.h │ ├── helperavx512f.h │ ├── hypot.c │ ├── hypotf.c │ ├── i2powi.c │ ├── ipowi.c │ ├── kidnnt.c │ ├── kpowi.c │ ├── kpowk.c │ ├── log │ │ ├── CMakeLists.txt │ │ ├── common.h │ │ ├── fd_log_scalar.cpp │ │ ├── fd_log_vector.cpp │ │ ├── fma3 │ │ │ ├── CMakeLists.txt │ │ │ ├── fdlog1.cpp │ │ │ ├── fdlog2.cpp │ │ │ ├── fdlog4.cpp │ │ │ ├── fdlog8.cpp │ │ │ ├── fdlog_defs.h │ │ │ ├── fslog1.cpp │ │ │ ├── fslog16.cpp │ │ │ ├── fslog4.cpp │ │ │ ├── fslog8.cpp │ │ │ ├── fslog_defs.h │ │ │ ├── rslog1.cpp │ │ │ ├── rslog16.cpp │ │ │ ├── rslog4.cpp │ │ │ ├── rslog8.cpp │ │ │ └── rslog_defs.h │ │ ├── gdlog2.c │ │ ├── gslog4.c │ │ └── log_d_vec.h │ ├── log10 │ │ ├── CMakeLists.txt │ │ ├── common.h │ │ ├── fd_log10_scalar.cpp │ │ ├── fd_log10_vector.cpp │ │ └── log10_d_vec.h │ ├── log10f │ │ ├── CMakeLists.txt │ │ ├── common.h │ │ ├── fs_log10_16.cpp │ │ ├── fs_log10_4.cpp │ │ ├── fs_log10_8.cpp │ │ ├── fs_log10_scalar.cpp │ │ ├── fs_log10_scalar_legacy.cpp │ │ ├── fs_log10_vector_legacy.cpp │ │ └── log10_vec_legacy.h │ ├── log_gamma.c │ ├── log_gammaf.c │ ├── logf │ │ ├── CMakeLists.txt │ │ ├── common.h │ │ ├── fs_log_scalar.cpp │ │ ├── fs_log_vector.cpp │ │ └── log_vec.h │ ├── math_common.h │ ├── misc.h │ ├── mod.c │ ├── mth_128defs.c │ ├── mth_128defs_init.c │ ├── mth_128defs_stats.c │ ├── mth_128generic.c │ ├── mth_128mask.c │ ├── mth_256defs.c │ ├── mth_256defs_init.c │ ├── mth_256defs_stats.c │ ├── mth_256generic.c │ ├── mth_256mask.c │ ├── mth_512defs.c │ ├── mth_512defs_init.c │ ├── mth_512defs_stats.c │ ├── mth_512generic.c │ ├── mth_512mask.c │ ├── mth_avx512helper.h │ ├── mth_intrinsics.h │ ├── mth_tbldefs.h │ ├── mth_vreturns.c │ ├── mth_xintrinsics.c │ ├── mth_yintrinsics.c │ ├── mth_z2yy.h │ ├── mth_zintrinsics.c │ ├── mthdecls.h │ ├── p_dpowi.c │ ├── p_rpowi.c │ ├── pow │ │ ├── CMakeLists.txt │ │ ├── fma3 │ │ │ ├── CMakeLists.txt │ │ │ ├── dpow_defs.h │ │ │ ├── pow_defs.h │ │ │ ├── sdpow.cpp │ │ │ ├── sspow.cpp │ │ │ ├── vdpow2.cpp │ │ │ ├── vdpow4.cpp │ │ │ ├── vdpow8.cpp │ │ │ ├── vspow16.cpp │ │ │ ├── vspow4.cpp │ │ │ └── vspow8.cpp │ │ ├── gdpow2.c │ │ └── gspow4.c │ ├── powi │ │ ├── CMakeLists.txt │ │ ├── fxpowi.c │ │ ├── fxypowi.h │ │ ├── fypowi.c │ │ ├── gdpowi2.c │ │ ├── gspowi4.c │ │ ├── pxpowi.c │ │ ├── pypowi.c │ │ └── pzpowi.c │ ├── rpowi.c │ ├── rpowk.c │ ├── sign.c │ ├── sincos.c │ ├── sincos │ │ ├── CMakeLists.txt │ │ ├── fd_sincos_scalar.cpp │ │ ├── fd_sincos_vector.cpp │ │ ├── gsincos.c │ │ ├── gsincos.cpp │ │ └── sincos.h │ ├── sincosf.c │ ├── sincosf │ │ ├── CMakeLists.txt │ │ ├── fs_sincos_scalar.cpp │ │ ├── fs_sincos_vector.cpp │ │ └── sincosf.h │ ├── sind.c │ ├── sleef_common.h │ ├── tand.c │ ├── tanf │ │ ├── CMakeLists.txt │ │ ├── common_tanf.h │ │ ├── fs_tan_16_avx512.cpp │ │ ├── fs_tan_1_avx2.cpp │ │ ├── fs_tan_4_avx2.cpp │ │ ├── fs_tan_8_avx2.cpp │ │ └── tan_f_vec.h │ └── xmm2altivec.h │ ├── flang │ ├── CMakeLists.txt │ ├── abort3f.c │ ├── access3f.c │ ├── alarm3f.c │ ├── aligned.c │ ├── allo-i8.c │ ├── allo.c │ ├── assign.c │ ├── async.c │ ├── async.h │ ├── atol.c │ ├── backspace.c │ ├── bcopy.c │ ├── bcopys.c │ ├── besj03f.c │ ├── besj13f.c │ ├── besjn3f.c │ ├── besy03f.c │ ├── besy13f.c │ ├── besyn3f.c │ ├── buffer.c │ ├── chdir3f.c │ ├── chmod3f.c │ ├── chn1t1.c │ ├── chn1tn.c │ ├── chnbcst_loop.c │ ├── chnmerge.c │ ├── close.c │ ├── cnfg.c │ ├── cnfg.h │ ├── comm-i8.c │ ├── comm.c │ ├── commitqq3f.c │ ├── const.c │ ├── copy-i8.c │ ├── copy.c │ ├── cplxf.c │ ├── cprof.c │ ├── cprof.h │ ├── cprof2.c │ ├── csect.c │ ├── cshift.c │ ├── ctime3f.c │ ├── curdir.c │ ├── cvt.c │ ├── date3f.c │ ├── dattype.h │ ├── dbesj03f.c │ ├── dbesj13f.c │ ├── dbesjn3f.c │ ├── dbesy03f.c │ ├── dbesy13f.c │ ├── dbesyn3f.c │ ├── dbug.c │ ├── defs.c │ ├── delfilesqq3f.c │ ├── derf3f.c │ ├── derfc3f.c │ ├── desc.c │ ├── descFioUtil.c │ ├── descIntrins.c │ ├── descRW.c │ ├── descRW.h │ ├── directives.h │ ├── dist-i8.c │ ├── dist.c │ ├── drandm3f.c │ ├── dsecnds3f.c │ ├── dtime3f.c │ ├── dynam.c │ ├── enames.h │ ├── encodefmt.c │ ├── endfile.c │ ├── ent3f.h │ ├── entry.c │ ├── eoshift.c │ ├── erf3f.c │ ├── erfc3f.c │ ├── error.c │ ├── error.h │ ├── etime3f.c │ ├── exch.c │ ├── exit3f.c │ ├── f90alloc.h │ ├── fdate3f.c │ ├── feddesc.h │ ├── fgetc3f.c │ ├── fill.c │ ├── findfileqq3f.c │ ├── fioMacros.h │ ├── fioStructs.h │ ├── fio_fcb_flags.h │ ├── fiodf.c │ ├── flush.c │ ├── flush3f.c │ ├── fmtconv.c │ ├── fmtgetnum.c │ ├── fmtread.c │ ├── fmtwrite.c │ ├── fork3f.c │ ├── format-double.c │ ├── format-double.h │ ├── format.h │ ├── fortDt.h │ ├── fort_vars.h │ ├── fpcvt.c │ ├── fputc3f.c │ ├── free3f.c │ ├── fseek3f.c │ ├── fseek643f.c │ ├── fstat3f.c │ ├── fstat643f.c │ ├── fsync3f.c │ ├── ftell3f.c │ ├── ftell643f.c │ ├── ftn.c │ ├── ftn64.c │ ├── ftnbitsup.c │ ├── ftnbitsup.h │ ├── ftncharsup.c │ ├── ftnexit-i8.c │ ├── ftnexit.c │ ├── ftnhdr.F │ ├── ftni64.c │ ├── ftni64.h │ ├── ftni64bitsup.c │ ├── ftni64misc.c │ ├── ftnmiscsup.c │ ├── ftnmiscsup.h │ ├── ftnncharsup.c │ ├── fullpathqq3f.c │ ├── gather.c │ ├── gather_cmplx16.F95 │ ├── gather_cmplx8.F95 │ ├── gather_real4.F95 │ ├── gather_real8.F95 │ ├── gathscat.c │ ├── genlist.c │ ├── gerror3f.c │ ├── getarg.c │ ├── getarg3f.c │ ├── getc3f.c │ ├── getcwd3f.c │ ├── getdat3f.c │ ├── getdrivedirqq3f.c │ ├── getenv3f.c │ ├── getenvqq3f.c │ ├── getfd3f.c │ ├── getfileinfoqq3f.c │ ├── getfileinfoqqi83f.c │ ├── getgid3f.c │ ├── getlog3f.c │ ├── getpid3f.c │ ├── gettim3f.c │ ├── getuid3f.c │ ├── getvolinfo3f.c │ ├── global.h │ ├── gmtime3f.c │ ├── grad.c │ ├── hand.c │ ├── heapinit.c │ ├── hostnm3f.c │ ├── i1shft.c │ ├── idate3f.c │ ├── ieee_arithmetic.F95 │ ├── ieee_exceptions.F95 │ ├── ieee_features.F95 │ ├── ierrno3f.c │ ├── iishft.c │ ├── ileadz.c │ ├── ileadzi.c │ ├── init.c │ ├── initpar.c │ ├── inquire.c │ ├── intrin.c │ ├── io3f.h │ ├── ioinit3f.c │ ├── ipopcnt.c │ ├── ipopcnti.c │ ├── ipoppar.c │ ├── ipoppari.c │ ├── irand3f.c │ ├── irandm3f.c │ ├── isatty3f.c │ ├── isinfd3f.c │ ├── isinff3f.c │ ├── isnand3f.c │ ├── isnanf3f.c │ ├── iso_c_bind.F95 │ ├── iso_fortran_env.f90 │ ├── itime3f.c │ ├── itrailz.c │ ├── itrailzi.c │ ├── kabs.c │ ├── kanjidf.h │ ├── kidim.c │ ├── kill3f.c │ ├── kisign.c │ ├── kleadz.c │ ├── kmax.c │ ├── kmin.c │ ├── kpopcnt.c │ ├── kpoppar.c │ ├── ktrailz.c │ ├── ldread.c │ ├── ldwrite.c │ ├── link3f.c │ ├── linux_dummy.c │ ├── list_io.h │ ├── lnblnk3f.c │ ├── loc3f.c │ ├── long3f.c │ ├── lstat3f.c │ ├── lstat643f.c │ ├── ltime3f.c │ ├── malloc.c │ ├── malloc3f.c │ ├── map.c │ ├── matmul.h │ ├── mclock3f.c │ ├── merge.c │ ├── mget.c │ ├── misc.c │ ├── miscsup_com-i8.c │ ├── miscsup_com.c │ ├── mmcmplx16.c │ ├── mmcmplx8.c │ ├── mmreal4.c │ ├── mmreal8.c │ ├── mmul.c │ ├── mmul_cplx16contmxm.F95 │ ├── mmul_cplx16contmxv.F95 │ ├── mmul_cplx16contvxm.F95 │ ├── mmul_cplx16str1.F95 │ ├── mmul_cplx16str1_t.F95 │ ├── mmul_cplx8contmxm.F95 │ ├── mmul_cplx8contmxv.F95 │ ├── mmul_cplx8contvxm.F95 │ ├── mmul_cplx8str1.F95 │ ├── mmul_cplx8str1_t.F95 │ ├── mmul_dir.h │ ├── mmul_int1contmxm.F95 │ ├── mmul_int1contmxv.F95 │ ├── mmul_int1contvxm.F95 │ ├── mmul_int1str1.F95 │ ├── mmul_int2contmxm.F95 │ ├── mmul_int2contmxv.F95 │ ├── mmul_int2contvxm.F95 │ ├── mmul_int2str1.F95 │ ├── mmul_int4contmxm.F95 │ ├── mmul_int4contmxv.F95 │ ├── mmul_int4contvxm.F95 │ ├── mmul_int4str1.F95 │ ├── mmul_int8contmxm.F95 │ ├── mmul_int8contmxv.F95 │ ├── mmul_int8contvxm.F95 │ ├── mmul_int8str1.F95 │ ├── mmul_log1contmxm.F95 │ ├── mmul_log1contmxv.F95 │ ├── mmul_log1contvxm.F95 │ ├── mmul_log2contmxm.F95 │ ├── mmul_log2contmxv.F95 │ ├── mmul_log2contvxm.F95 │ ├── mmul_log4contmxm.F95 │ ├── mmul_log4contmxv.F95 │ ├── mmul_log4contvxm.F95 │ ├── mmul_log8contmxm.F95 │ ├── mmul_log8contmxv.F95 │ ├── mmul_log8contvxm.F95 │ ├── mmul_real4contmxm.F95 │ ├── mmul_real4contmxv.F95 │ ├── mmul_real4contvxm.F95 │ ├── mmul_real4str1.F95 │ ├── mmul_real4str1_t.F95 │ ├── mmul_real8contmxm.F95 │ ├── mmul_real8contmxv.F95 │ ├── mmul_real8contvxm.F95 │ ├── mmul_real8str1.F95 │ ├── mmul_real8str1_t.F95 │ ├── mmulcplx16.c │ ├── mmulcplx16_t.c │ ├── mmulcplx8.c │ ├── mmulcplx8_t.c │ ├── mmulint1.c │ ├── mmulint2.c │ ├── mmulint4.c │ ├── mmulint8.c │ ├── mmullog1.c │ ├── mmullog2.c │ ├── mmullog4.c │ ├── mmullog8.c │ ├── mmulreal4.c │ ├── mmulreal4_t.c │ ├── mmulreal8.c │ ├── mmulreal8_t.c │ ├── mnaxnb_cmplx16.F95 │ ├── mnaxnb_cmplx8.F95 │ ├── mnaxnb_real4.F95 │ ├── mnaxnb_real8.F95 │ ├── mnaxtb_cmplx16.F95 │ ├── mnaxtb_cmplx8.F95 │ ├── mnaxtb_real4.F95 │ ├── mnaxtb_real8.F95 │ ├── mpalloc.h │ ├── mptrace.h │ ├── mtaxnb_cmplx16.F95 │ ├── mtaxnb_cmplx8.F95 │ ├── mtaxnb_real4.F95 │ ├── mtaxnb_real8.F95 │ ├── mtaxtb_cmplx16.F95 │ ├── mtaxtb_cmplx8.F95 │ ├── mtaxtb_real4.F95 │ ├── mtaxtb_real8.F95 │ ├── mvbits3f.c │ ├── mvmul_cmplx16.F95 │ ├── mvmul_cmplx8.F95 │ ├── mvmul_real4.F95 │ ├── mvmul_real8.F95 │ ├── nargs3f.c │ ├── nml.h │ ├── nmlread.c │ ├── nmlutil.c │ ├── nmlwrite.c │ ├── norm2.F95 │ ├── norm2.h │ ├── olap.c │ ├── omp_lib.F95 │ ├── open.c │ ├── open_close.h │ ├── outstr3f.c │ ├── pack.c │ ├── packtimeqq3f.c │ ├── perror3f.c │ ├── pgf90_mmul_cmplx16.h │ ├── pgf90_mmul_cmplx8.h │ ├── pgf90_mmul_real4.h │ ├── pgf90_mmul_real8.h │ ├── ptr-i8.c │ ├── ptr.c │ ├── putc3f.c │ ├── putenv3f.c │ ├── pxffileno3f.c │ ├── qsort3f.c │ ├── query.c │ ├── rand3f.c │ ├── random3f.c │ ├── range3f.c │ ├── rdst-i8.c │ ├── rdst.c │ ├── red.c │ ├── red.h │ ├── red_all.c │ ├── red_any.c │ ├── red_count.c │ ├── red_findloc.c │ ├── red_iany.c │ ├── red_maxloc.c │ ├── red_maxval.c │ ├── red_minloc.c │ ├── red_minval.c │ ├── red_norm2.c │ ├── red_norm2_stride1.c │ ├── red_sum.c │ ├── reduct.c │ ├── rename3f.c │ ├── renamefileqq3f.c │ ├── reshape.c │ ├── rewind.c │ ├── rindex3f.c │ ├── rnum.c │ ├── rtc3f.c │ ├── runqq3f.c │ ├── rw.c │ ├── scal-i8.c │ ├── scal.c │ ├── scalar_copy.c │ ├── scatter.c │ ├── scatter.h │ ├── scatter_maxval.c │ ├── scatter_minval.c │ ├── secnds3f.c │ ├── setenvqq3f.c │ ├── setfileaccessqq3f.c │ ├── setfiletimeqq3f.c │ ├── setvbuf3f.c │ ├── short3f.c │ ├── signal3f.c │ ├── signalqq3f.c │ ├── sleep3f.c │ ├── sleepqq3f.c │ ├── spawn.h │ ├── splitpathqq3f.c │ ├── spread.c │ ├── srand3f.c │ ├── stat.c │ ├── stat3f.c │ ├── stat643f.c │ ├── stat_linux.c │ ├── stime3f.c │ ├── symlnk3f.c │ ├── system3f.c │ ├── systemqq3f.c │ ├── time3f.c │ ├── timeBlk.h │ ├── timef3f.c │ ├── times3f.c │ ├── trace.c │ ├── trace2.c │ ├── transfer.c │ ├── transpose_cmplx16.F95 │ ├── transpose_cmplx8.F95 │ ├── transpose_real4.F95 │ ├── transpose_real8.F95 │ ├── ttynam3f.c │ ├── type-i8.c │ ├── type.c │ ├── type.h │ ├── unf.c │ ├── unf.h │ ├── unlink3f.c │ ├── unpacktimeqq3f.c │ ├── usrio_smp.c │ ├── util-i8.c │ ├── util.c │ ├── utils.c │ ├── utils3f.c │ ├── utils3f.h │ ├── utilsi64.c │ ├── version.c │ ├── vmmul_cmplx16.F95 │ ├── vmmul_cmplx8.F95 │ ├── vmmul_real4.F95 │ ├── vmmul_real8.F95 │ ├── wait.c │ ├── wait3f.c │ ├── xfer.c │ ├── xfer_heap_dum.c │ └── xfer_rpm1.c │ ├── flangrti │ ├── CMakeLists.txt │ ├── aarch64-Linux │ │ └── dumpregs.c │ ├── bessel_tjn.c │ ├── bessel_tyn.c │ ├── dbessel_tjn.c │ ├── dbessel_tyn.c │ ├── dumpregs.h │ ├── f2cmain.c │ ├── idnint.c │ ├── ioargs.c │ ├── iostdinit.c │ ├── kidnnt.c │ ├── knint.c │ ├── ktrap.c │ ├── llcrit.c │ ├── mcopy1.c │ ├── mcopy2.c │ ├── mcopy4.c │ ├── mcopy8.c │ ├── memalign.c │ ├── mpmalloc.c │ ├── mset1.c │ ├── mset2.c │ ├── mset4.c │ ├── mset8.c │ ├── mthi64.c │ ├── mzero1.c │ ├── mzero2.c │ ├── mzero4.c │ ├── mzero8.c │ ├── nint.c │ ├── ppc64le-Linux │ │ └── dumpregs.c │ ├── s_erf.c │ ├── tempnam.c │ ├── trace.c │ ├── trace_lin.c │ └── x86_64-Linux │ │ ├── dumpregs.c │ │ ├── x86_daz.c │ │ └── x86_flushz.c │ ├── generic │ ├── CMakeLists.txt │ ├── abs.c │ ├── acos.c │ ├── acosh.c │ ├── aint.c │ ├── alog.c │ ├── alog10.c │ ├── anint.c │ ├── around.c │ ├── asin.c │ ├── asinh.c │ ├── atan.c │ ├── atan2.c │ ├── atanh.c │ ├── builtin.c │ ├── cos.c │ ├── cosh.c │ ├── dacos.c │ ├── dacosh.c │ ├── dasin.c │ ├── dasinh.c │ ├── datan.c │ ├── datan2.c │ ├── datanh.c │ ├── dblint64.h │ ├── dcos.c │ ├── dcosh.c │ ├── dexp.c │ ├── dint.c │ ├── dlog.c │ ├── dlog10.c │ ├── dnint.c │ ├── dpowd.c │ ├── dremainder.c │ ├── dround.c │ ├── dsin.c │ ├── dsinh.c │ ├── dsqrt.c │ ├── dtan.c │ ├── dtanh.c │ ├── exp.c │ ├── fabs.c │ ├── idnint.c │ ├── knint.c │ ├── log.c │ ├── log10.c │ ├── math_tables │ │ ├── CMakeLists.txt │ │ ├── mth_acosdefs.h │ │ ├── mth_aintdefs.h │ │ ├── mth_asindefs.h │ │ ├── mth_atan2defs.h │ │ ├── mth_atandefs.h │ │ ├── mth_ceildefs.h │ │ ├── mth_cosdefs.h │ │ ├── mth_coshdefs.h │ │ ├── mth_divdefs.h │ │ ├── mth_expdefs.h │ │ ├── mth_floordefs.h │ │ ├── mth_log10defs.h │ │ ├── mth_logdefs.h │ │ ├── mth_moddefs.h │ │ ├── mth_powdefs.h │ │ ├── mth_powidefs.h │ │ ├── mth_sincosdefs.h │ │ ├── mth_sindefs.h │ │ ├── mth_sinhdefs.h │ │ ├── mth_sqrtdefs.h │ │ ├── mth_tandefs.h │ │ └── mth_tanhdefs.h │ ├── mthi64.c │ ├── nint.c │ ├── remainder.c │ ├── round.c │ ├── rpowr.c │ ├── sin.c │ ├── sinh.c │ ├── sqrt.c │ ├── tan.c │ └── tanh.c │ ├── include │ ├── FuncArgMacros.h │ ├── dblint64.h │ ├── define.h │ ├── flang │ │ ├── ADT │ │ │ └── hash.h │ │ ├── ArgParser │ │ │ ├── arg_parser.h │ │ │ ├── debug_action.h │ │ │ └── xflag.h │ │ └── Error │ │ │ ├── errmsg-accel.n │ │ │ ├── errmsg-common.n │ │ │ ├── errmsg-hammer.n │ │ │ ├── errmsg-in.n │ │ │ ├── errmsg-ipa.n │ │ │ ├── errmsg.n │ │ │ └── pgerror.h │ ├── fp-folding.h │ ├── int128.h │ ├── komp.h │ ├── legacy-folding-api.h │ ├── legacy-ints.h │ ├── legacy-util-api.h │ ├── llcrit.h │ ├── memops.h │ ├── omp_lib.h │ ├── release.h │ ├── replaced-scutil.h │ ├── scutil.h │ ├── stdioInterf.h │ ├── tmp-mth_statsdefs.h │ └── universal.h │ ├── ios_flang_runtime.h │ ├── libtmglib │ ├── clagge.o │ ├── claghe.o │ ├── clagsy.o │ ├── clahilb.o │ ├── clakf2.o │ ├── clarge.o │ ├── clarnd.o │ ├── claror.o │ ├── clarot.o │ ├── clatm1.o │ ├── clatm2.o │ ├── clatm3.o │ ├── clatm5.o │ ├── clatm6.o │ ├── clatme.o │ ├── clatmr.o │ ├── clatms.o │ ├── clatmt.o │ ├── dlagge.o │ ├── dlagsy.o │ ├── dlahilb.o │ ├── dlakf2.o │ ├── dlaran.o │ ├── dlarge.o │ ├── dlarnd.o │ ├── dlaror.o │ ├── dlarot.o │ ├── dlatm1.o │ ├── dlatm2.o │ ├── dlatm3.o │ ├── dlatm5.o │ ├── dlatm6.o │ ├── dlatm7.o │ ├── dlatme.o │ ├── dlatmr.o │ ├── dlatms.o │ ├── dlatmt.o │ ├── slagge.o │ ├── slagsy.o │ ├── slahilb.o │ ├── slakf2.o │ ├── slaran.o │ ├── slarge.o │ ├── slarnd.o │ ├── slaror.o │ ├── slarot.o │ ├── slatm1.o │ ├── slatm2.o │ ├── slatm3.o │ ├── slatm5.o │ ├── slatm6.o │ ├── slatm7.o │ ├── slatme.o │ ├── slatmr.o │ ├── slatms.o │ ├── slatmt.o │ ├── zlagge.o │ ├── zlaghe.o │ ├── zlagsy.o │ ├── zlahilb.o │ ├── zlakf2.o │ ├── zlarge.o │ ├── zlarnd.o │ ├── zlaror.o │ ├── zlarot.o │ ├── zlatm1.o │ ├── zlatm2.o │ ├── zlatm3.o │ ├── zlatm5.o │ ├── zlatm6.o │ ├── zlatme.o │ ├── zlatmr.o │ ├── zlatms.o │ └── zlatmt.o │ └── ompstub │ ├── CMakeLists.txt │ ├── init_nomp.c │ └── ompstubs.c ├── setup-container.sh └── setup.sh /.gitignore: -------------------------------------------------------------------------------- 1 | llc 2 | deb/* 3 | flang/* 4 | *.o 5 | build/* 6 | flang.tgz 7 | .DS_Store 8 | ios_flang_runtime/ios_flang_runtime.xcodeproj/project.xcworkspace/xcuserdata/* 9 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "classic-flang-llvm-project"] 2 | path = classic-flang-llvm-project 3 | url = https://github.com/flang-compiler/classic-flang-llvm-project.git 4 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ./build_llc.sh 4 | ./setup.sh 5 | ./build_flang_runtime.sh 6 | 7 | -------------------------------------------------------------------------------- /build_flang_runtime.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ./build_fortran_sources.sh 4 | 5 | cd ios_flang_runtime 6 | xcodebuild -configuration Release ARCHS=arm64 ONLY_ACTIVE_ARCH=NO -scheme ios_flang_runtime -sdk iphoneos build SYMROOT=build 7 | 8 | mkdir -p ../build/share 9 | yes | cp -rf build/Release-iphoneos/* ../build/share 10 | -------------------------------------------------------------------------------- /build_fortran_sources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for f in $(find ios_flang_runtime -name "*.F*" -type f -exec grep -Iq . {} \; -print); do 4 | 5 | if ! [ -f $f.o ]; then 6 | build/bin/gfortran -DDESC_I8=1 -DPGFLANG=1 -arch arm64 -c $f -o $f.o 7 | fi 8 | 9 | done 10 | -------------------------------------------------------------------------------- /build_llc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd classic-flang-llvm-project 4 | mkdir -p build 5 | cd build 6 | 7 | if [ ! -e "LLVM.xcodeproj" ]; then 8 | cmake -G Xcode ../llvm 9 | fi 10 | 11 | BIN_PATH="Debug/bin/llc" 12 | 13 | if [ ! -e "$BIN_PATH" ]; then 14 | xcodebuild ONLY_ACTIVE_ARCH=NO -scheme llc -sdk macosx build SYMROOT=../../build_llc 15 | fi 16 | 17 | rm -rf ../../build_llc 18 | yes | cp -rf "$BIN_PATH" ../../build/bin 19 | -------------------------------------------------------------------------------- /flang.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 4 | 5 | NAME="flang" 6 | 7 | CONTAINER=ubuntu 8 | 9 | docker ps --format '{{.Names}}' | grep "flang" &> /dev/null 10 | 11 | if [ $? != 0 ]; then 12 | docker run -d --name "$NAME" -v "$DIR/../share:/root/host" -v /Users:/Users -v /var/folders:/var/folders -it $CONTAINER &> /dev/null 13 | fi 14 | 15 | docker exec -it flang /root/host/setup-container.sh $PWD $@ 16 | 17 | cp -rf inbox/* $PWD &> /dev/null 18 | rm -rf inbox/* &> /dev/null 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/build/Release-iphoneos/ios_flang_runtime.framework/Headers/ios_flang_runtime.h: -------------------------------------------------------------------------------- 1 | // 2 | // ios_flang_runtime.h 3 | // ios_flang_runtime 4 | // 5 | // Created by Emma Labbé on 30-11-20. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for ios_flang_runtime. 11 | FOUNDATION_EXPORT double ios_flang_runtimeVersionNumber; 12 | 13 | //! Project version string for ios_flang_runtime. 14 | FOUNDATION_EXPORT const unsigned char ios_flang_runtimeVersionString[]; 15 | 16 | // In this header, you should import all the public headers of your framework using statements like #import 17 | 18 | 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/build/Release-iphoneos/ios_flang_runtime.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/build/Release-iphoneos/ios_flang_runtime.framework/Info.plist -------------------------------------------------------------------------------- /ios_flang_runtime/build/Release-iphoneos/ios_flang_runtime.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module ios_flang_runtime { 2 | umbrella header "ios_flang_runtime.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /ios_flang_runtime/build/Release-iphoneos/ios_flang_runtime.framework/ios_flang_runtime: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/build/Release-iphoneos/ios_flang_runtime.framework/ios_flang_runtime -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime.xcodeproj/xcuserdata/adrianlabbe.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime.xcodeproj/xcuserdata/adrianlabbe.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ios_flang_runtime.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C9113B6A25754EFF005A3D15 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/acos/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | # See https://llvm.org/LICENSE.txt for license information. 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | # 6 | 7 | add_subdirectory("fma3") 8 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/acosd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_acosd(float f) 12 | { 13 | return (CNVRTRAD(acosf(f))); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/amod.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_amod(float f, float g) { 12 | return fmodf(f, g); 13 | } 14 | 15 | float __fmth_i_amod(float f, float g) { 16 | return __mth_i_amod(f, g); 17 | } 18 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/asin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | # See https://llvm.org/LICENSE.txt for license information. 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | # 6 | 7 | add_subdirectory("fma3") 8 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/asind.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_asind(float f) 12 | { 13 | return (CNVRTRAD(asinf(f))); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/atan2d.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_atan2d(float f, float g) 12 | { 13 | return (CNVRTRAD(atan2f(f, g))); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/atand.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_atand(float f) 12 | { 13 | return (CNVRTRAD(atanf(f))); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/bessel_j0.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | float 14 | __mth_i_bessel_j0(float arg) 15 | { 16 | float f = BESSEL_J0F(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/bessel_j1.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | float 14 | __mth_i_bessel_j1(float arg) 15 | { 16 | float f = BESSEL_J1F(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/bessel_jn.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | float 14 | __mth_i_bessel_jn(int n, float arg) 15 | { 16 | float f = BESSEL_JNF(n, arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/bessel_y0.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | #include 13 | 14 | float 15 | __mth_i_bessel_y0(float arg) 16 | { 17 | float f = BESSEL_Y0F(arg); 18 | return f; 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/bessel_y1.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | float 14 | __mth_i_bessel_y1(float arg) 15 | { 16 | float f = BESSEL_Y1F(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/bessel_yn.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | float 14 | __mth_i_bessel_yn(int n, float arg) 15 | { 16 | float f = BESSEL_YNF(n, arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cabs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | /* ------------------------------- complex functions: */ 11 | 12 | FLTFUNC_C(__mth_i_cabs) 13 | { 14 | CMPLXARGS_C; 15 | CRETURN_F(hypotf(real, imag)); 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cacos.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit float complexing point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | CMPLXFUNC_C(__mth_i_cacos) 14 | { 15 | CMPLXARGS_C; 16 | float_complex_t f; 17 | f = cacosf(carg); 18 | CRETURN_C(f); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/casin.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | CMPLXFUNC_C(__mth_i_casin) 14 | { 15 | CMPLXARGS_C; 16 | float_complex_t f; 17 | f = casinf(carg); 18 | CRETURN_C(f); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/catan.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | CMPLXFUNC_C(__mth_i_catan) 14 | { 15 | CMPLXARGS_C; 16 | float_complex_t f; 17 | f = catanf(carg); 18 | CRETURN_C(f); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/ccos.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | CMPLXFUNC_C(__mth_i_ccos) 11 | { 12 | CMPLXARGS_C; 13 | float x, y; 14 | /* 15 | x = COSF(real) * COSHF(imag); 16 | y = -SINF(real) * SINHF(imag); 17 | */ 18 | x = cosf(real); 19 | y = sinf(real); 20 | x = x * coshf(imag); 21 | y = -y * sinhf(imag); 22 | CRETURN_F_F(x, y); 23 | } 24 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/ccosh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit float complexing point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | CMPLXFUNC_C(__mth_i_ccosh) 14 | { 15 | CMPLXARGS_C; 16 | float_complex_t f; 17 | f = ccoshf(carg); 18 | CRETURN_C(f); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdabs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | /* ----------------------------- double complex functions: */ 11 | 12 | DBLFUNC_C(__mth_i_cdabs) 13 | { 14 | ZMPLXARGS_Z; 15 | ZRETURN_D(hypot(real, imag)); 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdacos.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | ZMPLXFUNC_Z(__mth_i_cdacos) 14 | { 15 | ZMPLXARGS_Z; 16 | double_complex_t d; 17 | d = cacos(zarg); 18 | ZRETURN_Z(d); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdasin.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | ZMPLXFUNC_Z(__mth_i_cdasin) 14 | { 15 | ZMPLXARGS_Z; 16 | double_complex_t d; 17 | d = casin(zarg); 18 | ZRETURN_Z(d); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdatan.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | ZMPLXFUNC_Z(__mth_i_cdatan) 14 | { 15 | ZMPLXARGS_Z; 16 | double_complex_t d; 17 | d = catan(zarg); 18 | ZRETURN_Z(d); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdcos.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | ZMPLXFUNC_Z(__mth_i_cdcos) 11 | { 12 | ZMPLXARGS_Z; 13 | double x, y; 14 | /* 15 | x = cos(real) * cosh(imag); 16 | y = -sin(real) * sinh(imag); 17 | */ 18 | // x = cos(real); 19 | // y = sin(real); 20 | __mth_dsincos(real, &y, &x); 21 | x = x * cosh(imag); 22 | y = -y * sinh(imag); 23 | ZRETURN_D_D(x, y); 24 | } 25 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdcosh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | ZMPLXFUNC_Z(__mth_i_cdcosh) 14 | { 15 | ZMPLXARGS_Z; 16 | double_complex_t d; 17 | d = ccosh(zarg); 18 | ZRETURN_Z(d); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cddivd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | ZMPLXFUNC_Z_D(__mth_i_cddivd) 11 | { 12 | ZMPLXARGS_Z_D; 13 | double x, y; 14 | 15 | x = real / d; 16 | y = imag / d; 17 | ZRETURN_D_D(x, y); 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdexp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | /* For X86-64 architectures, cdexp is defined in fastmath.s */ 11 | 12 | #if (! defined (TARGET_X8664) && ! defined(LINUX8664)) 13 | ZMPLXFUNC_Z(__mth_i_cdexp) 14 | { 15 | ZMPLXARGS_Z; 16 | double x, y, z; 17 | x = exp(real); 18 | __mth_dsincos(imag, &z, &y); 19 | y *= x; 20 | z *= x; 21 | ZRETURN_D_D(y, z); /* should leave y & z in appropriate 22 | * registers */ 23 | } 24 | #endif 25 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdiv/gcdiv_128.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | #include "mth_intrinsics.h" 8 | 9 | vcs1_t 10 | __gc_div_1(vcs1_t x, vcs1_t y) 11 | { 12 | return (__ZGVxN1vv__mth_i_vc4vc4(x, y, __mth_i_cdiv_c99)); 13 | } 14 | 15 | vcs2_t 16 | __gc_div_2(vcs2_t x, vcs2_t y) 17 | { 18 | return (__ZGVxN2vv__mth_i_vc4vc4(x, y, __mth_i_cdiv_c99)); 19 | } 20 | 21 | double complex 22 | __gz_div_1(double complex x, double complex y) 23 | { 24 | return (__mth_i_cddiv_c99(x, y)); 25 | } 26 | 27 | vcd1_t 28 | __gz_div_1v(vcd1_t x, vcd1_t y) 29 | { 30 | return (__ZGVxN1vv__mth_i_vc8vc8(x, y, __mth_i_cddiv_c99)); 31 | } 32 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdiv/gcdiv_256.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | #include "mth_intrinsics.h" 8 | 9 | vcs4_t 10 | __gc_div_4(vcs4_t x, vcs4_t y) 11 | { 12 | return (__ZGVyN4vv__mth_i_vc4vc4(x, y, __mth_i_cdiv_c99)); 13 | } 14 | 15 | vcd2_t 16 | __gz_div_2(vcd2_t x, vcd2_t y) 17 | { 18 | return (__ZGVyN2vv__mth_i_vc8vc8(x, y, __mth_i_cddiv_c99)); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdiv/gcdiv_512.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | #include "mth_intrinsics.h" 8 | 9 | vcs8_t 10 | __gc_div_8(vcs8_t x, vcs8_t y) 11 | { 12 | return (__ZGVzN8vv__mth_i_vc4vc4(x, y, __mth_i_cdiv_c99)); 13 | } 14 | 15 | vcd4_t 16 | __gz_div_4(vcd4_t x, vcd4_t y) 17 | { 18 | return (__ZGVzN4vv__mth_i_vc8vc8(x, y, __mth_i_cddiv_c99)); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdivr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | CMPLXFUNC_C_F(__mth_i_cdivr) 11 | { 12 | CMPLXARGS_C_F; 13 | float x, y; 14 | 15 | x = real / r; 16 | y = imag / r; 17 | CRETURN_F_F(x, y); 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdlog.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | ZMPLXFUNC_Z(__mth_i_cdlog) 11 | { 12 | ZMPLXARGS_Z; 13 | double x, y; 14 | /* 15 | call libm's atan2 may cause ieee_invalid & ieee_overflow to 16 | be set (f19305) 17 | x = atan2(imag, real); 18 | Call our version, which for x64, is in rte/pgc/hammer/src-amd/datan2.c 19 | */ 20 | x = __mth_i_datan2(imag, real); 21 | y = log(hypot(real, imag)); 22 | ZRETURN_D_D(y, x); 23 | } 24 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdpowcd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | ZMPLXFUNC_Z_Z(__mth_i_cdpowcd) 11 | { 12 | ZMPLXARGS_Z_Z; 13 | double logr, logi, x, y, z, w; 14 | 15 | logr = log(hypot(real1, imag1)); 16 | logi = atan2(imag1, real1); 17 | 18 | x = exp(logr * real2 - logi * imag2); 19 | y = logr * imag2 + logi * real2; 20 | 21 | z = x * cos(y); 22 | w = x * sin(y); 23 | ZRETURN_D_D(z, w); 24 | } 25 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdsin.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | ZMPLXFUNC_Z(__mth_i_cdsin) 11 | { 12 | ZMPLXARGS_Z; 13 | double x, y; 14 | /* 15 | x = sin(real) * cosh(imag); 16 | y = cos(real) * sinh(imag); 17 | */ 18 | x = sin(real); 19 | y = cos(real); 20 | x = x * cosh(imag); 21 | y = y * sinh(imag); 22 | ZRETURN_D_D(x, y); 23 | } 24 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdsinh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | ZMPLXFUNC_Z(__mth_i_cdsinh) 14 | { 15 | ZMPLXARGS_Z; 16 | double_complex_t d; 17 | d = csinh(zarg); 18 | ZRETURN_Z(d); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdsqrt.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | ZMPLXFUNC_Z(__mth_i_cdsqrt) 11 | { 12 | ZMPLXARGS_Z; 13 | double a, x, y; 14 | 15 | a = hypot(real, imag); 16 | if (a == 0) { 17 | x = 0; 18 | y = 0; 19 | } else if (real > 0) { 20 | x = sqrt(0.5 * (a + real)); 21 | y = 0.5 * (imag / x); 22 | } else { 23 | y = sqrt(0.5 * (a - real)); 24 | y = copysign(y,imag); 25 | x = 0.5 * (imag / y); 26 | } 27 | ZRETURN_D_D(x, y); 28 | } 29 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdtan.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | ZMPLXFUNC_Z(__mth_i_cdtan) 14 | { 15 | ZMPLXARGS_Z; 16 | double_complex_t d; 17 | d = ctan(zarg); 18 | ZRETURN_Z(d); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cdtanh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | ZMPLXFUNC_Z(__mth_i_cdtanh) 14 | { 15 | ZMPLXARGS_Z; 16 | double_complex_t d; 17 | d = ctanh(zarg); 18 | ZRETURN_Z(d); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/ceil.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | #if defined(__SSE4_1__) || defined(__AVX__) 10 | #include 11 | #endif 12 | 13 | float 14 | __mth_i_ceil(float x) 15 | { 16 | return ceilf(x); 17 | } 18 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cexp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | CMPLXFUNC_C(__mth_i_cexp) 11 | { 12 | CMPLXARGS_C; 13 | float x, y, z; 14 | x = expf(real); 15 | __mth_sincos(imag, &z, &y); 16 | y *= x; 17 | z *= x; 18 | CRETURN_F_F(y, z); /* should leave y & z in appropriate 19 | * registers */ 20 | } 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/clog.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | CMPLXFUNC_C(__mth_i_clog) 11 | { 12 | CMPLXARGS_C; 13 | float x, y; 14 | x = atan2f(imag, real); 15 | y = logf(hypotf(real, imag)); 16 | CRETURN_F_F(y, x); 17 | } 18 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cosd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_cosd(float f) 12 | { 13 | return cosf(CNVRTDEG(f)); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/cpowc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | CMPLXFUNC_C_C(__mth_i_cpowc) 11 | { 12 | CMPLXARGS_C_C; 13 | float logr, logi, x, y, z, w; 14 | 15 | logr = logf(hypotf(real1, imag1)); 16 | logi = atan2f(imag1, real1); 17 | 18 | x = expf(logr * real2 - logi * imag2); 19 | y = logr * imag2 + logi * real2; 20 | 21 | z = x * cosf(y); 22 | w = x * sinf(y); 23 | CRETURN_F_F(z, w); 24 | } 25 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/csin.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | CMPLXFUNC_C(__mth_i_csin) 11 | { 12 | CMPLXARGS_C; 13 | float x, y; 14 | /* 15 | x = SINF(real) * COSHF(imag); 16 | y = COSF(real) * SINHF(imag); 17 | */ 18 | x = sinf(real); 19 | y = cosf(real); 20 | x = x * coshf(imag); 21 | y = y * sinhf(imag); 22 | CRETURN_F_F(x, y); 23 | } 24 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/csinh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | CMPLXFUNC_C(__mth_i_csinh) 14 | { 15 | CMPLXARGS_C; 16 | float_complex_t f; 17 | f = csinhf(carg); 18 | CRETURN_C(f); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/csqrt.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | CMPLXFUNC_C(__mth_i_csqrt) 11 | { 12 | CMPLXARGS_C; 13 | float a, x, y; 14 | 15 | a = hypotf(real, imag); 16 | if (a == 0) { 17 | x = 0; 18 | y = 0; 19 | } else if (real > 0) { 20 | x = sqrtf(0.5f * (a + real)); 21 | y = 0.5 * (imag / x); 22 | } else { 23 | y = sqrtf(0.5f * (a - real)); 24 | y = copysignf(y,imag); 25 | x = 0.5f * (imag / y); 26 | } 27 | CRETURN_F_F(x, y); 28 | } 29 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/csqrt/gcsqrt_128.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | #include "mth_intrinsics.h" 8 | 9 | vcs1_t 10 | __gc_sqrt_1(vcs1_t x) 11 | { 12 | return (__ZGVxN1v__mth_i_vc4(x, csqrtf)); 13 | } 14 | 15 | vcs2_t 16 | __gc_sqrt_2(vcs2_t x) 17 | { 18 | return (__ZGVxN2v__mth_i_vc4(x, csqrtf)); 19 | } 20 | 21 | double complex 22 | __gz_sqrt_1(double complex x) 23 | { 24 | return (csqrt(x)); 25 | } 26 | 27 | vcd1_t 28 | __gz_sqrt_1v(vcd1_t x) 29 | { 30 | return (__ZGVxN1v__mth_i_vc8(x, csqrt)); 31 | } 32 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/csqrt/gcsqrt_256.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | #include "mth_intrinsics.h" 8 | 9 | vcs4_t 10 | __gc_sqrt_4(vcs4_t x) 11 | { 12 | return (__ZGVyN4v__mth_i_vc4(x, csqrtf)); 13 | } 14 | 15 | vcd2_t 16 | __gz_sqrt_2(vcd2_t x) 17 | { 18 | return (__ZGVyN2v__mth_i_vc8(x, csqrt)); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/csqrt/gcsqrt_512.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | #include "mth_intrinsics.h" 8 | 9 | vcs8_t 10 | __gc_sqrt_8(vcs8_t x) 11 | { 12 | return (__ZGVzN8v__mth_i_vc4(x, csqrtf)); 13 | } 14 | 15 | vcd4_t 16 | __gz_sqrt_4(vcd4_t x) 17 | { 18 | return (__ZGVzN4v__mth_i_vc8(x, csqrt)); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/ctan.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | CMPLXFUNC_C(__mth_i_ctan) 14 | { 15 | CMPLXARGS_C; 16 | float_complex_t f; 17 | f = ctanf(carg); 18 | CRETURN_C(f); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/ctanh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | CMPLXFUNC_C(__mth_i_ctanh) 14 | { 15 | CMPLXARGS_C; 16 | float_complex_t f; 17 | f = ctanhf(carg); 18 | CRETURN_C(f); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dacosd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dacosd(double d) 11 | { 12 | return (CNVRTRAD(acos(d))); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dasind.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dasind(double d) 11 | { 12 | return (CNVRTRAD(asin(d))); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/datan2d.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_datan2d(double x, double y) 11 | { 12 | return (CNVRTRAD(atan2(x, y))); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/datand.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_datand(double d) 11 | { 12 | return (CNVRTRAD(atan(d))); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dbessel_j0.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | double 14 | __mth_i_dbessel_j0(double arg) 15 | { 16 | double f = BESSEL_J0(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dbessel_j1.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | double 14 | __mth_i_dbessel_j1(double arg) 15 | { 16 | double f = BESSEL_J1(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dbessel_jn.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | double 14 | __mth_i_dbessel_jn(int n, double arg) 15 | { 16 | double f = BESSEL_JN(n, arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dbessel_y0.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | double 14 | __mth_i_dbessel_y0(double arg) 15 | { 16 | double f = BESSEL_Y0(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dbessel_y1.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | double 14 | __mth_i_dbessel_y1(double arg) 15 | { 16 | double f = BESSEL_Y1(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dbessel_yn.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | double 14 | __mth_i_dbessel_yn(int n, double arg) 15 | { 16 | double f = BESSEL_YN(n, arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dceil.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | #if defined(__SSE4_1__) || defined(__AVX__) 10 | #include 11 | #endif 12 | 13 | #if defined(__AVX__) 14 | double 15 | __mth_i_dceil_avx(double x) 16 | { 17 | return _mm_cvtsd_f64(_mm_ceil_sd(_mm_set1_pd(x), _mm_set1_pd(x))); 18 | } 19 | #elif defined(__SSE4_1__) 20 | double 21 | __mth_i_dceil_sse(double x) 22 | { 23 | return _mm_cvtsd_f64(_mm_ceil_sd(_mm_set1_pd(x), _mm_set1_pd(x))); 24 | } 25 | #else 26 | double 27 | __mth_i_dceil(double x) 28 | { 29 | return ceil(x); 30 | } 31 | #endif 32 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dcosd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dcosd(double d) 11 | { 12 | return (cos(CNVRTDEG(d))); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dfloor.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | #if defined(__SSE4_1__) || defined(__AVX__) 10 | #include 11 | #endif 12 | 13 | #if defined(__AVX__) 14 | double 15 | __mth_i_dfloor_avx(double x) 16 | { 17 | return _mm_cvtsd_f64(_mm_floor_sd(_mm_set1_pd(x), _mm_set1_pd(x))); 18 | } 19 | #elif defined(__SSE4_1__) 20 | double 21 | __mth_i_dfloor_sse(double x) 22 | { 23 | return _mm_cvtsd_f64(_mm_floor_sd(_mm_set1_pd(x), _mm_set1_pd(x))); 24 | } 25 | #else 26 | double 27 | __mth_i_dfloor(double x) 28 | { 29 | return floor(x); 30 | } 31 | #endif 32 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dmod.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | double __mth_i_dmod(double f, double g) { 11 | return fmod(f, g); 12 | } 13 | 14 | double __fmth_i_dmod(double f, double g) { 15 | return __mth_i_dmod(f, g); 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dpowi.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | double 11 | __mth_i_dpowi(double x, int i) 12 | { 13 | int k; 14 | double f; 15 | 16 | f = 1; 17 | k = i; 18 | if (k < 0) 19 | k = -k; 20 | for (;;) { 21 | if (k & 1) 22 | f *= x; 23 | k = (unsigned)k >> 1; 24 | if (k == 0) 25 | break; 26 | x *= x; 27 | } 28 | if (i < 0) 29 | f = 1.0 / f; 30 | return f; 31 | } 32 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dpowk.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | double 11 | __mth_i_dpowk(double x, long long i) 12 | { 13 | long long k; 14 | double f; 15 | 16 | f = 1; 17 | k = i; 18 | if (k < 0) 19 | k = -k; 20 | for (;;) { 21 | if (k & 1) 22 | f *= x; 23 | k >>= 1; 24 | if (k == 0) 25 | break; 26 | x *= x; 27 | } 28 | if (i < 0) 29 | f = 1.0 / f; 30 | return f; 31 | } 32 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dsign.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include 9 | 10 | /* Assume little endian for now */ 11 | #define BITSDH(f) ((int *)&f)[1] 12 | #define BITSDL(f) ((int *)&f)[0] 13 | #define BSIGNF 0x80000000 14 | 15 | double 16 | __mth_i_dsign(double a, double b) 17 | { 18 | double r; 19 | r = fabs(a); 20 | if (BITSDH(b) & BSIGNF) { 21 | /*r = -fabs(a);*/ 22 | BITSDH(r) = BITSDH(r) | BSIGNF; 23 | } 24 | return r; 25 | } 26 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dsind.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dsind(double d) 11 | { 12 | return (sin(CNVRTDEG(d))); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/dtand.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dtand(double d) 11 | { 12 | return (tan(CNVRTDEG(d))); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/erf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | extern double erf(double); 14 | double 15 | __mth_i_derf(double arg) 16 | { 17 | double f = erf(arg); 18 | return f; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/erfc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | double 14 | __mth_i_derfc(double arg) 15 | { 16 | double f = erfc(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/erfcf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | float 14 | __mth_i_erfc(float arg) 15 | { 16 | float f = erfcf(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/erff.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | extern float erff(float); 14 | float 15 | __mth_i_erf(float arg) 16 | { 17 | float f = erff(arg); 18 | return f; 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/exp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | # See https://llvm.org/LICENSE.txt for license information. 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | # 6 | 7 | add_subdirectory("fma3") 8 | 9 | # Set compiler flags and definitions 10 | get_property(DEFINITIONS GLOBAL PROPERTY "DEFINITIONS_L1") 11 | get_property(FLAGS GLOBAL PROPERTY "FLAGS_L1") 12 | 13 | set(SRCS) 14 | if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "aarch64") 15 | set(SRCS gsexp4.c gdexp2.c) 16 | libmath_add_object_library("${SRCS}" "${FLAGS}" "${DEFINITIONS}" "") 17 | endif() 18 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/exp/gdexp2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mth_intrinsics.h" 9 | 10 | #if defined(TARGET_LINUX_ARM64) 11 | vrd2_t 12 | __gd_exp_2(vrd2_t x) 13 | { 14 | return (__ZGVxN2v__mth_i_vr8(x, __mth_i_dexp)); 15 | } 16 | 17 | vrd2_t 18 | __gd_exp_2m(vrd2_t x, vid2_t mask) 19 | { 20 | return (__ZGVxM2v__mth_i_vr8(x, mask, __mth_i_dexp)); 21 | } 22 | 23 | double complex 24 | __gz_exp_1(double complex x) 25 | { 26 | return (cexp(x)); 27 | } 28 | 29 | vcd1_t 30 | __gz_exp_1v(vcd1_t x) 31 | { 32 | return (__ZGVxN1v__mth_i_vc8(x, cexp)); 33 | } 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/exp/gsexp4.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mth_intrinsics.h" 9 | 10 | #if defined(TARGET_LINUX_ARM64) 11 | vrs4_t 12 | __gs_exp_4(vrs4_t x) 13 | { 14 | return (__ZGVxN4v__mth_i_vr4(x, __mth_i_exp)); 15 | } 16 | 17 | vrs4_t 18 | __gs_exp_4m(vrs4_t x, vis4_t mask) 19 | { 20 | return (__ZGVxM4v__mth_i_vr4(x, mask, __mth_i_exp)); 21 | } 22 | 23 | vcs1_t 24 | __gc_exp_1(vcs1_t x) 25 | { 26 | return (__ZGVxN1v__mth_i_vc4(x, cexpf)); 27 | } 28 | 29 | vcs2_t 30 | __gc_exp_2(vcs2_t x) 31 | { 32 | return (__ZGVxN2v__mth_i_vc4(x, cexpf)); 33 | } 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/floor.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | #if defined(__SSE4_1__) || defined(__AVX__) 10 | #include 11 | #endif 12 | 13 | #if defined(__AVX__) 14 | float 15 | __mth_i_floor_avx(float x) 16 | { 17 | return _mm_cvtss_f32(_mm_floor_ss(_mm_set1_ps(x), _mm_set1_ps(x))); 18 | } 19 | #elif defined(__SSE4_1__) 20 | float 21 | __mth_i_floor_sse(float x) 22 | { 23 | return _mm_cvtss_f32(_mm_floor_ss(_mm_set1_ps(x), _mm_set1_ps(x))); 24 | } 25 | #else 26 | float 27 | __mth_i_floor(float x) 28 | { 29 | return floorf(x); 30 | } 31 | #endif 32 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/gamma.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | double 14 | __mth_i_dgamma(double arg) 15 | { 16 | double f = tgamma(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/gammaf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | float 14 | __mth_i_gamma(float arg) 15 | { 16 | float f = tgammaf(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/hypot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | double 14 | __mth_i_dhypot(double x, double y) 15 | { 16 | double f = hypot(x, y); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/hypotf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | float 14 | __mth_i_hypot(float x, float y) 15 | { 16 | float f = hypotf(x, y); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/i2powi.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | int 11 | __mth_i_i2powi(int i) 12 | { 13 | if (i >= 0) 14 | return 1 << i; 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/kidnnt.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include 9 | 10 | int64_t 11 | __mth_i_kidnnt(double d) 12 | { 13 | if (d > 0) 14 | return ((d < 4503599627370496.0) ? (int64_t)(d + 0.5) : (int64_t)(d)); 15 | else 16 | return ((d > -4503599627370496.0) ? (int64_t)(d - 0.5) : (int64_t)(d)); 17 | } 18 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/kpowi.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | long long 11 | __mth_i_kpowi(long long x, int i) 12 | { 13 | int k; 14 | long long f; 15 | 16 | f = 1; 17 | k = i; 18 | if (k < 0) 19 | k = -k; 20 | for (;;) { 21 | if (k & 1) 22 | f *= x; 23 | k = (unsigned)k >> 1; 24 | if (k == 0) 25 | break; 26 | x *= x; 27 | } 28 | if (i < 0) 29 | f = 1.0f / f; 30 | return f; 31 | } 32 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/kpowk.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | long long 11 | __mth_i_kpowk(long long x, long long i) 12 | { 13 | int k; 14 | long long f; 15 | f = 1; 16 | k = i; 17 | if (k < 0) 18 | k = -k; 19 | for (;;) { 20 | if (k & 1) 21 | f *= x; 22 | k >>= 1; 23 | if (k == 0) 24 | break; 25 | x *= x; 26 | } 27 | if (i < 0) 28 | f = 1.0f / f; 29 | return f; 30 | } 31 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/log/gslog4.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mth_intrinsics.h" 9 | 10 | #if defined(TARGET_LINUX_ARM64) 11 | vrs4_t 12 | __gs_log_4(vrs4_t x) 13 | { 14 | return (__ZGVxN4v__mth_i_vr4(x, __mth_i_alog)); 15 | } 16 | 17 | vrs4_t 18 | __gs_log_4m(vrs4_t x, vis4_t mask) 19 | { 20 | return (__ZGVxM4v__mth_i_vr4(x, mask, __mth_i_alog)); 21 | } 22 | 23 | vcs1_t 24 | __gc_log_1(vcs1_t x) 25 | { 26 | return (__ZGVxN1v__mth_i_vc4(x, clogf)); 27 | } 28 | 29 | vcs2_t 30 | __gc_log_2(vcs2_t x) 31 | { 32 | return (__ZGVxN2v__mth_i_vc4(x, clogf)); 33 | } 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/log_gamma.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | double 14 | __mth_i_dlog_gamma(double arg) 15 | { 16 | double f = lgamma(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/log_gammaf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | float 14 | __mth_i_log_gamma(float arg) 15 | { 16 | float f = lgammaf(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/mod.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | int 11 | __mth_i_mod(int i, int j) 12 | { 13 | return i % j; 14 | } /* ??? */ 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/pow/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | # See https://llvm.org/LICENSE.txt for license information. 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | # 6 | 7 | add_subdirectory("fma3") 8 | 9 | # Set compiler flags and definitions 10 | get_property(DEFINITIONS GLOBAL PROPERTY "DEFINITIONS_L1") 11 | get_property(FLAGS GLOBAL PROPERTY "FLAGS_L1") 12 | 13 | set(SRCS) 14 | 15 | if(${LIBPGMATH_SYSTEM_PROCESSOR} MATCHES "aarch64") 16 | set(SRCS gspow4.c gdpow2.c) 17 | libmath_add_object_library("${SRCS}" "${FLAGS}" "${DEFINITIONS}" "") 18 | endif() 19 | 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/powi/fxpowi.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mth_intrinsics.h" 9 | #include 10 | #include 11 | #include 12 | 13 | #include "fxypowi.h" 14 | 15 | powk1m(x, s, 4) 16 | powk1m(x, d, 2) 17 | powk1(x, s, 4) 18 | powk1(x, d, 2) 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/powi/fypowi.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mth_intrinsics.h" 9 | #include 10 | #include 11 | #include 12 | 13 | #include "fxypowi.h" 14 | 15 | powk1m(y, s, 8) 16 | powk1m(y, d, 4) 17 | powk1(y, s, 8) 18 | powk1(y, d, 4) 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/rpowi.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | /* should handle 0**0 w/ exception */ 11 | float 12 | __mth_i_rpowi(float x, int i) 13 | { 14 | int k; 15 | float f; 16 | 17 | f = 1; 18 | k = i; 19 | if (k < 0) 20 | k = -k; 21 | for (;;) { 22 | if (k & 1) 23 | f *= x; 24 | k = (unsigned)k >> 1; 25 | if (k == 0) 26 | break; 27 | x *= x; 28 | } 29 | if (i < 0) 30 | f = 1.0f / f; 31 | return f; 32 | } 33 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/rpowk.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | /* should handle 0**0 w/ exception */ 11 | float 12 | __mth_i_rpowk(float x, long long i) 13 | { 14 | long long k; 15 | float f; 16 | 17 | f = 1; 18 | k = i; 19 | if (k < 0) 20 | k = -k; 21 | for (;;) { 22 | if (k & 1) 23 | f *= x; 24 | k >>= 1; 25 | if (k == 0) 26 | break; 27 | x *= x; 28 | } 29 | if (i < 0) 30 | f = 1.0f / f; 31 | return f; 32 | } 33 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/sign.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include 9 | 10 | #define BITSF(f) ((int *)&f)[0] 11 | #define BSIGNF 0x80000000 12 | 13 | float 14 | __mth_i_sign(float a, float b) 15 | { 16 | float r; 17 | r = fabsf(a); 18 | if (BITSF(b) & BSIGNF) { 19 | /*r = -fabsf(a);*/ 20 | BITSF(r) = BITSF(r) | BSIGNF; 21 | } 22 | return r; 23 | } 24 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/sincos.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | /* 11 | * Generic implementation of intrinsic sincos. 12 | * 13 | * Compiler expects two return values, thus using the complex type to implement 14 | * the return sequence. 15 | */ 16 | 17 | double_complex_t __mth_i_dsincos(double a) 18 | { 19 | double s, c; 20 | __mth_dsincos(a, &s, &c); 21 | double_complex_t r = PGMATH_CMPLX_CONST(s, c); 22 | return r; 23 | } 24 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/sincosf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #ifdef TARGET_X8664 9 | #error Single precision - generic sincos() will not work on X86-64 systems. 10 | #endif 11 | 12 | #include "mthdecls.h" 13 | 14 | /* 15 | * Generic implementation of intrinsic sincos. 16 | * 17 | * Compiler expects two return values, thus using the complex type to implement 18 | * the return sequence. 19 | */ 20 | 21 | float_complex_t __mth_i_sincos(float a) 22 | { 23 | float s, c; 24 | __mth_sincos(a, &s, &c); 25 | float_complex_t r = PGMATH_CMPLX_CONST(s, c); 26 | return r; 27 | } 28 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/sind.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_sind(float f) 12 | { 13 | return sinf(CNVRTDEG(f)); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/tand.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_tand(float f) 12 | { 13 | return tanf(CNVRTDEG(f)); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/tanf/fs_tan_4_avx2.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | * See https://llvm.org/LICENSE.txt for license information. 5 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | * 7 | */ 8 | 9 | 10 | #ifndef __TAN_F_AVX2_128_H__ 11 | #define __TAN_F_AVX2_128_H__ 12 | 13 | #include 14 | #include "common_tanf.h" 15 | #define CONFIG 1 16 | #include "helperavx2_128.h" 17 | #include "tan_f_vec.h" 18 | 19 | extern "C" vfloat __attribute__ ((noinline)) __fs_tan_4_avx2(vfloat const a); 20 | 21 | vfloat __attribute__ ((noinline)) 22 | __fs_tan_4_avx2(vfloat const a) 23 | { 24 | return __tan_f_vec(a); 25 | } 26 | 27 | #endif // __TAN_F_AVX2_128_H__ 28 | 29 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/common/tanf/fs_tan_8_avx2.cpp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 | * See https://llvm.org/LICENSE.txt for license information. 5 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 | * 7 | */ 8 | 9 | 10 | #ifndef __TAN_F_AVX2_H__ 11 | #define __TAN_F_AVX2_H__ 12 | 13 | #include 14 | #include "common_tanf.h" 15 | #define CONFIG 1 16 | #include "helperavx2.h" 17 | #include "tan_f_vec.h" 18 | 19 | extern "C" vfloat __attribute__ ((noinline)) __fs_tan_8_avx2(vfloat const a); 20 | 21 | vfloat __attribute__ ((noinline)) 22 | __fs_tan_8_avx2(vfloat const a) 23 | { 24 | return __tan_f_vec(a); 25 | } 26 | 27 | #endif // __TAN_F_AVX2_H__ 28 | 29 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/abort3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /** \file 11 | * \brief Implements LIB3F abort subprogram. */ 12 | 13 | /* must include ent3f.h AFTER io3f.h */ 14 | #include "io3f.h" 15 | #include "ent3f.h" 16 | #include "open_close.h" 17 | 18 | void ENT3F(ABORT, abort)() 19 | { 20 | void *f, *q; 21 | 22 | for (f = GET_FIO_FCBS; f != NULL; f = q) { 23 | q = FIO_FCB_NEXT(f); 24 | (void) __fio_close(f, 0 /*dispose = default*/); 25 | } 26 | abort(); 27 | } 28 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/alarm3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* alarm3f.c - Implements LIB3F alarm subprogram. */ 11 | 12 | #ifndef WINNT 13 | #include 14 | #include "ent3f.h" 15 | 16 | //extern void (*signal(int, void (*)(int)))(int); 17 | extern unsigned int alarm(unsigned int); 18 | 19 | int ENT3F(ALARM, alarm)(int *time, void (*proc)()) 20 | { 21 | if (*time) 22 | signal(SIGALRM, proc); 23 | return alarm(*time); 24 | } 25 | #endif 26 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/bcopy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "stdioInterf.h" 9 | #include "fioMacros.h" 10 | 11 | void 12 | __fort_bcopy(char *to, char *fr, size_t n) 13 | { 14 | memmove(to, fr, n); 15 | } 16 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/besj03f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* besj03f.c - Implements LIB3F besj0 subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #ifdef WIN32 15 | #define j0 _j0 16 | #endif 17 | 18 | extern double j0(double); 19 | 20 | float ENT3F(BESJ0, besj0)(float *x) { return (float)j0(*x); } 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/besj13f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* besj13f.c - Implements LIB3F besj1 subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #ifdef WIN32 15 | #define j1 _j1 16 | #endif 17 | 18 | extern double j1(double); 19 | 20 | float ENT3F(BESJ1, besj1)(float *x) { return (float)j1(*x); } 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/besjn3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* besjn3f.c - Implements LIB3F besjn subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #ifdef WIN32 15 | #define jn _jn 16 | #endif 17 | 18 | extern double jn(int, double); 19 | 20 | float ENT3F(BESJN, besjn)(int *n, float *x) { return (float)jn(*n, *x); } 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/besy03f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* besy03f.c - Implements LIB3F besy0 subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #ifdef WIN32 15 | #define y0 _y0 16 | #endif 17 | 18 | extern double y0(double); 19 | 20 | float ENT3F(BESY0, besy0)(float *x) { return (float)y0(*x); } 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/besy13f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* besy13f.c - Implements LIB3F besy1 subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #ifdef WIN32 15 | #define y1 _y1 16 | #endif 17 | 18 | extern double y1(double); 19 | 20 | float ENT3F(BESY1, besy1)(float *x) { return (float)y1(*x); } 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/besyn3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* besyn3f.c - Implements LIB3F besyn subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #ifdef WIN32 15 | #define yn _yn 16 | #endif 17 | 18 | extern double yn(int, double); 19 | 20 | float ENT3F(BESYN, besyn)(int *n, float *x) { return (float)yn(*n, *x); } 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/commitqq3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* commitqq3f.c - Implements DFLIB commitqq subroutine. */ 11 | 12 | /* must include ent3f.h AFTER io3f.h */ 13 | #include "io3f.h" 14 | #include "ent3f.h" 15 | 16 | extern FILE *__getfile3f(); 17 | 18 | int ENT3F(COMMITQQ, commitqq)(lu) int *lu; 19 | { 20 | FILE *f; 21 | int i; 22 | 23 | f = __getfile3f(*lu); 24 | if (f) { 25 | fflush(f); 26 | i = -1; /* .true. returned if open unit is passed */ 27 | } else 28 | i = 0; /* .false. returned if unopened unit is passed */ 29 | 30 | return i; 31 | } 32 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/date3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* date3f.c - Implements LIB3F date subprogram. */ 11 | 12 | #include "ent3f.h" 13 | #include "enames.h" 14 | #include "ftnmiscsup.h" 15 | 16 | void ENT3F(DATE, date)(DCHAR(buf) DCLEN(buf)) 17 | { 18 | Ftn_date(CADR(buf), CLEN(buf)); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/dbesj03f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* dbesj03f.c - Implements LIB3F dbesj0 subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #ifdef WIN32 15 | #define j0 _j0 16 | #endif 17 | 18 | extern double j0(double); 19 | 20 | double ENT3F(DBESJ0, dbesj0)(double *x) { return j0(*x); } 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/dbesj13f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* dbesj13f.c - Implements LIB3F dbesj1 subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #ifdef WIN32 15 | #define j1 _j1 16 | #endif 17 | 18 | extern double j1(double); 19 | 20 | double ENT3F(DBESJ1, dbesj1)(double *x) { return j1(*x); } 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/dbesjn3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* dbesjn3f.c - Implements LIB3F dbesjn subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #ifdef WIN32 15 | #define jn _jn 16 | #endif 17 | 18 | extern double jn(int, double); 19 | 20 | double ENT3F(DBESJN, dbesjn)(int *n, double *x) { return jn(*n, *x); } 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/dbesy03f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* dbesy03f.c - Implements LIB3F dbesy0 subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #ifdef WIN32 15 | #define y0 _y0 16 | #endif 17 | 18 | extern double y0(double); 19 | 20 | double ENT3F(DBESY0, dbesy0)(double *x) { return y0(*x); } 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/dbesy13f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* dbesy13f.c - Implements LIB3F dbesy1 subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #ifdef WIN32 15 | #define y1 _y1 16 | #endif 17 | 18 | extern double y1(double); 19 | 20 | double ENT3F(DBESY1, dbesy1)(double *x) { return y1(*x); } 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/dbesyn3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* dbesyn3f.c - Implements LIB3F dbesyn subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #ifdef WIN32 15 | #define yn _yn 16 | #endif 17 | 18 | extern double yn(int, double); 19 | 20 | double ENT3F(DBESYN, dbesyn)(int *n, double *x) { return yn(*n, *x); } 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/derf3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* derf3f.c - Implements LIB3F derf subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | extern double erf(double); 15 | 16 | double ENT3F(DERF, derf)(double *x) { return erf(*x); } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/derfc3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* derfc3f.c - Implements LIB3F derfc subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | extern double erfc(double); 15 | 16 | double ENT3F(DERFC, derfc)(double *x) { return erfc(*x); } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/dsecnds3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* dsecnds3f.c - Implements LIB3F dsecnds function. 11 | * 12 | * Returns the number of real time seconds since midnight minus the supplied 13 | */ 14 | 15 | #include "ent3f.h" 16 | 17 | #include "enames.h" 18 | 19 | extern double Ftn_dsecnds(double); 20 | 21 | double ENT3F(DSECNDS, dsecnds)(double *x) { return Ftn_dsecnds(*x); } 22 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/erf3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* erf3f.c - Implements LIB3F erf subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | extern double erf(double); 15 | 16 | float ENT3F(ERF, erf)(float *x) { return (float)erf(*x); } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/erfc3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* erfc3f.c - Implements LIB3F erfc subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | extern double erfc(double); 15 | 16 | float ENT3F(ERFC, erfc)(float *x) { return (float)erfc(*x); } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/exit3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* exit3f.c - Implements LIB3F exit subprogram. */ 11 | 12 | #include "ent3f.h" 13 | #include "enames.h" 14 | void __fort_exit(int); 15 | 16 | void ENT3F(EXIT, exit)(int *s) { Ftn_exit(*s); } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/flush3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /** \file 11 | * \brief Implements LIB3F flush subroutine. In this case, a wrapper function */ 12 | 13 | /* must include ent3f.h AFTER io3f.h */ 14 | #include "io3f.h" 15 | #include "ent3f.h" 16 | #include "stdioInterf.h" 17 | 18 | extern FILE *__getfile3f(); 19 | 20 | void ENT3F(FLUSH, flush)(lu) int *lu; 21 | { 22 | FILE *f; 23 | 24 | /* DON'T issue any error messages */ 25 | 26 | f = __getfile3f(*lu); 27 | if (f) 28 | fflush(f); 29 | 30 | return; 31 | } 32 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/free3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* free3f.c - Implements LIB3F free subprogram. */ 11 | 12 | #include "ent3f.h" 13 | #include "mpalloc.h" 14 | 15 | void ENT3F(FREE, free)(char **p) { _mp_free(*p); } 16 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/fsync3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* must include ent3f.h AFTER io3f.h */ 11 | #include "io3f.h" 12 | #include "ent3f.h" 13 | #include "stdioInterf.h" 14 | 15 | extern FILE *__getfile3f(); 16 | 17 | void ENT3F(FSYNC, fsync)(lu) int *lu; 18 | { 19 | FILE *f; 20 | 21 | f = __getfile3f(*lu); 22 | if (f) 23 | fsync(__io_getfd(f)); 24 | return; 25 | } 26 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/getenv3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* getenv3f.c - Implements LIB3F getenv subprogram. */ 11 | 12 | #include "ent3f.h" 13 | #include "utils3f.h" 14 | 15 | 16 | extern char *getenv(); 17 | extern char *__fstr2cstr(); 18 | extern void __cstr_free(); 19 | 20 | void ENT3F(GETENV, getenv)(DCHAR(en), DCHAR(ev) DCLEN(en) DCLEN(ev)) 21 | { 22 | char *p, *q; 23 | char ch; 24 | 25 | q = __fstr2cstr(CADR(en), CLEN(en)); 26 | p = getenv(q); 27 | __fcp_cstr(CADR(ev), CLEN(ev), p); 28 | __cstr_free(q); 29 | } 30 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/getfd3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /** \file 11 | * \brief Implements LIB3F getfd subroutine. 12 | */ 13 | 14 | 15 | /* must include ent3f.h AFTER io3f.h */ 16 | #include "io3f.h" 17 | #include "ent3f.h" 18 | 19 | extern FILE *__getfile3f(); 20 | 21 | int 22 | ENT3F(GETFD, getfd)(lu) int *lu; 23 | { 24 | FILE *f; 25 | 26 | /* DON'T issue any error messages */ 27 | 28 | f = __getfile3f(*lu); 29 | if (f != NULL) 30 | return fio_fileno(f); 31 | 32 | return -1; 33 | } 34 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/getgid3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* getgid3f.c - Implements LIB3F getgid subprogram. */ 11 | 12 | #ifndef WINNT 13 | 14 | #include 15 | #include "ent3f.h" 16 | 17 | int ENT3F(GETGID, getgid)() { return getgid(); } 18 | 19 | #endif /* !WINNT */ 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/getlog3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* getlog3f.c - Implements LIB3F getlog subprogram. */ 11 | 12 | #ifndef WINNT 13 | 14 | #include "ent3f.h" 15 | #include "utils3f.h" 16 | 17 | extern char *getlogin(); 18 | 19 | void ENT3F(GETLOG, getlog)(DCHAR(nm) DCLEN(nm)) 20 | { 21 | char *p; 22 | 23 | p = getlogin(); 24 | __fcp_cstr(CADR(nm), CLEN(nm), p); 25 | } 26 | 27 | #endif /* !WINNT */ 28 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/getpid3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* getpid3f.c - Implements LIB3F getpid subprogram. */ 11 | 12 | #include "ent3f.h" 13 | #include 14 | 15 | int ENT3F(GETPID, getpid)() { return getpid(); } 16 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/getuid3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* getuid3f.c - Implements LIB3F getuid subprogram. */ 11 | 12 | #ifndef WINNT 13 | 14 | #include "ent3f.h" 15 | #include 16 | 17 | int ENT3F(GETUID, getuid)() { return getuid(); } 18 | 19 | #endif /* !WINNT */ 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/gmtime3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* gmtime3f.c - Implements LIB3F gmtime subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | typedef struct { 15 | int m[9]; /* 9 elements in tm structure */ 16 | } _TM; 17 | 18 | /* 19 | * extern struct tm *gmtime(const time_t *); 20 | * the argument is either a pointer to 32-bit or 64-bit int depending on 21 | * sizeof(time_t) 22 | */ 23 | extern _TM *gmtime(void *); 24 | 25 | void ENT3F(GMTIME, gmtime)(void *stime, _TM *tarray) 26 | { 27 | _TM *p; 28 | 29 | p = gmtime(stime); 30 | *tarray = *p; 31 | } 32 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/grad.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | #include "stdioInterf.h" 11 | #include "fioMacros.h" 12 | 13 | /* grade_up/grade_down, sort_up/sort_down are DIST_LIBRARY functions */ 14 | 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/i1shft.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /**\brief ISHFT(integer*1) intrinsic */ 9 | int 10 | ftn_i_i1shft(int i, int j) 11 | { 12 | if (j > 0) { 13 | if (j >= 8) 14 | return 0; 15 | return (i << (j + 24)) >> 24; 16 | } 17 | if (j <= -8) 18 | return 0; 19 | return (i & 0xff) >> -j; 20 | } 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/idate3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* idate3f.c - Implements LIB3F idate subroutine. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #include 15 | 16 | void 17 | ENT3F(IDATE, idate)(int *date_array) 18 | { 19 | time_t ltime; 20 | struct tm *ltimvar; 21 | int yr; 22 | 23 | ltime = time(0); 24 | ltimvar = localtime(<ime); 25 | date_array[0] = ltimvar->tm_mon + 1; 26 | date_array[1] = ltimvar->tm_mday; 27 | yr = ltimvar->tm_year; 28 | if (yr > 99) 29 | yr = yr % 100; 30 | date_array[2] = yr; 31 | } 32 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/ierrno3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* ierrno3f.c - Implements LIB3F ierrno subprogram. */ 11 | 12 | /* must include ent3f.h AFTER io3f.h */ 13 | #include "io3f.h" 14 | #include "ent3f.h" 15 | 16 | int ENT3F(IERRNO, ierrno)(void) { return __io_errno(); } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/iishft.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /** \brief IISHFT intrinsic */ 9 | int 10 | ftn_i_iishft(int i, int j) 11 | { 12 | if (j > 0) { 13 | if (j >= 16) 14 | return 0; 15 | return (i << (j + 16)) >> 16; 16 | } 17 | if (j <= -16) 18 | return 0; 19 | return (i & 0xffff) >> -j; 20 | } 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/ileadz.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | int 9 | __mth_i_ileadz(int i) 10 | { 11 | unsigned ui; 12 | int nz; /* number of leading zero bits in 'i' */ 13 | int k; 14 | 15 | ui = i; 16 | nz = 32; 17 | k = nz >> 1; 18 | while (k) { 19 | if (ui >> k) { 20 | ui >>= k; 21 | nz -= k; 22 | } 23 | k >>= 1; 24 | } 25 | if (ui) 26 | --nz; 27 | return nz; 28 | } 29 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/ileadzi.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | int 9 | __mth_i_ileadzi(int i, int size) 10 | { 11 | unsigned ui; /* unsigned representation of 'i' */ 12 | int nz; /* number of leading zero bits in 'i' */ 13 | int k; 14 | 15 | ui = i; 16 | nz = size * 8; 17 | k = nz >> 1; 18 | while (k) { 19 | if (ui >> k) { 20 | ui >>= k; 21 | nz -= k; 22 | } 23 | k >>= 1; 24 | } 25 | if (ui) 26 | --nz; 27 | return nz; 28 | } 29 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/irand3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* irand3f.c - Implements LIB3F irand subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | extern int rand(); 15 | #ifdef WIN64 16 | int ENT3F(IRAND1, irand1)() { return rand(); } 17 | int ENT3F(IRAND2, irand2)(int *flag) 18 | { 19 | if (*flag) 20 | srand(*flag); 21 | return rand(); 22 | } 23 | 24 | #else 25 | int ENT3F(IRAND, irand)() { return rand(); } 26 | #endif 27 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/irandm3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* irandm3f.c - Implements LIB3F irandm subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #ifdef WINNT 15 | 16 | int ENT3F(IRANDM, irandm)(int *flag) 17 | { 18 | if (*flag) 19 | srand(*flag); 20 | return rand(); 21 | } 22 | 23 | #else 24 | 25 | extern int lrand48(); 26 | extern void srand48(); 27 | 28 | int ENT3F(IRANDM, irandm)(int *flag) 29 | { 30 | if (*flag) 31 | srand48(*flag); 32 | return lrand48(); 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/isatty3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* isatty3f.c - Implements LIB3F isatty subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | extern int __isatty3f(); 15 | 16 | int ENT3F(ISATTY, isatty)(int *lu) 17 | { 18 | int u; 19 | 20 | if (__isatty3f(*lu)) 21 | return -1; /* .true. */ 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/isinfd3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | #include "ent3f.h" 11 | 12 | static int 13 | _isinfd(volatile double x) 14 | { 15 | union { 16 | double x; 17 | struct { 18 | unsigned int ml; 19 | unsigned int mh : 20; 20 | unsigned int e : 11; 21 | unsigned int s : 1; 22 | } f; 23 | } u; 24 | 25 | u.x = x; 26 | return (u.f.e == 2047 && (u.f.ml == 0 && u.f.mh == 0)); 27 | } 28 | 29 | int ENT3F(ISINFD, isinfd)(double *x) 30 | { 31 | if (_isinfd(*x)) 32 | return -1; /* .true. */ 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/isinff3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | #include "ent3f.h" 11 | 12 | static int 13 | _isinff(volatile float x) 14 | { 15 | union { 16 | float x; 17 | struct { 18 | unsigned int m : 23; 19 | unsigned int e : 8; 20 | unsigned int s : 1; 21 | } f; 22 | } u; 23 | 24 | u.x = x; 25 | return (u.f.e == 255 && u.f.m == 0); 26 | } 27 | 28 | int ENT3F(ISINFF, isinff)(float *x) 29 | { 30 | if (_isinff(*x)) 31 | return -1; /* .true. */ 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/isnand3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | #include "ent3f.h" 11 | 12 | static int 13 | _isnand(volatile double x) 14 | { 15 | union { 16 | double x; 17 | struct { 18 | unsigned int ml; 19 | unsigned int mh : 20; 20 | unsigned int e : 11; 21 | unsigned int s : 1; 22 | } f; 23 | } u; 24 | 25 | u.x = x; 26 | return (u.f.e == 2047 && (u.f.ml != 0 || u.f.mh != 0)); 27 | } 28 | 29 | int ENT3F(ISNAND, isnand)(double *x) 30 | { 31 | if (_isnand(*x)) 32 | return -1; /* .true. */ 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/isnanf3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | #include "ent3f.h" 11 | 12 | static int 13 | _isnanf(volatile float x) 14 | { 15 | union { 16 | float x; 17 | struct { 18 | unsigned int m : 23; 19 | unsigned int e : 8; 20 | unsigned int s : 1; 21 | } f; 22 | } u; 23 | 24 | u.x = x; 25 | return (u.f.e == 255 && u.f.m != 0); 26 | } 27 | 28 | int ENT3F(ISNANF, isnanf)(float *x) 29 | { 30 | if (_isnanf(*x)) 31 | return -1; /* .true. */ 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/itime3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* itime3f.c - Implements LIB3F itime subroutine. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #include 15 | 16 | void ENT3F(ITIME, itime)(int iarray[3]) 17 | { 18 | time_t ltime; 19 | struct tm *ltimvar; 20 | 21 | ltime = time(0); 22 | ltimvar = localtime(<ime); 23 | iarray[0] = ltimvar->tm_hour; 24 | iarray[1] = ltimvar->tm_min; 25 | iarray[2] = ltimvar->tm_sec; 26 | return; 27 | } 28 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/itrailz.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019, Arm Ltd. All rights reserved. 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 | */ 17 | int 18 | __mth_i_itrailz(int i) 19 | { 20 | unsigned ui=i; 21 | 22 | return (ui)? __builtin_ctz(ui) : 32; 23 | } 24 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/kabs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include 9 | 10 | int64_t 11 | ftn_i_kabs(int64_t i0) 12 | { 13 | if (i0 >= 0) 14 | return i0; 15 | return -i0; 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/kidim.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include 9 | 10 | int64_t 11 | ftn_i_kidim(int64_t i, int64_t j) 12 | { 13 | int64_t h; 14 | 15 | h = i - j; 16 | return h > 0 ? h : 0; 17 | } 18 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/kill3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* kill3f.c - Implements LIB3F kill subprogram. */ 11 | 12 | #ifndef WINNT 13 | 14 | #define POSIX 1 15 | #include 16 | #include 17 | 18 | /* must include ent3f.h AFTER io3f.h */ 19 | #include "io3f.h" 20 | #include "ent3f.h" 21 | 22 | int ENT3F(KILL, kill)(pid, sig) int *pid; 23 | int *sig; 24 | { 25 | int i; 26 | 27 | if ((i = kill(*pid, *sig))) 28 | i = __io_errno(); 29 | return i; 30 | } 31 | 32 | #endif /* !WINNT */ 33 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/kisign.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include 9 | 10 | int64_t 11 | ftn_i_kisign(int64_t i, int64_t j) 12 | { 13 | int64_t absi; 14 | 15 | absi = i >= 0 ? i : -i; 16 | if (j >= 0) 17 | return absi; 18 | return -absi; 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/kleadz.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include 9 | 10 | int64_t 11 | __mth_i_kleadz(int64_t i) 12 | { 13 | uint64_t ui; /* unsigned representation of 'i' */ 14 | int nz; /* number of leading zero bits in 'i' */ 15 | int k; 16 | 17 | ui = i; 18 | nz = 64; 19 | k = nz >> 1; 20 | while (k) { 21 | if (ui >> k) { 22 | ui >>= k; 23 | nz -= k; 24 | } 25 | k >>= 1; 26 | } 27 | if (ui) 28 | --nz; 29 | return nz; 30 | } 31 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/kmax.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include 9 | 10 | int64_t 11 | ftn_i_kmax(int64_t i, int64_t j) 12 | { 13 | return i >= j ? i : j; 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/kmin.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include 9 | 10 | int64_t 11 | ftn_i_kmin(int64_t i, int64_t j) 12 | { 13 | return i <= j ? i : j; 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/linux_dummy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* linux redhat 5.0 dummy functions */ 9 | void 10 | _xustat() 11 | { 12 | } 13 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/lnblnk3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* lnblnk3f.c - Implements LIB3F lnblnk subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | int ENT3F(LNBLNK, lnblnk)(DCHAR(a1) DCLEN(a1)) 15 | { 16 | int i; 17 | char *a1 = CADR(a1); 18 | int len = CLEN(a1); 19 | 20 | for (i = len - 1; i >= 0; i--) 21 | if (a1[i] != ' ') 22 | return i + 1; 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/loc3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* loc3f.c - Implements LIB3F loc subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | void *ENT3F(LOC, loc)(void *a) { return a; } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/long3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* long3f.c - Implements long call for DFLIB */ 11 | 12 | #include "ent3f.h" 13 | 14 | int 15 | ENT3F(LONG, long)(short *input) 16 | { 17 | return (int)(*input); 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/ltime3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* ltime3f.c - Implements LIB3F ltime subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | typedef struct { 15 | int m[9]; /* 9 elements in tm structure */ 16 | } _TM; 17 | 18 | /* 19 | * extern struct tm *localtime(const time_t *); 20 | * the argument is either a pointer to 32-bit or 64-bit int depending on 21 | * sizeof(time_t) 22 | */ 23 | extern _TM *localtime(void *); 24 | 25 | void ENT3F(LTIME, ltime)(void *stime, _TM *tarray) 26 | { 27 | _TM *p; 28 | p = localtime(stime); 29 | *tarray = *p; 30 | } 31 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/malloc3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* malloc3f.c - Implements LIB3F malloc subprogram. */ 11 | 12 | #include "fortDt.h" 13 | #include "mpalloc.h" 14 | #include "ent3f.h" 15 | 16 | __POINT_T 17 | ENT3F(MALLOC, malloc)(int *n) { return (__POINT_T)_mp_malloc((__POINT_T)(*n)); } 18 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mclock3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* mclock3f.c - Implements LIB3F mclock subprogram. */ 11 | #include "ent3f.h" 12 | 13 | /* assumes the Unix times system call */ 14 | 15 | #if defined(WINNT) 16 | 17 | #include 18 | 19 | int ENT3F(MCLOCK, mclock)(void) { return clock(); } 20 | 21 | #else 22 | #include 23 | 24 | int ENT3F(MCLOCK, mclock)(void) 25 | { 26 | struct tms buffer; 27 | 28 | times(&buffer); 29 | return (buffer.tms_utime + buffer.tms_cutime + buffer.tms_cstime); 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/misc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #if !defined(PARAMID) && !defined(WINNT) 9 | #include 10 | #include 11 | #include 12 | #endif 13 | #include 14 | #include "global.h" 15 | 16 | __INT_T 17 | __fort_time(void) 18 | { 19 | __INT_T s; 20 | 21 | #if defined(SUN4SOL2) || defined(SOL86) || defined(HP) || defined(TARGET_OSX) 22 | s = (int)time((time_t *)0); 23 | #else 24 | s = time(NULL); 25 | #endif 26 | if (!LOCAL_MODE) { 27 | __fort_rbcst(GET_DIST_IOPROC, &s, 1, 1, __CINT); 28 | } 29 | return s; 30 | } 31 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mmul_cplx16contvxm.F95: -------------------------------------------------------------------------------- 1 | ! 2 | ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | ! See https://llvm.org/LICENSE.txt for license information. 4 | ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | ! 6 | 7 | 8 | #include "mmul_dir.h" 9 | 10 | subroutine F90_matmul_cplx16_contvxm(dest, src1, src2, m_extent, n_extent) 11 | 12 | DESC_INT n_extent 13 | DESC_INT m_extent 14 | COMPLEX*16, dimension(m_extent) :: src1 15 | COMPLEX*16, dimension(m_extent,n_extent) :: src2 16 | COMPLEX*16, dimension(n_extent) :: dest 17 | 18 | DESC_INT n 19 | DESC_INT m 20 | 21 | do n=1,n_extent 22 | dest(n) = 0 23 | do m=1,m_extent 24 | dest(n) = dest(n) + src1(m) * src2(m,n) 25 | end do 26 | end do 27 | 28 | end subroutine 29 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mmul_cplx8contmxv.F95: -------------------------------------------------------------------------------- 1 | ! 2 | ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | ! See https://llvm.org/LICENSE.txt for license information. 4 | ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | ! 6 | 7 | 8 | #include "mmul_dir.h" 9 | 10 | subroutine F90_matmul_cplx8_contmxv(dest, src1, src2, k_extent, m_extent) 11 | 12 | DESC_INT k_extent 13 | DESC_INT m_extent 14 | COMPLEX*8, dimension(k_extent,m_extent) :: src1 15 | COMPLEX*8, dimension(m_extent) :: src2 16 | COMPLEX*8, dimension(k_extent) :: dest 17 | 18 | DESC_INT k 19 | DESC_INT m 20 | 21 | do k=1,k_extent 22 | dest(k) = 0 23 | end do 24 | do m=1,m_extent 25 | do k=1,k_extent 26 | dest(k) = dest(k) + src1(k,m) * src2(m) 27 | end do 28 | end do 29 | 30 | end subroutine 31 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mmul_cplx8contvxm.F95: -------------------------------------------------------------------------------- 1 | ! 2 | ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | ! See https://llvm.org/LICENSE.txt for license information. 4 | ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | ! 6 | 7 | 8 | #include "mmul_dir.h" 9 | 10 | subroutine F90_matmul_cplx8_contvxm(dest, src1, src2, m_extent, n_extent) 11 | 12 | DESC_INT n_extent 13 | DESC_INT m_extent 14 | COMPLEX*8, dimension(m_extent) :: src1 15 | COMPLEX*8, dimension(m_extent,n_extent) :: src2 16 | COMPLEX*8, dimension(n_extent) :: dest 17 | 18 | DESC_INT n 19 | DESC_INT m 20 | 21 | do n=1,n_extent 22 | dest(n) = 0 23 | do m=1,m_extent 24 | dest(n) = dest(n) + src1(m) * src2(m,n) 25 | end do 26 | end do 27 | 28 | end subroutine 29 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mmul_int1contmxv.F95: -------------------------------------------------------------------------------- 1 | ! 2 | ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | ! See https://llvm.org/LICENSE.txt for license information. 4 | ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | ! 6 | 7 | 8 | #include "mmul_dir.h" 9 | 10 | subroutine F90_matmul_int1_contmxv(dest, src1, src2, k_extent, m_extent) 11 | 12 | DESC_INT k_extent 13 | DESC_INT m_extent 14 | INTEGER*1, dimension(k_extent,m_extent) :: src1 15 | INTEGER*1, dimension(m_extent) :: src2 16 | INTEGER*1, dimension(k_extent) :: dest 17 | 18 | DESC_INT k 19 | DESC_INT m 20 | 21 | do k=1,k_extent 22 | dest(k) = 0 23 | end do 24 | do m=1,m_extent 25 | do k=1,k_extent 26 | dest(k) = dest(k) + src1(k,m) * src2(m) 27 | end do 28 | end do 29 | 30 | end subroutine 31 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mmul_int1contvxm.F95: -------------------------------------------------------------------------------- 1 | ! 2 | ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | ! See https://llvm.org/LICENSE.txt for license information. 4 | ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | ! 6 | 7 | 8 | #include "mmul_dir.h" 9 | 10 | subroutine F90_matmul_int1_contvxm(dest, src1, src2, m_extent, n_extent) 11 | 12 | DESC_INT n_extent 13 | DESC_INT m_extent 14 | INTEGER*1, dimension(m_extent) :: src1 15 | INTEGER*1, dimension(m_extent,n_extent) :: src2 16 | INTEGER*1, dimension(n_extent) :: dest 17 | 18 | DESC_INT n 19 | DESC_INT m 20 | 21 | do n=1,n_extent 22 | dest(n) = 0 23 | do m=1,m_extent 24 | dest(n) = dest(n) + src1(m) * src2(m,n) 25 | end do 26 | end do 27 | 28 | end subroutine 29 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mmul_int2contmxv.F95: -------------------------------------------------------------------------------- 1 | ! 2 | ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | ! See https://llvm.org/LICENSE.txt for license information. 4 | ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | ! 6 | 7 | 8 | #include "mmul_dir.h" 9 | 10 | subroutine F90_matmul_int2_contmxv(dest, src1, src2, k_extent, m_extent) 11 | 12 | DESC_INT k_extent 13 | DESC_INT m_extent 14 | INTEGER*2, dimension(k_extent,m_extent) :: src1 15 | INTEGER*2, dimension(m_extent) :: src2 16 | INTEGER*2, dimension(k_extent) :: dest 17 | 18 | DESC_INT k 19 | DESC_INT m 20 | 21 | do k=1,k_extent 22 | dest(k) = 0 23 | end do 24 | do m=1,m_extent 25 | do k=1,k_extent 26 | dest(k) = dest(k) + src1(k,m) * src2(m) 27 | end do 28 | end do 29 | 30 | end subroutine 31 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mmul_int2contvxm.F95: -------------------------------------------------------------------------------- 1 | ! 2 | ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | ! See https://llvm.org/LICENSE.txt for license information. 4 | ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | ! 6 | 7 | 8 | #include "mmul_dir.h" 9 | 10 | subroutine F90_matmul_int2_contvxm(dest, src1, src2, m_extent, n_extent) 11 | 12 | DESC_INT n_extent 13 | DESC_INT m_extent 14 | INTEGER*2, dimension(m_extent) :: src1 15 | INTEGER*2, dimension(m_extent,n_extent) :: src2 16 | INTEGER*2, dimension(n_extent) :: dest 17 | 18 | DESC_INT n 19 | DESC_INT m 20 | 21 | do n=1,n_extent 22 | dest(n) = 0 23 | do m=1,m_extent 24 | dest(n) = dest(n) + src1(m) * src2(m,n) 25 | end do 26 | end do 27 | 28 | end subroutine 29 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mmul_int4contmxv.F95: -------------------------------------------------------------------------------- 1 | ! 2 | ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | ! See https://llvm.org/LICENSE.txt for license information. 4 | ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | ! 6 | 7 | 8 | #include "mmul_dir.h" 9 | 10 | subroutine F90_matmul_int4_contmxv(dest, src1, src2, k_extent, m_extent) 11 | 12 | DESC_INT k_extent 13 | DESC_INT m_extent 14 | INTEGER*4, dimension(k_extent,m_extent) :: src1 15 | INTEGER*4, dimension(m_extent) :: src2 16 | INTEGER*4, dimension(k_extent) :: dest 17 | 18 | DESC_INT k 19 | DESC_INT m 20 | 21 | do k=1,k_extent 22 | dest(k) = 0 23 | end do 24 | do m=1,m_extent 25 | do k=1,k_extent 26 | dest(k) = dest(k) + src1(k,m) * src2(m) 27 | end do 28 | end do 29 | 30 | end subroutine 31 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mmul_int4contvxm.F95: -------------------------------------------------------------------------------- 1 | ! 2 | ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | ! See https://llvm.org/LICENSE.txt for license information. 4 | ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | ! 6 | 7 | 8 | #include "mmul_dir.h" 9 | 10 | subroutine F90_matmul_int4_contvxm(dest, src1, src2, m_extent, n_extent) 11 | 12 | DESC_INT n_extent 13 | DESC_INT m_extent 14 | INTEGER*4, dimension(m_extent) :: src1 15 | INTEGER*4, dimension(m_extent,n_extent) :: src2 16 | INTEGER*4, dimension(n_extent) :: dest 17 | 18 | DESC_INT n 19 | DESC_INT m 20 | 21 | do n=1,n_extent 22 | dest(n) = 0 23 | do m=1,m_extent 24 | dest(n) = dest(n) + src1(m) * src2(m,n) 25 | end do 26 | end do 27 | 28 | end subroutine 29 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mmul_int8contvxm.F95: -------------------------------------------------------------------------------- 1 | ! 2 | ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | ! See https://llvm.org/LICENSE.txt for license information. 4 | ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | ! 6 | 7 | 8 | #include "mmul_dir.h" 9 | 10 | subroutine F90_matmul_int8_contvxm(dest, src1, src2, m_extent, n_extent) 11 | 12 | DESC_INT n_extent 13 | DESC_INT m_extent 14 | INTEGER*8, dimension(m_extent) :: src1 15 | INTEGER*8, dimension(m_extent,n_extent) :: src2 16 | INTEGER*8, dimension(n_extent) :: dest 17 | 18 | DESC_INT n 19 | DESC_INT m 20 | 21 | do n=1,n_extent 22 | dest(n) = 0 23 | do m=1,m_extent 24 | dest(n) = dest(n) + src1(m) * src2(m,n) 25 | end do 26 | end do 27 | 28 | end subroutine 29 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mmul_real4contmxv.F95: -------------------------------------------------------------------------------- 1 | ! 2 | ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | ! See https://llvm.org/LICENSE.txt for license information. 4 | ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | ! 6 | 7 | 8 | #include "mmul_dir.h" 9 | 10 | subroutine F90_matmul_real4_contmxv(dest, src1, src2, k_extent, m_extent) 11 | 12 | DESC_INT k_extent 13 | DESC_INT m_extent 14 | REAL*4, dimension(k_extent,m_extent) :: src1 15 | REAL*4, dimension(m_extent) :: src2 16 | REAL*4, dimension(k_extent) :: dest 17 | 18 | DESC_INT k 19 | DESC_INT m 20 | 21 | do k=1,k_extent 22 | dest(k) = 0 23 | end do 24 | do m=1,m_extent 25 | do k=1,k_extent 26 | dest(k) = dest(k) + src1(k,m) * src2(m) 27 | end do 28 | end do 29 | 30 | end subroutine 31 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mmul_real4contvxm.F95: -------------------------------------------------------------------------------- 1 | ! 2 | ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | ! See https://llvm.org/LICENSE.txt for license information. 4 | ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | ! 6 | 7 | 8 | #include "mmul_dir.h" 9 | 10 | subroutine F90_matmul_real4_contvxm(dest, src1, src2, m_extent, n_extent) 11 | 12 | DESC_INT n_extent 13 | DESC_INT m_extent 14 | REAL*4, dimension(m_extent) :: src1 15 | REAL*4, dimension(m_extent,n_extent) :: src2 16 | REAL*4, dimension(n_extent) :: dest 17 | 18 | DESC_INT n 19 | DESC_INT m 20 | 21 | do n=1,n_extent 22 | dest(n) = 0 23 | do m=1,m_extent 24 | dest(n) = dest(n) + src1(m) * src2(m,n) 25 | end do 26 | end do 27 | 28 | end subroutine 29 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mmul_real8contmxv.F95: -------------------------------------------------------------------------------- 1 | ! 2 | ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | ! See https://llvm.org/LICENSE.txt for license information. 4 | ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | ! 6 | 7 | 8 | #include "mmul_dir.h" 9 | 10 | subroutine F90_matmul_real8_contmxv(dest, src1, src2, k_extent, m_extent) 11 | 12 | DESC_INT k_extent 13 | DESC_INT m_extent 14 | REAL*8, dimension(k_extent,m_extent) :: src1 15 | REAL*8, dimension(m_extent) :: src2 16 | REAL*8, dimension(k_extent) :: dest 17 | 18 | DESC_INT k 19 | DESC_INT m 20 | 21 | do k=1,k_extent 22 | dest(k) = 0 23 | end do 24 | do m=1,m_extent 25 | do k=1,k_extent 26 | dest(k) = dest(k) + src1(k,m) * src2(m) 27 | end do 28 | end do 29 | 30 | end subroutine 31 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mmul_real8contvxm.F95: -------------------------------------------------------------------------------- 1 | ! 2 | ! Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | ! See https://llvm.org/LICENSE.txt for license information. 4 | ! SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | ! 6 | 7 | 8 | #include "mmul_dir.h" 9 | 10 | subroutine F90_matmul_real8_contvxm(dest, src1, src2, m_extent, n_extent) 11 | 12 | DESC_INT n_extent 13 | DESC_INT m_extent 14 | REAL*8, dimension(m_extent) :: src1 15 | REAL*8, dimension(m_extent,n_extent) :: src2 16 | REAL*8, dimension(n_extent) :: dest 17 | 18 | REAL*8 rslt 19 | DESC_INT n 20 | DESC_INT m 21 | 22 | do n=1,n_extent 23 | dest(n) = 0; 24 | do m=1,m_extent 25 | dest(n) = dest(n) + src1(m) * src2(m,n) 26 | end do 27 | end do 28 | 29 | end subroutine 30 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/mpalloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /** \file 9 | * \brief External declarations for libpgc routines defined in mpalloc.c. 10 | */ 11 | 12 | #include 13 | 14 | extern void * _mp_malloc(size_t n); 15 | extern void * _mp_calloc(size_t n, size_t); 16 | extern void * _mp_realloc(void *p, size_t n); 17 | extern void * _mp_realloc(void *p, size_t n); 18 | extern void _mp_free(void *p); 19 | 20 | void __cstr_free(char *from); 21 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/nargs3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /** \file 11 | * \brief getarg and iargc utility functions for Fortran programmers 12 | */ 13 | 14 | #include "ent3f.h" 15 | 16 | extern int __io_get_argc(); 17 | 18 | int ENT3F(NARGS, nargs)(void) 19 | { 20 | return __io_get_argc(); 21 | } 22 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/putenv3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* putenv3f.c - Implements LIB3F putenv subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | extern char *__fstr2cstr(); 15 | extern void __cstr_free(); 16 | 17 | extern int putenv(); 18 | 19 | int ENT3F(PUTENV, putenv)(DCHAR(str) DCLEN(str)) 20 | { 21 | int i; 22 | char *p; 23 | 24 | p = __fstr2cstr(CADR(str), CLEN(str)); 25 | i = putenv(p); 26 | /* note - putenv stashes the pointer rather than copying the 27 | * value, so can't free p. 28 | __cstr_free(p); 29 | */ 30 | 31 | return i; 32 | } 33 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/qsort3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* qsort3f.c - Implements LIB3F qsort subprogram. */ 11 | 12 | #include 13 | #include 14 | #include "ent3f.h" 15 | 16 | void ENT3F(QSORT, qsort)(void *array, int *len, int *isize, int (*compar)()) 17 | { 18 | qsort(array, *len, *isize, compar); 19 | } 20 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/rtc3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* rtc3f.c - Implements rtc subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #include 15 | 16 | double ENT3F(RTC, rtc)() 17 | { 18 | double elapsed; 19 | time_t ltime; 20 | 21 | time(<ime); 22 | elapsed = (double)(ltime); 23 | 24 | return elapsed; 25 | } 26 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/secnds3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* secnds3f.c - Implements LIB3F secnds subprogram. */ 11 | 12 | #include "ent3f.h" 13 | 14 | #include "enames.h" 15 | 16 | extern float Ftn_secnds(float); 17 | 18 | float ENT3F(SECNDS, secnds)(float *x) { return Ftn_secnds(*x); } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/short3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* short3f.c - Implements short call for DFLIB */ 11 | 12 | #include "ent3f.h" 13 | 14 | short 15 | ENT3F(SHORT, short)(int *input) 16 | { 17 | return (short)(*input); 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/sleep3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* sleep3f.c - Implements LIB3F sleep subprogram. */ 11 | 12 | #include 13 | #include "ent3f.h" 14 | 15 | #if defined(WIN64) || defined(WIN32) 16 | 17 | #include 18 | 19 | void ENT3F(SLEEP, sleep)(t) unsigned int *t; 20 | { 21 | Sleep(1000 * (*t)); /* MS Sleep() is in terms of milliseconds */ 22 | } 23 | #else 24 | void ENT3F(SLEEP, sleep)(t) unsigned int *t; 25 | { 26 | sleep(*t); 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/sleepqq3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* sleep3f.c - Implements DFPORT SLEEPQQ subprogram. */ 11 | 12 | #include 13 | #include "ent3f.h" 14 | 15 | #if defined(WIN64) || defined(WIN32) 16 | 17 | #include 18 | 19 | void ENT3F(SLEEPQQ, sleepqq)(t) unsigned int *t; 20 | { 21 | Sleep(*t); /* MS Sleep() is in terms of milliseconds */ 22 | } 23 | #else 24 | void ENT3F(SLEEPQQ, sleepqq)(t) unsigned int *t; 25 | { 26 | sleep((*t) / 1000); 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/spawn.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* host data structure */ 9 | 10 | struct hostd { 11 | char name[256]; /* name */ 12 | int pwr; /* current power */ 13 | int opwr; /* original power */ 14 | float lav; /* load average */ 15 | int cnt; /* number of processes for host */ 16 | int lcpu; /* lowest logical process on node */ 17 | }; 18 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/srand3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* srand3f.c - Implements LIB3F srand subprogram. */ 11 | 12 | #include 13 | #include "ent3f.h" 14 | 15 | /* srand48 is not currently available on win64 */ 16 | #if defined(WIN64) || defined(WIN32) 17 | 18 | void ENT3F(SRAND1, srand1)(int *iseed) { srand(*iseed); } 19 | 20 | void ENT3F(SRAND2, srand2)(float *rseed) 21 | { 22 | int iseed; 23 | iseed = (int)(*rseed); 24 | srand(iseed); 25 | } 26 | 27 | #else 28 | 29 | void ENT3F(SRAND, srand)(int *iseed) { srand48(*iseed); } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/stime3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* stime3f.c - Implements LIB3F stime subprogram. */ 11 | 12 | #ifndef WINNT 13 | 14 | #include 15 | #include "io3f.h" 16 | #include "ent3f.h" 17 | 18 | int ENT3F(STIME, stime)(int *tp) 19 | { 20 | int i; 21 | struct timespec ts = {0}; 22 | 23 | ts.tv_sec = *tp; 24 | i = __io_errno(); 25 | 26 | return i; 27 | } 28 | 29 | #endif /* !WINNT */ 30 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/system3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* system3f.c - Implements LIB3F system subprogram. */ 11 | 12 | #include 13 | #include "ent3f.h" 14 | 15 | extern char *__fstr2cstr(); 16 | extern void __cstr_free(); 17 | 18 | int ENT3F(SYSTEM, system)(DCHAR(str) DCLEN(str)) 19 | { 20 | char *p; 21 | int i; 22 | 23 | p = __fstr2cstr(CADR(str), CLEN(str)); 24 | i = -1; 25 | __cstr_free(p); 26 | return i; 27 | } 28 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/systemqq3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* system3fqq.c - Implements DFLIB systemqq subprogram. */ 11 | 12 | #include 13 | #include "ent3f.h" 14 | 15 | extern char *__fstr2cstr(); 16 | extern void __cstr_free(); 17 | 18 | int ENT3F(SYSTEMQQ, systemqq)(DCHAR(str) DCLEN(str)) 19 | { 20 | char *p; 21 | int i; 22 | 23 | p = __fstr2cstr(CADR(str), CLEN(str)); 24 | i = -1; 25 | __cstr_free(p); 26 | if (i == -1) 27 | return 0; /* .false. */ 28 | else 29 | return -1; /* .true. */ 30 | } 31 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/time3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* time3f.c - Implements LIB3F time function. */ 11 | 12 | #include 13 | #include "ent3f.h" 14 | 15 | #if defined(TARGET_INTERIX_X8664) || defined(TARGET_WIN_X8664) 16 | #define INT long long 17 | #else 18 | #define INT long 19 | #endif 20 | 21 | INT ENT3F(TIME, time)() { return time(0); } 22 | 23 | long long ENT3F(TIME8, time8)() { return time(0); } 24 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/times3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* times3f.c - Implements LIB3F times subprogram. */ 11 | 12 | #ifndef WINNT 13 | 14 | #include 15 | #include "io3f.h" 16 | #include "ent3f.h" 17 | 18 | int ENT3F(TIMES, times)(int *buff) 19 | { 20 | int i; 21 | struct tms *tbuff = (struct tms *)buff; 22 | 23 | i = times(tbuff); 24 | if (i == -1) 25 | i = -__io_errno(); 26 | 27 | return i; 28 | } 29 | 30 | #endif /* !WINNT */ 31 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/unlink3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* unlink3f.c - Implements LIB3F unlink subroutine. */ 11 | 12 | /* must include ent3f.h AFTER io3f.h */ 13 | #include "io3f.h" 14 | #include "ent3f.h" 15 | 16 | extern char *__fstr2cstr(); 17 | extern void __cstr_free(); 18 | 19 | int ENT3F(UNLINK, unlink)(DCHAR(fil) DCLEN(fil)) 20 | { 21 | char *nam; 22 | int i; 23 | 24 | nam = __fstr2cstr(CADR(fil), CLEN(fil)); 25 | i = unlink(nam); 26 | __cstr_free(nam); 27 | if (i == 0) 28 | return 0; 29 | return __io_errno(); 30 | } 31 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/utils3f.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | 9 | void __fcp_cstr(char *to, int to_len, char *from); 10 | 11 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flang/wait3f.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* clang-format off */ 9 | 10 | /* wait3f.c - Implements LIB3F wait subprogram. */ 11 | 12 | #ifndef WINNT 13 | 14 | #include 15 | #include 16 | #include "ent3f.h" 17 | 18 | /* The type of the wait system call argument differs between various 19 | * Linux flavaors and OSX 20 | */ 21 | #define WAIT_STAT int* 22 | 23 | int ENT3F(WAIT, wait)(int *st) 24 | { 25 | WAIT_STAT wst = (WAIT_STAT)st; 26 | return wait(wst); 27 | } 28 | 29 | #endif /* !WINNT */ 30 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/dumpregs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | 9 | /** 10 | * \file 11 | * Declare routines that access the machine registers 12 | */ 13 | 14 | #include 15 | 16 | void dumpregs(gregset_t *regs); 17 | gregset_t *getRegs(ucontext_t *u); 18 | 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/f2cmain.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include 9 | 10 | /* 11 | * On linux, linking -g77libs (=> libf2c) may result in an 'undefined 12 | * reference to MAIN__' which is g77's name for a fortran main program. 13 | * Just define the function in libpgc.a and hope it's never called. 14 | */ 15 | int 16 | MAIN__() 17 | { 18 | fprintf(__io_stderr(), 19 | "MAIN__ called -- missing g77-compiled main program\n"); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/idnint.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* INT */ 9 | int 10 | __mth_i_idnint(double d) 11 | { 12 | if (d > 0) 13 | return (int)(d + 0.5); 14 | else 15 | return (int)(d - 0.5); 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/ioargs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | char **__argv_save; 9 | int __argc_save; 10 | 11 | /* get saved argv */ 12 | 13 | char ** 14 | __io_get_argv() 15 | { 16 | return (__argv_save); 17 | } 18 | 19 | /* set saved argv */ 20 | 21 | void 22 | __io_set_argv(char **v) 23 | { 24 | __argv_save = v; 25 | } 26 | 27 | /* get saved argc */ 28 | 29 | int 30 | __io_get_argc() 31 | { 32 | return (__argc_save); 33 | } 34 | 35 | /* set saved argc */ 36 | 37 | void 38 | __io_set_argc(int v) 39 | { 40 | __argc_save = v; 41 | } 42 | 43 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/kidnnt.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include 9 | 10 | int64_t 11 | __mth_i_kidnnt(double d) 12 | { 13 | if (d > 0) 14 | return ((d < 4503599627370496.0) ? (int64_t)(d + 0.5) : (int64_t)(d)); 15 | else 16 | return ((d > -4503599627370496.0) ? (int64_t)(d - 0.5) : (int64_t)(d)); 17 | } 18 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/knint.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include 9 | 10 | int64_t 11 | __mth_i_knint(float d) 12 | { 13 | if (d > 0) 14 | return ((d < 8388608.f) ? (int64_t)(d + 0.5f) : (int64_t)(d)); 15 | else 16 | return ((d > -8388608.f) ? (int64_t)(d - 0.5f) : (int64_t)(d)); 17 | } 18 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/ktrap.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /** \file 9 | * \brief IEEE trap support 10 | */ 11 | 12 | #ifndef TARGET_WIN 13 | 14 | #include 15 | 16 | #if !defined(TARGET_OSX) 17 | /* Use the LINUX interpretation of 'weak references' */ 18 | extern int __ktrapval __attribute__ ((weak)); 19 | 20 | #else 21 | /* Use the OSX feature of 'weak definitions' */ 22 | int __ktrapval __attribute__ ((weak)); 23 | #endif 24 | 25 | void 26 | __ktrap(void) 27 | { 28 | } 29 | 30 | #else 31 | void 32 | __ktrap(void) 33 | { 34 | } 35 | #endif 36 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/mcopy1.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "memops.h" 9 | 10 | #if !defined(INLINE_MEMOPS) 11 | void 12 | __c_mcopy1(char *dest, char *src, long cnt) 13 | { 14 | long i; 15 | 16 | for (i = 0; i < cnt; i++) { 17 | dest[i] = src[i]; 18 | } 19 | return; 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/mcopy2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "memops.h" 9 | 10 | #if !defined(INLINE_MEMOPS) 11 | void 12 | __c_mcopy2(short *dest, short *src, long cnt) 13 | { 14 | long i; 15 | 16 | for (i = 0; i < cnt; i++) { 17 | dest[i] = src[i]; 18 | } 19 | return; 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/mcopy4.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "memops.h" 9 | 10 | #if !defined(INLINE_MEMOPS) 11 | void 12 | __c_mcopy4(int *dest, int *src, long cnt) 13 | { 14 | long i; 15 | 16 | for (i = 0; i < cnt; i++) { 17 | dest[i] = src[i]; 18 | } 19 | return; 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/mcopy8.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "memops.h" 9 | 10 | #if !defined(INLINE_MEMOPS) 11 | void 12 | __c_mcopy8(long long *dest, long long *src, long cnt) 13 | { 14 | long i; 15 | 16 | for (i = 0; i < cnt; i++) { 17 | dest[i] = src[i]; 18 | } 19 | return; 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/mset1.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "memops.h" 9 | 10 | #if !defined(INLINE_MEMOPS) 11 | void 12 | __c_mset1(char *dest, int value, long cnt) 13 | { 14 | long i; 15 | 16 | for (i = 0; i < cnt; i++) { 17 | dest[i] = value; 18 | } 19 | return; 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/mset2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "memops.h" 9 | 10 | #if !defined(INLINE_MEMOPS) 11 | void 12 | __c_mset2(short *dest, int value, long cnt) 13 | { 14 | long i; 15 | 16 | for (i = 0; i < cnt; i++) { 17 | dest[i] = value; 18 | } 19 | return; 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/mset4.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "memops.h" 9 | 10 | #if !defined(INLINE_MEMOPS) 11 | void 12 | __c_mset4(int *dest, int value, long cnt) 13 | { 14 | long i; 15 | 16 | for (i = 0; i < cnt; i++) { 17 | dest[i] = value; 18 | } 19 | return; 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/mset8.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "memops.h" 9 | 10 | #if !defined(INLINE_MEMOPS) 11 | void 12 | __c_mset8(long long *dest, long long value, long cnt) 13 | { 14 | long i; 15 | 16 | for (i = 0; i < cnt; i++) { 17 | dest[i] = value; 18 | } 19 | return; 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/mzero1.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "memops.h" 9 | 10 | #if !defined(INLINE_MEMOPS) 11 | void 12 | __c_mzero1(char *dest, long cnt) 13 | { 14 | long i; 15 | 16 | for (i = 0; i < cnt; i++) { 17 | dest[i] = 0; 18 | } 19 | return; 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/mzero2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "memops.h" 9 | 10 | #if !defined(INLINE_MEMOPS) 11 | void 12 | __c_mzero2(short *dest, long cnt) 13 | { 14 | long i; 15 | 16 | for (i = 0; i < cnt; i++) { 17 | dest[i] = 0; 18 | } 19 | return; 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/mzero4.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "memops.h" 9 | 10 | #if !defined(INLINE_MEMOPS) 11 | void 12 | __c_mzero4(int *dest, long cnt) 13 | { 14 | long i; 15 | 16 | for (i = 0; i < cnt; i++) { 17 | dest[i] = 0; 18 | } 19 | return; 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/mzero8.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "memops.h" 9 | 10 | #if !defined(INLINE_MEMOPS) 11 | void 12 | __c_mzero8(long long *dest, long cnt) 13 | { 14 | long i; 15 | 16 | for (i = 0; i < cnt; i++) { 17 | dest[i] = 0; 18 | } 19 | return; 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/nint.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | int 9 | __mth_i_nint(float d) 10 | { 11 | if (d > 0) 12 | return (int)(d + 0.5f); 13 | else 14 | return (int)(d - 0.5f); 15 | } 16 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/x86_64-Linux/x86_daz.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* -Mdaz run-time support. 9 | * For fortran and C main programs, the compiler will add the address of 10 | * the support routine to ctors 11 | */ 12 | 13 | void 14 | __daz(void) 15 | { 16 | #ifdef TARGET_LINUX_X8664 17 | __asm__("pushq %rax"); 18 | __asm__("stmxcsr (%rsp)"); 19 | __asm__("popq %rax"); 20 | __asm__("orq $64, %rax"); 21 | __asm__("pushq %rax"); 22 | __asm__("ldmxcsr (%rsp)"); 23 | __asm__("popq %rax"); 24 | #endif 25 | } 26 | 27 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/flangrti/x86_64-Linux/x86_flushz.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* -Mflushz run-time support. 9 | * For fortran and C main programs, the compiler will add the address of 10 | * the support routine to ctors 11 | */ 12 | 13 | void 14 | __flushz(void) 15 | { 16 | #ifdef TARGET_LINUX_X8664 17 | __asm__("pushq %rax"); 18 | __asm__("stmxcsr (%rsp)"); 19 | __asm__("popq %rax"); 20 | __asm__("orq $32768, %rax"); 21 | __asm__("pushq %rax"); 22 | __asm__("ldmxcsr (%rsp)"); 23 | __asm__("popq %rax"); 24 | #endif 25 | } 26 | 27 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/abs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | int 9 | __mth_i_abs(int arg) 10 | { 11 | return __builtin_abs(arg); 12 | } 13 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/acos.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | /* -------------------- single precision functions: */ 10 | 11 | float 12 | __mth_i_acos(float f) 13 | { 14 | return acosf(f); 15 | } 16 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/acosh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | float 14 | __mth_i_acosh(float arg) 15 | { 16 | float f = acoshf(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/alog.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_alog(float f) 12 | { 13 | return logf(f); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/alog10.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_alog10(float f) 12 | { 13 | return log10f(f); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/around.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | extern float roundf(float); 11 | 12 | float 13 | __mth_i_around(float x) 14 | { 15 | return roundf(x); 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/asin.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_asin(float f) 12 | { 13 | return asinf(f); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/asinh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | float 14 | __mth_i_asinh(float arg) 15 | { 16 | float f = asinhf(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/atan.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_atan(float f) 12 | { 13 | return atanf(f); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/atan2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_atan2(float f, float g) 12 | { 13 | return atan2f(f, g); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/atanh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_atanh(float f) 12 | { 13 | return atanhf(f); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/cos.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_cos(float f) 12 | { 13 | return cosf(f); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/cosh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_cosh(float f) 12 | { 13 | return coshf(f); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dacos.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | /* ----------------------------- double precision functions: */ 11 | 12 | double 13 | __mth_i_dacos(double d) 14 | { 15 | return acos(d); 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dacosh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | double 14 | __mth_i_dacosh(double arg) 15 | { 16 | double f = acosh(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dasin.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dasin(double d) 11 | { 12 | return asin(d); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dasinh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | #include "mthdecls.h" 12 | 13 | double 14 | __mth_i_dasinh(double arg) 15 | { 16 | double f = asinh(arg); 17 | return f; 18 | } 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/datan.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #if !defined(WIN64) 9 | #include "mthdecls.h" 10 | #else 11 | double atan(double d); 12 | #endif 13 | double 14 | __mth_i_datan(double d) 15 | { 16 | return atan(d); 17 | } 18 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/datan2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #if !defined(WIN64) 9 | #include "mthdecls.h" 10 | #else 11 | double atan2(double x, double y); 12 | #endif 13 | double 14 | __mth_i_datan2(double x, double y) 15 | { 16 | return atan2(x, y); 17 | } 18 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/datanh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | double 11 | __mth_i_datanh(double d) 12 | { 13 | return atanh(d); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dblint64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #ifndef _DBLINT64_H_ 9 | #define _DBLINT64_H_ 10 | 11 | typedef int DBLINT64[2]; 12 | typedef unsigned int DBLUINT64[2]; 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dcos.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dcos(double d) 11 | { 12 | return cos(d); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dcosh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dcosh(double d) 11 | { 12 | return cosh(d); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dexp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dexp(double d) 11 | { 12 | return exp(d); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dlog.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dlog(double d) 11 | { 12 | return log(d); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dlog10.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #if !defined(WIN64) 9 | #include "mthdecls.h" 10 | #else 11 | double log10(double d); 12 | #endif 13 | double 14 | __mth_i_dlog10(double d) 15 | { 16 | return log10(d); 17 | } 18 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dpowd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dpowd(double x, double y) 11 | { 12 | double f; 13 | /* f = __mth_i_pow(x, y); */ 14 | f = pow(x, y); 15 | return f; 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dremainder.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | extern double remainder(double, double); 11 | 12 | double 13 | __mth_i_dremainder(double x, double y) 14 | { 15 | return remainder(x, y); 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dround.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | extern double round(double); 11 | 12 | double 13 | __mth_i_dround(double x) 14 | { 15 | return round(x); 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dsin.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dsin(double d) 11 | { 12 | return sin(d); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dsinh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dsinh(double d) 11 | { 12 | return sinh(d); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dsqrt.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dsqrt(double d) 11 | { 12 | return sqrt(d); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dtan.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dtan(double d) 11 | { 12 | return tan(d); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/dtanh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | double 10 | __mth_i_dtanh(double d) 11 | { 12 | return tanh(d); 13 | } 14 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/exp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_exp(float f) 12 | { 13 | return expf(f); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/fabs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* inhibit floating point copy propagation */ 9 | #pragma global - Mx, 6, 0x100 10 | 11 | double 12 | __mth_i_fabs(double arg) 13 | { 14 | double d = __builtin_fabs(arg); 15 | return d; 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/idnint.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* INT */ 9 | int 10 | __mth_i_idnint(double d) 11 | { 12 | if (d > 0) 13 | return (int)(d + 0.5); 14 | else 15 | return (int)(d - 0.5); 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/knint.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include 9 | 10 | int64_t 11 | __mth_i_knint(float d) 12 | { 13 | if (d > 0) 14 | return ((d < 8388608.f) ? (int64_t)(d + 0.5f) : (int64_t)(d)); 15 | else 16 | return ((d > -8388608.f) ? (int64_t)(d - 0.5f) : (int64_t)(d)); 17 | } 18 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/log.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_log(float arg) 12 | { 13 | return logf(arg); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/log10.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_log10(float arg) 12 | { 13 | return log10f(arg); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/nint.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | int 9 | __mth_i_nint(float d) 10 | { 11 | if (d > 0) 12 | return (int)(d + 0.5f); 13 | else 14 | return (int)(d - 0.5f); 15 | } 16 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/remainder.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | extern float remainderf(float, float); 11 | 12 | float 13 | __mth_i_remainder(float x, float y) 14 | { 15 | return remainderf(x, y); 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/round.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | extern float roundf(float); 11 | 12 | float 13 | __mth_i_round(float x) 14 | { 15 | return roundf(x); 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/rpowr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_rpowr(float arg1, float arg2) 12 | { 13 | float f; 14 | f = powf(arg1, arg2); 15 | return f; 16 | } 17 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/sin.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_sin(float f) 12 | { 13 | return sinf(f); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/sinh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_sinh(float f) 12 | { 13 | return sinhf(f); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/sqrt.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_sqrt(float f) 12 | { 13 | return sqrtf(f); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/tan.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_tan(float f) 12 | { 13 | return tanf(f); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/generic/tanh.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #include "mthdecls.h" 9 | 10 | float 11 | __mth_i_tanh(float f) 12 | { 13 | return tanhf(f); 14 | } 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/include/dblint64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #ifndef _DBLINT64_H_ 9 | #define _DBLINT64_H_ 10 | 11 | typedef int DBLINT64[2]; 12 | typedef unsigned int DBLUINT64[2]; 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/include/define.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | /* For a release, replace */ 9 | /* #define DEBUG 1 */ 10 | /* with */ 11 | /* #define DEBUG 0 */ 12 | #ifndef DEBUG 13 | #define DEBUG 1 14 | #endif 15 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/include/release.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | #ifndef VSN 8 | #define VSN "Flang" 9 | #endif 10 | #ifndef VER 11 | #define VER 1.5 12 | #endif 13 | #ifndef BLD 14 | #define BLD " - 1.5 2017-05-01" 15 | #endif 16 | #ifndef RELEASE 17 | #define RELEASE "" 18 | #endif 19 | #ifndef SUBVER 20 | #define SUBVER "" 21 | #endif 22 | #ifndef DATE 23 | #define DATE "May 2017" 24 | #endif 25 | #ifndef YEAR 26 | #define YEAR "2017" 27 | #endif 28 | #ifndef DVSN 29 | #define DVSN "2017.0105" 30 | #endif 31 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/include/replaced-scutil.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #ifndef SCUTIL_H_ 9 | #define SCUTIL_H_ 10 | 11 | #include "legacy-folding-api.h" 12 | #include "legacy-ints.h" 13 | #include "legacy-util-api.h" 14 | #include "universal.h" 15 | 16 | #endif 17 | 18 | 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/include/scutil.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | * See https://llvm.org/LICENSE.txt for license information. 4 | * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | * 6 | */ 7 | 8 | #ifndef SCUTIL_H_ 9 | #define SCUTIL_H_ 10 | 11 | #include "legacy-folding-api.h" 12 | #include "legacy-ints.h" 13 | #include "legacy-util-api.h" 14 | #include "universal.h" 15 | 16 | #endif 17 | 18 | 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/ios_flang_runtime.h: -------------------------------------------------------------------------------- 1 | // 2 | // ios_flang_runtime.h 3 | // ios_flang_runtime 4 | // 5 | // Created by Emma Labbé on 30-11-20. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for ios_flang_runtime. 11 | FOUNDATION_EXPORT double ios_flang_runtimeVersionNumber; 12 | 13 | //! Project version string for ios_flang_runtime. 14 | FOUNDATION_EXPORT const unsigned char ios_flang_runtimeVersionString[]; 15 | 16 | // In this header, you should import all the public headers of your framework using statements like #import 17 | 18 | 19 | -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clagge.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clagge.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/claghe.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/claghe.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clagsy.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clagsy.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clahilb.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clahilb.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clakf2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clakf2.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clarge.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clarge.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clarnd.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clarnd.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/claror.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/claror.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clarot.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clarot.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clatm1.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clatm1.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clatm2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clatm2.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clatm3.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clatm3.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clatm5.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clatm5.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clatm6.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clatm6.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clatme.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clatme.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clatmr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clatmr.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clatms.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clatms.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/clatmt.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/clatmt.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlagge.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlagge.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlagsy.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlagsy.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlahilb.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlahilb.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlakf2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlakf2.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlaran.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlaran.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlarge.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlarge.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlarnd.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlarnd.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlaror.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlaror.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlarot.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlarot.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlatm1.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlatm1.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlatm2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlatm2.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlatm3.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlatm3.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlatm5.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlatm5.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlatm6.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlatm6.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlatm7.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlatm7.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlatme.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlatme.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlatmr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlatmr.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlatms.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlatms.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/dlatmt.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/dlatmt.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slagge.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slagge.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slagsy.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slagsy.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slahilb.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slahilb.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slakf2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slakf2.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slaran.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slaran.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slarge.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slarge.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slarnd.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slarnd.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slaror.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slaror.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slarot.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slarot.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slatm1.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slatm1.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slatm2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slatm2.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slatm3.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slatm3.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slatm5.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slatm5.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slatm6.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slatm6.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slatm7.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slatm7.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slatme.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slatme.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slatmr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slatmr.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slatms.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slatms.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/slatmt.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/slatmt.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlagge.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlagge.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlaghe.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlaghe.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlagsy.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlagsy.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlahilb.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlahilb.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlakf2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlakf2.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlarge.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlarge.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlarnd.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlarnd.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlaror.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlaror.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlarot.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlarot.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlatm1.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlatm1.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlatm2.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlatm2.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlatm3.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlatm3.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlatm5.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlatm5.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlatm6.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlatm6.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlatme.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlatme.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlatmr.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlatmr.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlatms.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlatms.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/libtmglib/zlatmt.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdGrub1384/fortran-ios/226079caea9b8025a07a245e7eb515bd378b62f4/ios_flang_runtime/ios_flang_runtime/libtmglib/zlatmt.o -------------------------------------------------------------------------------- /ios_flang_runtime/ios_flang_runtime/ompstub/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 3 | # See https://llvm.org/LICENSE.txt for license information. 4 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 5 | # 6 | 7 | set(OMPSTUB_SRC init_nomp.c ompstubs.c) 8 | 9 | add_flang_library(ompstub_static ${OMPSTUB_SRC}) 10 | set_property(TARGET ompstub_static PROPERTY OUTPUT_NAME ompstub) 11 | 12 | set(SHARED_LIBRARY TRUE) 13 | add_flang_library(ompstub_shared ${OMPSTUB_SRC}) 14 | set_property(TARGET ompstub_shared PROPERTY OUTPUT_NAME ompstub) 15 | set(SHARED_LIBRARY FALSE) 16 | 17 | set_target_properties(ompstub_static ompstub_shared 18 | PROPERTIES 19 | ARCHIVE_OUTPUT_DIRECTORY ${FLANG_RTE_LIB_DIR} 20 | ) 21 | 22 | -------------------------------------------------------------------------------- /setup-container.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd /root/host 4 | dpkg -i --force-depends deb/*.deb &> /dev/null 5 | export PATH="/root/host/flang/bin:$PATH" 6 | cd $1 7 | flang "${@:2}" 8 | --------------------------------------------------------------------------------