[libc-commits] [libc] bbb7555 - [libc][NFC] Move generic math implementations to the generic directory.
Siva Chandra via libc-commits
libc-commits at lists.llvm.org
Wed Feb 3 10:51:06 PST 2021
Author: Siva Chandra
Date: 2021-02-03T10:46:00-08:00
New Revision: bbb7555403855f5c2a61d62ae59f1e970ea37ec1
URL: https://github.com/llvm/llvm-project/commit/bbb7555403855f5c2a61d62ae59f1e970ea37ec1
DIFF: https://github.com/llvm/llvm-project/commit/bbb7555403855f5c2a61d62ae59f1e970ea37ec1.diff
LOG: [libc][NFC] Move generic math implementations to the generic directory.
This expands the pattern suggest in https://reviews.llvm.org/D95850 to all
math functions.
Added:
libc/src/math/generic/copysign.cpp
libc/src/math/generic/copysignf.cpp
libc/src/math/generic/copysignl.cpp
libc/src/math/generic/cosf.cpp
libc/src/math/generic/exp2f.cpp
libc/src/math/generic/exp_utils.cpp
libc/src/math/generic/exp_utils.h
libc/src/math/generic/expf.cpp
libc/src/math/generic/fabs.cpp
libc/src/math/generic/fabsf.cpp
libc/src/math/generic/fabsl.cpp
libc/src/math/generic/fdim.cpp
libc/src/math/generic/fdimf.cpp
libc/src/math/generic/fdiml.cpp
libc/src/math/generic/floor.cpp
libc/src/math/generic/floorf.cpp
libc/src/math/generic/floorl.cpp
libc/src/math/generic/fmaf.cpp
libc/src/math/generic/fmax.cpp
libc/src/math/generic/fmaxf.cpp
libc/src/math/generic/fmaxl.cpp
libc/src/math/generic/fmin.cpp
libc/src/math/generic/fminf.cpp
libc/src/math/generic/fminl.cpp
libc/src/math/generic/frexp.cpp
libc/src/math/generic/frexpf.cpp
libc/src/math/generic/frexpl.cpp
libc/src/math/generic/hypot.cpp
libc/src/math/generic/hypotf.cpp
libc/src/math/generic/ilogb.cpp
libc/src/math/generic/ilogbf.cpp
libc/src/math/generic/ilogbl.cpp
libc/src/math/generic/ldexp.cpp
libc/src/math/generic/ldexpf.cpp
libc/src/math/generic/ldexpl.cpp
libc/src/math/generic/llrint.cpp
libc/src/math/generic/llrintf.cpp
libc/src/math/generic/llrintl.cpp
libc/src/math/generic/llround.cpp
libc/src/math/generic/llroundf.cpp
libc/src/math/generic/llroundl.cpp
libc/src/math/generic/logb.cpp
libc/src/math/generic/logbf.cpp
libc/src/math/generic/logbl.cpp
libc/src/math/generic/lrint.cpp
libc/src/math/generic/lrintf.cpp
libc/src/math/generic/lrintl.cpp
libc/src/math/generic/lround.cpp
libc/src/math/generic/lroundf.cpp
libc/src/math/generic/lroundl.cpp
libc/src/math/generic/math_utils.cpp
libc/src/math/generic/math_utils.h
libc/src/math/generic/modf.cpp
libc/src/math/generic/modff.cpp
libc/src/math/generic/modfl.cpp
libc/src/math/generic/nearbyint.cpp
libc/src/math/generic/nearbyintf.cpp
libc/src/math/generic/nearbyintl.cpp
libc/src/math/generic/nextafter.cpp
libc/src/math/generic/nextafterf.cpp
libc/src/math/generic/nextafterl.cpp
libc/src/math/generic/remainder.cpp
libc/src/math/generic/remainderf.cpp
libc/src/math/generic/remainderl.cpp
libc/src/math/generic/remquo.cpp
libc/src/math/generic/remquof.cpp
libc/src/math/generic/remquol.cpp
libc/src/math/generic/rint.cpp
libc/src/math/generic/rintf.cpp
libc/src/math/generic/rintl.cpp
libc/src/math/generic/round.cpp
libc/src/math/generic/roundf.cpp
libc/src/math/generic/roundl.cpp
libc/src/math/generic/sincosf.cpp
libc/src/math/generic/sincosf_data.cpp
libc/src/math/generic/sincosf_utils.h
libc/src/math/generic/sinf.cpp
libc/src/math/generic/sqrt.cpp
libc/src/math/generic/sqrtf.cpp
libc/src/math/generic/sqrtl.cpp
libc/src/math/generic/trunc.cpp
libc/src/math/generic/truncf.cpp
libc/src/math/generic/truncl.cpp
Modified:
libc/src/math/CMakeLists.txt
libc/src/math/generic/CMakeLists.txt
Removed:
libc/src/math/copysign.cpp
libc/src/math/copysignf.cpp
libc/src/math/copysignl.cpp
libc/src/math/cosf.cpp
libc/src/math/exp2f.cpp
libc/src/math/exp_utils.cpp
libc/src/math/exp_utils.h
libc/src/math/expf.cpp
libc/src/math/fabs.cpp
libc/src/math/fabsf.cpp
libc/src/math/fabsl.cpp
libc/src/math/fdim.cpp
libc/src/math/fdimf.cpp
libc/src/math/fdiml.cpp
libc/src/math/floor.cpp
libc/src/math/floorf.cpp
libc/src/math/floorl.cpp
libc/src/math/fmaf.cpp
libc/src/math/fmax.cpp
libc/src/math/fmaxf.cpp
libc/src/math/fmaxl.cpp
libc/src/math/fmin.cpp
libc/src/math/fminf.cpp
libc/src/math/fminl.cpp
libc/src/math/frexp.cpp
libc/src/math/frexpf.cpp
libc/src/math/frexpl.cpp
libc/src/math/hypot.cpp
libc/src/math/hypotf.cpp
libc/src/math/ilogb.cpp
libc/src/math/ilogbf.cpp
libc/src/math/ilogbl.cpp
libc/src/math/ldexp.cpp
libc/src/math/ldexpf.cpp
libc/src/math/ldexpl.cpp
libc/src/math/llrint.cpp
libc/src/math/llrintf.cpp
libc/src/math/llrintl.cpp
libc/src/math/llround.cpp
libc/src/math/llroundf.cpp
libc/src/math/llroundl.cpp
libc/src/math/logb.cpp
libc/src/math/logbf.cpp
libc/src/math/logbl.cpp
libc/src/math/lrint.cpp
libc/src/math/lrintf.cpp
libc/src/math/lrintl.cpp
libc/src/math/lround.cpp
libc/src/math/lroundf.cpp
libc/src/math/lroundl.cpp
libc/src/math/math_utils.cpp
libc/src/math/math_utils.h
libc/src/math/modf.cpp
libc/src/math/modff.cpp
libc/src/math/modfl.cpp
libc/src/math/nearbyint.cpp
libc/src/math/nearbyintf.cpp
libc/src/math/nearbyintl.cpp
libc/src/math/nextafter.cpp
libc/src/math/nextafterf.cpp
libc/src/math/nextafterl.cpp
libc/src/math/remainder.cpp
libc/src/math/remainderf.cpp
libc/src/math/remainderl.cpp
libc/src/math/remquo.cpp
libc/src/math/remquof.cpp
libc/src/math/remquol.cpp
libc/src/math/rint.cpp
libc/src/math/rintf.cpp
libc/src/math/rintl.cpp
libc/src/math/round.cpp
libc/src/math/roundf.cpp
libc/src/math/roundl.cpp
libc/src/math/sincosf.cpp
libc/src/math/sincosf_data.cpp
libc/src/math/sincosf_utils.h
libc/src/math/sinf.cpp
libc/src/math/sqrt.cpp
libc/src/math/sqrtf.cpp
libc/src/math/sqrtl.cpp
libc/src/math/trunc.cpp
libc/src/math/truncf.cpp
libc/src/math/truncl.cpp
################################################################################
diff --git a/libc/src/math/CMakeLists.txt b/libc/src/math/CMakeLists.txt
index ac4ee312fb81..8febb4a66eb0 100644
--- a/libc/src/math/CMakeLists.txt
+++ b/libc/src/math/CMakeLists.txt
@@ -36,958 +36,109 @@ add_math_entrypoint_object(ceil)
add_math_entrypoint_object(ceilf)
add_math_entrypoint_object(ceill)
-add_object_library(
- math_utils
- SRCS
- math_utils.cpp
- HDRS
- math_utils.h
- DEPENDS
- libc.include.errno
- libc.include.math
- libc.src.errno.__errno_location
-)
-
-add_object_library(
- sincosf_utils
- HDRS
- sincosf_utils.h
- SRCS
- sincosf_data.cpp
- DEPENDS
- .math_utils
-)
-
-add_entrypoint_object(
- cosf
- SRCS
- cosf.cpp
- HDRS
- cosf.h
- DEPENDS
- .sincosf_utils
- libc.include.math
- libc.src.errno.__errno_location
-)
-
-add_entrypoint_object(
- sinf
- SRCS
- sinf.cpp
- HDRS
- sinf.h
- DEPENDS
- .sincosf_utils
- libc.include.math
- libc.src.errno.__errno_location
-)
-
-add_entrypoint_object(
- sincosf
- SRCS
- sincosf.cpp
- HDRS
- sincosf.h
- DEPENDS
- .sincosf_utils
- libc.include.math
- libc.src.errno.__errno_location
-)
-
-add_entrypoint_object(
- fabs
- SRCS
- fabs.cpp
- HDRS
- fabs.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- fabsf
- SRCS
- fabsf.cpp
- HDRS
- fabsf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- fabsl
- SRCS
- fabsl.cpp
- HDRS
- fabsl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- trunc
- SRCS
- trunc.cpp
- HDRS
- trunc.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- truncf
- SRCS
- truncf.cpp
- HDRS
- truncf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- truncl
- SRCS
- truncl.cpp
- HDRS
- truncl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- floor
- SRCS
- floor.cpp
- HDRS
- floor.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- floorf
- SRCS
- floorf.cpp
- HDRS
- floorf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- floorl
- SRCS
- floorl.cpp
- HDRS
- floorl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- round
- SRCS
- round.cpp
- HDRS
- round.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- roundf
- SRCS
- roundf.cpp
- HDRS
- roundf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- roundl
- SRCS
- roundl.cpp
- HDRS
- roundl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- lround
- SRCS
- lround.cpp
- HDRS
- lround.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- lroundf
- SRCS
- lroundf.cpp
- HDRS
- lroundf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- lroundl
- SRCS
- lroundl.cpp
- HDRS
- lroundl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- llround
- SRCS
- llround.cpp
- HDRS
- llround.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- llroundf
- SRCS
- llroundf.cpp
- HDRS
- llroundf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- llroundl
- SRCS
- llroundl.cpp
- HDRS
- llroundl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- rint
- SRCS
- rint.cpp
- HDRS
- rint.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- rintf
- SRCS
- rintf.cpp
- HDRS
- rintf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- rintl
- SRCS
- rintl.cpp
- HDRS
- rintl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- lrint
- SRCS
- lrint.cpp
- HDRS
- lrint.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- lrintf
- SRCS
- lrintf.cpp
- HDRS
- lrintf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- lrintl
- SRCS
- lrintl.cpp
- HDRS
- lrintl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- llrint
- SRCS
- llrint.cpp
- HDRS
- llrint.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- llrintf
- SRCS
- llrintf.cpp
- HDRS
- llrintf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- llrintl
- SRCS
- llrintl.cpp
- HDRS
- llrintl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- nearbyint
- SRCS
- nearbyint.cpp
- HDRS
- nearbyint.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- nearbyintf
- SRCS
- nearbyintf.cpp
- HDRS
- nearbyintf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- nearbyintl
- SRCS
- nearbyintl.cpp
- HDRS
- nearbyintl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_object_library(
- exp_utils
- HDRS
- exp_utils.h
- SRCS
- exp_utils.cpp
- DEPENDS
- .math_utils
-)
-
-add_entrypoint_object(
- expf
- SRCS
- expf.cpp
- HDRS
- expf.h
- DEPENDS
- .exp_utils
- .math_utils
- libc.include.math
-)
-
-add_entrypoint_object(
- exp2f
- SRCS
- exp2f.cpp
- HDRS
- exp2f.h
- DEPENDS
- .exp_utils
- .math_utils
- libc.include.math
-)
-
-add_entrypoint_object(
- copysign
- SRCS
- copysign.cpp
- HDRS
- copysign.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- copysignf
- SRCS
- copysignf.cpp
- HDRS
- copysignf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- copysignl
- SRCS
- copysignl.cpp
- HDRS
- copysignl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- frexp
- SRCS
- frexp.cpp
- HDRS
- frexp.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- frexpf
- SRCS
- frexpf.cpp
- HDRS
- frexpf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- frexpl
- SRCS
- frexpl.cpp
- HDRS
- frexpl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- ilogb
- SRCS
- ilogb.cpp
- HDRS
- ilogb.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- ilogbf
- SRCS
- ilogbf.cpp
- HDRS
- ilogbf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- ilogbl
- SRCS
- ilogbl.cpp
- HDRS
- ilogbl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- ldexp
- SRCS
- ldexp.cpp
- HDRS
- ldexp.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- ldexpf
- SRCS
- ldexpf.cpp
- HDRS
- ldexpf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- ldexpl
- SRCS
- ldexpl.cpp
- HDRS
- ldexpl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- logb
- SRCS
- logb.cpp
- HDRS
- logb.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- logbf
- SRCS
- logbf.cpp
- HDRS
- logbf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- logbl
- SRCS
- logbl.cpp
- HDRS
- logbl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- modf
- SRCS
- modf.cpp
- HDRS
- modf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- modff
- SRCS
- modff.cpp
- HDRS
- modff.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- modfl
- SRCS
- modfl.cpp
- HDRS
- modfl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- fmin
- SRCS
- fmin.cpp
- HDRS
- fmin.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- fminf
- SRCS
- fminf.cpp
- HDRS
- fminf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- fminl
- SRCS
- fminl.cpp
- HDRS
- fminl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- fmax
- SRCS
- fmax.cpp
- HDRS
- fmax.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- fmaxf
- SRCS
- fmaxf.cpp
- HDRS
- fmaxf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- fmaxl
- SRCS
- fmaxl.cpp
- HDRS
- fmaxl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- sqrt
- SRCS
- sqrt.cpp
- HDRS
- sqrt.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- sqrtf
- SRCS
- sqrtf.cpp
- HDRS
- sqrtf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- sqrtl
- SRCS
- sqrtl.cpp
- HDRS
- sqrtl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- remquof
- SRCS
- remquof.cpp
- HDRS
- remquof.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- remquo
- SRCS
- remquo.cpp
- HDRS
- remquo.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- remquol
- SRCS
- remquol.cpp
- HDRS
- remquol.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- remainderf
- SRCS
- remainderf.cpp
- HDRS
- remainderf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- remainder
- SRCS
- remainder.cpp
- HDRS
- remainder.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- remainderl
- SRCS
- remainderl.cpp
- HDRS
- remainderl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- hypotf
- SRCS
- hypotf.cpp
- HDRS
- hypotf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- fdim
- SRCS
- fdim.cpp
- HDRS
- fdim.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- fdimf
- SRCS
- fdimf.cpp
- HDRS
- fdimf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- fdiml
- SRCS
- fdiml.cpp
- HDRS
- fdiml.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- hypot
- SRCS
- hypot.cpp
- HDRS
- hypot.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- nextafter
- SRCS
- nextafter.cpp
- HDRS
- nextafter.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- nextafterf
- SRCS
- nextafterf.cpp
- HDRS
- nextafterf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- nextafterl
- SRCS
- nextafterl.cpp
- HDRS
- nextafterl.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
-
-add_entrypoint_object(
- fmaf
- SRCS
- fmaf.cpp
- HDRS
- fmaf.h
- DEPENDS
- libc.utils.FPUtil.fputil
- COMPILE_OPTIONS
- -O2
-)
+add_math_entrypoint_object(copysign)
+add_math_entrypoint_object(copysignf)
+add_math_entrypoint_object(copysignl)
+
+add_math_entrypoint_object(cosf)
+
+add_math_entrypoint_object(expf)
+
+add_math_entrypoint_object(exp2f)
+
+add_math_entrypoint_object(fabs)
+add_math_entrypoint_object(fabsf)
+add_math_entrypoint_object(fabsl)
+
+add_math_entrypoint_object(fdim)
+add_math_entrypoint_object(fdimf)
+add_math_entrypoint_object(fdiml)
+
+add_math_entrypoint_object(floor)
+add_math_entrypoint_object(floorf)
+add_math_entrypoint_object(floorl)
+
+add_math_entrypoint_object(fmaf)
+
+add_math_entrypoint_object(fmax)
+add_math_entrypoint_object(fmaxf)
+add_math_entrypoint_object(fmaxl)
+
+add_math_entrypoint_object(fmin)
+add_math_entrypoint_object(fminf)
+add_math_entrypoint_object(fminl)
+
+add_math_entrypoint_object(frexp)
+add_math_entrypoint_object(frexpf)
+add_math_entrypoint_object(frexpl)
+
+add_math_entrypoint_object(hypot)
+add_math_entrypoint_object(hypotf)
+
+add_math_entrypoint_object(ilogb)
+add_math_entrypoint_object(ilogbf)
+add_math_entrypoint_object(ilogbl)
+
+add_math_entrypoint_object(ldexp)
+add_math_entrypoint_object(ldexpf)
+add_math_entrypoint_object(ldexpl)
+
+add_math_entrypoint_object(logb)
+add_math_entrypoint_object(logbf)
+add_math_entrypoint_object(logbl)
+
+add_math_entrypoint_object(llrint)
+add_math_entrypoint_object(llrintf)
+add_math_entrypoint_object(llrintl)
+
+add_math_entrypoint_object(llround)
+add_math_entrypoint_object(llroundf)
+add_math_entrypoint_object(llroundl)
+
+add_math_entrypoint_object(lrint)
+add_math_entrypoint_object(lrintf)
+add_math_entrypoint_object(lrintl)
+
+add_math_entrypoint_object(lround)
+add_math_entrypoint_object(lroundf)
+add_math_entrypoint_object(lroundl)
+
+add_math_entrypoint_object(modf)
+add_math_entrypoint_object(modff)
+add_math_entrypoint_object(modfl)
+
+add_math_entrypoint_object(nearbyint)
+add_math_entrypoint_object(nearbyintf)
+add_math_entrypoint_object(nearbyintl)
+
+add_math_entrypoint_object(nextafter)
+add_math_entrypoint_object(nextafterf)
+add_math_entrypoint_object(nextafterl)
+
+add_math_entrypoint_object(remainder)
+add_math_entrypoint_object(remainderf)
+add_math_entrypoint_object(remainderl)
+
+add_math_entrypoint_object(remquo)
+add_math_entrypoint_object(remquof)
+add_math_entrypoint_object(remquol)
+
+add_math_entrypoint_object(rint)
+add_math_entrypoint_object(rintf)
+add_math_entrypoint_object(rintl)
+
+add_math_entrypoint_object(round)
+add_math_entrypoint_object(roundf)
+add_math_entrypoint_object(roundl)
+
+add_math_entrypoint_object(sincosf)
+
+add_math_entrypoint_object(sinf)
+
+add_math_entrypoint_object(sqrt)
+add_math_entrypoint_object(sqrtf)
+add_math_entrypoint_object(sqrtl)
+
+add_math_entrypoint_object(trunc)
+add_math_entrypoint_object(truncf)
+add_math_entrypoint_object(truncl)
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index 6c481b57b3d6..fc026227301a 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -33,3 +33,959 @@ add_entrypoint_object(
COMPILE_OPTIONS
-O2
)
+
+add_object_library(
+ math_utils
+ SRCS
+ math_utils.cpp
+ HDRS
+ math_utils.h
+ DEPENDS
+ libc.include.errno
+ libc.include.math
+ libc.src.errno.__errno_location
+)
+
+add_object_library(
+ sincosf_utils
+ HDRS
+ sincosf_utils.h
+ SRCS
+ sincosf_data.cpp
+ DEPENDS
+ .math_utils
+)
+
+add_entrypoint_object(
+ cosf
+ SRCS
+ cosf.cpp
+ HDRS
+ ../cosf.h
+ DEPENDS
+ .sincosf_utils
+ libc.include.math
+ libc.src.errno.__errno_location
+)
+
+add_entrypoint_object(
+ sinf
+ SRCS
+ sinf.cpp
+ HDRS
+ ../sinf.h
+ DEPENDS
+ .sincosf_utils
+ libc.include.math
+ libc.src.errno.__errno_location
+)
+
+add_entrypoint_object(
+ sincosf
+ SRCS
+ sincosf.cpp
+ HDRS
+ ../sincosf.h
+ DEPENDS
+ .sincosf_utils
+ libc.include.math
+ libc.src.errno.__errno_location
+)
+
+add_entrypoint_object(
+ fabs
+ SRCS
+ fabs.cpp
+ HDRS
+ ../fabs.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fabsf
+ SRCS
+ fabsf.cpp
+ HDRS
+ ../fabsf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fabsl
+ SRCS
+ fabsl.cpp
+ HDRS
+ ../fabsl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ trunc
+ SRCS
+ trunc.cpp
+ HDRS
+ ../trunc.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ truncf
+ SRCS
+ truncf.cpp
+ HDRS
+ ../truncf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ truncl
+ SRCS
+ truncl.cpp
+ HDRS
+ ../truncl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ floor
+ SRCS
+ floor.cpp
+ HDRS
+ ../floor.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ floorf
+ SRCS
+ floorf.cpp
+ HDRS
+ ../floorf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ floorl
+ SRCS
+ floorl.cpp
+ HDRS
+ ../floorl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ round
+ SRCS
+ round.cpp
+ HDRS
+ ../round.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ roundf
+ SRCS
+ roundf.cpp
+ HDRS
+ ../roundf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ roundl
+ SRCS
+ roundl.cpp
+ HDRS
+ ../roundl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ lround
+ SRCS
+ lround.cpp
+ HDRS
+ ../lround.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ lroundf
+ SRCS
+ lroundf.cpp
+ HDRS
+ ../lroundf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ lroundl
+ SRCS
+ lroundl.cpp
+ HDRS
+ ../lroundl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ llround
+ SRCS
+ llround.cpp
+ HDRS
+ ../llround.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ llroundf
+ SRCS
+ llroundf.cpp
+ HDRS
+ ../llroundf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ llroundl
+ SRCS
+ llroundl.cpp
+ HDRS
+ ../llroundl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ rint
+ SRCS
+ rint.cpp
+ HDRS
+ ../rint.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ rintf
+ SRCS
+ rintf.cpp
+ HDRS
+ ../rintf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ rintl
+ SRCS
+ rintl.cpp
+ HDRS
+ ../rintl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ lrint
+ SRCS
+ lrint.cpp
+ HDRS
+ ../lrint.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ lrintf
+ SRCS
+ lrintf.cpp
+ HDRS
+ ../lrintf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ lrintl
+ SRCS
+ lrintl.cpp
+ HDRS
+ ../lrintl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ llrint
+ SRCS
+ llrint.cpp
+ HDRS
+ ../llrint.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ llrintf
+ SRCS
+ llrintf.cpp
+ HDRS
+ ../llrintf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ llrintl
+ SRCS
+ llrintl.cpp
+ HDRS
+ ../llrintl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ nearbyint
+ SRCS
+ nearbyint.cpp
+ HDRS
+ ../nearbyint.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ nearbyintf
+ SRCS
+ nearbyintf.cpp
+ HDRS
+ ../nearbyintf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ nearbyintl
+ SRCS
+ nearbyintl.cpp
+ HDRS
+ ../nearbyintl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_object_library(
+ exp_utils
+ HDRS
+ exp_utils.h
+ SRCS
+ exp_utils.cpp
+ DEPENDS
+ .math_utils
+)
+
+add_entrypoint_object(
+ expf
+ SRCS
+ expf.cpp
+ HDRS
+ ../expf.h
+ DEPENDS
+ .exp_utils
+ .math_utils
+ libc.include.math
+)
+
+add_entrypoint_object(
+ exp2f
+ SRCS
+ exp2f.cpp
+ HDRS
+ ../exp2f.h
+ DEPENDS
+ .exp_utils
+ .math_utils
+ libc.include.math
+)
+
+add_entrypoint_object(
+ copysign
+ SRCS
+ copysign.cpp
+ HDRS
+ ../copysign.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ copysignf
+ SRCS
+ copysignf.cpp
+ HDRS
+ ../copysignf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ copysignl
+ SRCS
+ copysignl.cpp
+ HDRS
+ ../copysignl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ frexp
+ SRCS
+ frexp.cpp
+ HDRS
+ ../frexp.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ frexpf
+ SRCS
+ frexpf.cpp
+ HDRS
+ ../frexpf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ frexpl
+ SRCS
+ frexpl.cpp
+ HDRS
+ ../frexpl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ ilogb
+ SRCS
+ ilogb.cpp
+ HDRS
+ ../ilogb.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ ilogbf
+ SRCS
+ ilogbf.cpp
+ HDRS
+ ../ilogbf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ ilogbl
+ SRCS
+ ilogbl.cpp
+ HDRS
+ ../ilogbl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ ldexp
+ SRCS
+ ldexp.cpp
+ HDRS
+ ../ldexp.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ ldexpf
+ SRCS
+ ldexpf.cpp
+ HDRS
+ ../ldexpf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ ldexpl
+ SRCS
+ ldexpl.cpp
+ HDRS
+ ../ldexpl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ logb
+ SRCS
+ logb.cpp
+ HDRS
+ ../logb.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ logbf
+ SRCS
+ logbf.cpp
+ HDRS
+ ../logbf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ logbl
+ SRCS
+ logbl.cpp
+ HDRS
+ ../logbl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ modf
+ SRCS
+ modf.cpp
+ HDRS
+ ../modf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ modff
+ SRCS
+ modff.cpp
+ HDRS
+ ../modff.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ modfl
+ SRCS
+ modfl.cpp
+ HDRS
+ ../modfl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmin
+ SRCS
+ fmin.cpp
+ HDRS
+ ../fmin.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminf
+ SRCS
+ fminf.cpp
+ HDRS
+ ../fminf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminl
+ SRCS
+ fminl.cpp
+ HDRS
+ ../fminl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmax
+ SRCS
+ fmax.cpp
+ HDRS
+ ../fmax.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaxf
+ SRCS
+ fmaxf.cpp
+ HDRS
+ ../fmaxf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaxl
+ SRCS
+ fmaxl.cpp
+ HDRS
+ ../fmaxl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ sqrt
+ SRCS
+ sqrt.cpp
+ HDRS
+ ../sqrt.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ sqrtf
+ SRCS
+ sqrtf.cpp
+ HDRS
+ ../sqrtf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ sqrtl
+ SRCS
+ sqrtl.cpp
+ HDRS
+ ../sqrtl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ remquof
+ SRCS
+ remquof.cpp
+ HDRS
+ ../remquof.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ remquo
+ SRCS
+ remquo.cpp
+ HDRS
+ ../remquo.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ remquol
+ SRCS
+ remquol.cpp
+ HDRS
+ ../remquol.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ remainderf
+ SRCS
+ remainderf.cpp
+ HDRS
+ ../remainderf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ remainder
+ SRCS
+ remainder.cpp
+ HDRS
+ ../remainder.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ remainderl
+ SRCS
+ remainderl.cpp
+ HDRS
+ ../remainderl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ hypotf
+ SRCS
+ hypotf.cpp
+ HDRS
+ ../hypotf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fdim
+ SRCS
+ fdim.cpp
+ HDRS
+ ../fdim.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fdimf
+ SRCS
+ fdimf.cpp
+ HDRS
+ ../fdimf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fdiml
+ SRCS
+ fdiml.cpp
+ HDRS
+ ../fdiml.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ hypot
+ SRCS
+ hypot.cpp
+ HDRS
+ ../hypot.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ nextafter
+ SRCS
+ nextafter.cpp
+ HDRS
+ ../nextafter.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ nextafterf
+ SRCS
+ nextafterf.cpp
+ HDRS
+ ../nextafterf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ nextafterl
+ SRCS
+ nextafterl.cpp
+ HDRS
+ ../nextafterl.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaf
+ SRCS
+ fmaf.cpp
+ HDRS
+ ../fmaf.h
+ DEPENDS
+ libc.utils.FPUtil.fputil
+ COMPILE_OPTIONS
+ -O2
+)
diff --git a/libc/src/math/copysign.cpp b/libc/src/math/generic/copysign.cpp
similarity index 100%
rename from libc/src/math/copysign.cpp
rename to libc/src/math/generic/copysign.cpp
diff --git a/libc/src/math/copysignf.cpp b/libc/src/math/generic/copysignf.cpp
similarity index 100%
rename from libc/src/math/copysignf.cpp
rename to libc/src/math/generic/copysignf.cpp
diff --git a/libc/src/math/copysignl.cpp b/libc/src/math/generic/copysignl.cpp
similarity index 100%
rename from libc/src/math/copysignl.cpp
rename to libc/src/math/generic/copysignl.cpp
diff --git a/libc/src/math/cosf.cpp b/libc/src/math/generic/cosf.cpp
similarity index 100%
rename from libc/src/math/cosf.cpp
rename to libc/src/math/generic/cosf.cpp
diff --git a/libc/src/math/exp2f.cpp b/libc/src/math/generic/exp2f.cpp
similarity index 100%
rename from libc/src/math/exp2f.cpp
rename to libc/src/math/generic/exp2f.cpp
diff --git a/libc/src/math/exp_utils.cpp b/libc/src/math/generic/exp_utils.cpp
similarity index 99%
rename from libc/src/math/exp_utils.cpp
rename to libc/src/math/generic/exp_utils.cpp
index a1bda632c010..9555dd61fb43 100644
--- a/libc/src/math/exp_utils.cpp
+++ b/libc/src/math/generic/exp_utils.cpp
@@ -6,9 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#include "src/math/exp_utils.h"
#include "exp_utils.h"
-
#include "math_utils.h"
namespace __llvm_libc {
diff --git a/libc/src/math/exp_utils.h b/libc/src/math/generic/exp_utils.h
similarity index 100%
rename from libc/src/math/exp_utils.h
rename to libc/src/math/generic/exp_utils.h
diff --git a/libc/src/math/expf.cpp b/libc/src/math/generic/expf.cpp
similarity index 100%
rename from libc/src/math/expf.cpp
rename to libc/src/math/generic/expf.cpp
diff --git a/libc/src/math/fabs.cpp b/libc/src/math/generic/fabs.cpp
similarity index 100%
rename from libc/src/math/fabs.cpp
rename to libc/src/math/generic/fabs.cpp
diff --git a/libc/src/math/fabsf.cpp b/libc/src/math/generic/fabsf.cpp
similarity index 100%
rename from libc/src/math/fabsf.cpp
rename to libc/src/math/generic/fabsf.cpp
diff --git a/libc/src/math/fabsl.cpp b/libc/src/math/generic/fabsl.cpp
similarity index 100%
rename from libc/src/math/fabsl.cpp
rename to libc/src/math/generic/fabsl.cpp
diff --git a/libc/src/math/fdim.cpp b/libc/src/math/generic/fdim.cpp
similarity index 100%
rename from libc/src/math/fdim.cpp
rename to libc/src/math/generic/fdim.cpp
diff --git a/libc/src/math/fdimf.cpp b/libc/src/math/generic/fdimf.cpp
similarity index 100%
rename from libc/src/math/fdimf.cpp
rename to libc/src/math/generic/fdimf.cpp
diff --git a/libc/src/math/fdiml.cpp b/libc/src/math/generic/fdiml.cpp
similarity index 100%
rename from libc/src/math/fdiml.cpp
rename to libc/src/math/generic/fdiml.cpp
diff --git a/libc/src/math/floor.cpp b/libc/src/math/generic/floor.cpp
similarity index 100%
rename from libc/src/math/floor.cpp
rename to libc/src/math/generic/floor.cpp
diff --git a/libc/src/math/floorf.cpp b/libc/src/math/generic/floorf.cpp
similarity index 100%
rename from libc/src/math/floorf.cpp
rename to libc/src/math/generic/floorf.cpp
diff --git a/libc/src/math/floorl.cpp b/libc/src/math/generic/floorl.cpp
similarity index 100%
rename from libc/src/math/floorl.cpp
rename to libc/src/math/generic/floorl.cpp
diff --git a/libc/src/math/fmaf.cpp b/libc/src/math/generic/fmaf.cpp
similarity index 97%
rename from libc/src/math/fmaf.cpp
rename to libc/src/math/generic/fmaf.cpp
index 1ab1906559cf..c2ab7e7c130c 100644
--- a/libc/src/math/fmaf.cpp
+++ b/libc/src/math/generic/fmaf.cpp
@@ -14,7 +14,7 @@
namespace __llvm_libc {
-LLVM_LIBC_FUNCTION(float, fmaf, (float x, float y, float z)){
+LLVM_LIBC_FUNCTION(float, fmaf, (float x, float y, float z)) {
// Product is exact.
double prod = static_cast<double>(x) * static_cast<double>(y);
double z_d = static_cast<double>(z);
diff --git a/libc/src/math/fmax.cpp b/libc/src/math/generic/fmax.cpp
similarity index 100%
rename from libc/src/math/fmax.cpp
rename to libc/src/math/generic/fmax.cpp
diff --git a/libc/src/math/fmaxf.cpp b/libc/src/math/generic/fmaxf.cpp
similarity index 100%
rename from libc/src/math/fmaxf.cpp
rename to libc/src/math/generic/fmaxf.cpp
diff --git a/libc/src/math/fmaxl.cpp b/libc/src/math/generic/fmaxl.cpp
similarity index 100%
rename from libc/src/math/fmaxl.cpp
rename to libc/src/math/generic/fmaxl.cpp
diff --git a/libc/src/math/fmin.cpp b/libc/src/math/generic/fmin.cpp
similarity index 100%
rename from libc/src/math/fmin.cpp
rename to libc/src/math/generic/fmin.cpp
diff --git a/libc/src/math/fminf.cpp b/libc/src/math/generic/fminf.cpp
similarity index 100%
rename from libc/src/math/fminf.cpp
rename to libc/src/math/generic/fminf.cpp
diff --git a/libc/src/math/fminl.cpp b/libc/src/math/generic/fminl.cpp
similarity index 100%
rename from libc/src/math/fminl.cpp
rename to libc/src/math/generic/fminl.cpp
diff --git a/libc/src/math/frexp.cpp b/libc/src/math/generic/frexp.cpp
similarity index 100%
rename from libc/src/math/frexp.cpp
rename to libc/src/math/generic/frexp.cpp
diff --git a/libc/src/math/frexpf.cpp b/libc/src/math/generic/frexpf.cpp
similarity index 100%
rename from libc/src/math/frexpf.cpp
rename to libc/src/math/generic/frexpf.cpp
diff --git a/libc/src/math/frexpl.cpp b/libc/src/math/generic/frexpl.cpp
similarity index 100%
rename from libc/src/math/frexpl.cpp
rename to libc/src/math/generic/frexpl.cpp
diff --git a/libc/src/math/hypot.cpp b/libc/src/math/generic/hypot.cpp
similarity index 100%
rename from libc/src/math/hypot.cpp
rename to libc/src/math/generic/hypot.cpp
diff --git a/libc/src/math/hypotf.cpp b/libc/src/math/generic/hypotf.cpp
similarity index 100%
rename from libc/src/math/hypotf.cpp
rename to libc/src/math/generic/hypotf.cpp
diff --git a/libc/src/math/ilogb.cpp b/libc/src/math/generic/ilogb.cpp
similarity index 100%
rename from libc/src/math/ilogb.cpp
rename to libc/src/math/generic/ilogb.cpp
diff --git a/libc/src/math/ilogbf.cpp b/libc/src/math/generic/ilogbf.cpp
similarity index 100%
rename from libc/src/math/ilogbf.cpp
rename to libc/src/math/generic/ilogbf.cpp
diff --git a/libc/src/math/ilogbl.cpp b/libc/src/math/generic/ilogbl.cpp
similarity index 100%
rename from libc/src/math/ilogbl.cpp
rename to libc/src/math/generic/ilogbl.cpp
diff --git a/libc/src/math/ldexp.cpp b/libc/src/math/generic/ldexp.cpp
similarity index 100%
rename from libc/src/math/ldexp.cpp
rename to libc/src/math/generic/ldexp.cpp
diff --git a/libc/src/math/ldexpf.cpp b/libc/src/math/generic/ldexpf.cpp
similarity index 100%
rename from libc/src/math/ldexpf.cpp
rename to libc/src/math/generic/ldexpf.cpp
diff --git a/libc/src/math/ldexpl.cpp b/libc/src/math/generic/ldexpl.cpp
similarity index 100%
rename from libc/src/math/ldexpl.cpp
rename to libc/src/math/generic/ldexpl.cpp
diff --git a/libc/src/math/llrint.cpp b/libc/src/math/generic/llrint.cpp
similarity index 100%
rename from libc/src/math/llrint.cpp
rename to libc/src/math/generic/llrint.cpp
diff --git a/libc/src/math/llrintf.cpp b/libc/src/math/generic/llrintf.cpp
similarity index 100%
rename from libc/src/math/llrintf.cpp
rename to libc/src/math/generic/llrintf.cpp
diff --git a/libc/src/math/llrintl.cpp b/libc/src/math/generic/llrintl.cpp
similarity index 100%
rename from libc/src/math/llrintl.cpp
rename to libc/src/math/generic/llrintl.cpp
diff --git a/libc/src/math/llround.cpp b/libc/src/math/generic/llround.cpp
similarity index 100%
rename from libc/src/math/llround.cpp
rename to libc/src/math/generic/llround.cpp
diff --git a/libc/src/math/llroundf.cpp b/libc/src/math/generic/llroundf.cpp
similarity index 100%
rename from libc/src/math/llroundf.cpp
rename to libc/src/math/generic/llroundf.cpp
diff --git a/libc/src/math/llroundl.cpp b/libc/src/math/generic/llroundl.cpp
similarity index 100%
rename from libc/src/math/llroundl.cpp
rename to libc/src/math/generic/llroundl.cpp
diff --git a/libc/src/math/logb.cpp b/libc/src/math/generic/logb.cpp
similarity index 100%
rename from libc/src/math/logb.cpp
rename to libc/src/math/generic/logb.cpp
diff --git a/libc/src/math/logbf.cpp b/libc/src/math/generic/logbf.cpp
similarity index 100%
rename from libc/src/math/logbf.cpp
rename to libc/src/math/generic/logbf.cpp
diff --git a/libc/src/math/logbl.cpp b/libc/src/math/generic/logbl.cpp
similarity index 100%
rename from libc/src/math/logbl.cpp
rename to libc/src/math/generic/logbl.cpp
diff --git a/libc/src/math/lrint.cpp b/libc/src/math/generic/lrint.cpp
similarity index 100%
rename from libc/src/math/lrint.cpp
rename to libc/src/math/generic/lrint.cpp
diff --git a/libc/src/math/lrintf.cpp b/libc/src/math/generic/lrintf.cpp
similarity index 100%
rename from libc/src/math/lrintf.cpp
rename to libc/src/math/generic/lrintf.cpp
diff --git a/libc/src/math/lrintl.cpp b/libc/src/math/generic/lrintl.cpp
similarity index 100%
rename from libc/src/math/lrintl.cpp
rename to libc/src/math/generic/lrintl.cpp
diff --git a/libc/src/math/lround.cpp b/libc/src/math/generic/lround.cpp
similarity index 100%
rename from libc/src/math/lround.cpp
rename to libc/src/math/generic/lround.cpp
diff --git a/libc/src/math/lroundf.cpp b/libc/src/math/generic/lroundf.cpp
similarity index 100%
rename from libc/src/math/lroundf.cpp
rename to libc/src/math/generic/lroundf.cpp
diff --git a/libc/src/math/lroundl.cpp b/libc/src/math/generic/lroundl.cpp
similarity index 100%
rename from libc/src/math/lroundl.cpp
rename to libc/src/math/generic/lroundl.cpp
diff --git a/libc/src/math/math_utils.cpp b/libc/src/math/generic/math_utils.cpp
similarity index 96%
rename from libc/src/math/math_utils.cpp
rename to libc/src/math/generic/math_utils.cpp
index b72dc27694c6..42a912bac769 100644
--- a/libc/src/math/math_utils.cpp
+++ b/libc/src/math/generic/math_utils.cpp
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include "src/math/math_utils.h"
#include "math_utils.h"
namespace __llvm_libc {
diff --git a/libc/src/math/math_utils.h b/libc/src/math/generic/math_utils.h
similarity index 100%
rename from libc/src/math/math_utils.h
rename to libc/src/math/generic/math_utils.h
diff --git a/libc/src/math/modf.cpp b/libc/src/math/generic/modf.cpp
similarity index 100%
rename from libc/src/math/modf.cpp
rename to libc/src/math/generic/modf.cpp
diff --git a/libc/src/math/modff.cpp b/libc/src/math/generic/modff.cpp
similarity index 100%
rename from libc/src/math/modff.cpp
rename to libc/src/math/generic/modff.cpp
diff --git a/libc/src/math/modfl.cpp b/libc/src/math/generic/modfl.cpp
similarity index 100%
rename from libc/src/math/modfl.cpp
rename to libc/src/math/generic/modfl.cpp
diff --git a/libc/src/math/nearbyint.cpp b/libc/src/math/generic/nearbyint.cpp
similarity index 100%
rename from libc/src/math/nearbyint.cpp
rename to libc/src/math/generic/nearbyint.cpp
diff --git a/libc/src/math/nearbyintf.cpp b/libc/src/math/generic/nearbyintf.cpp
similarity index 100%
rename from libc/src/math/nearbyintf.cpp
rename to libc/src/math/generic/nearbyintf.cpp
diff --git a/libc/src/math/nearbyintl.cpp b/libc/src/math/generic/nearbyintl.cpp
similarity index 100%
rename from libc/src/math/nearbyintl.cpp
rename to libc/src/math/generic/nearbyintl.cpp
diff --git a/libc/src/math/nextafter.cpp b/libc/src/math/generic/nextafter.cpp
similarity index 100%
rename from libc/src/math/nextafter.cpp
rename to libc/src/math/generic/nextafter.cpp
diff --git a/libc/src/math/nextafterf.cpp b/libc/src/math/generic/nextafterf.cpp
similarity index 100%
rename from libc/src/math/nextafterf.cpp
rename to libc/src/math/generic/nextafterf.cpp
diff --git a/libc/src/math/nextafterl.cpp b/libc/src/math/generic/nextafterl.cpp
similarity index 100%
rename from libc/src/math/nextafterl.cpp
rename to libc/src/math/generic/nextafterl.cpp
diff --git a/libc/src/math/remainder.cpp b/libc/src/math/generic/remainder.cpp
similarity index 100%
rename from libc/src/math/remainder.cpp
rename to libc/src/math/generic/remainder.cpp
diff --git a/libc/src/math/remainderf.cpp b/libc/src/math/generic/remainderf.cpp
similarity index 100%
rename from libc/src/math/remainderf.cpp
rename to libc/src/math/generic/remainderf.cpp
diff --git a/libc/src/math/remainderl.cpp b/libc/src/math/generic/remainderl.cpp
similarity index 100%
rename from libc/src/math/remainderl.cpp
rename to libc/src/math/generic/remainderl.cpp
diff --git a/libc/src/math/remquo.cpp b/libc/src/math/generic/remquo.cpp
similarity index 100%
rename from libc/src/math/remquo.cpp
rename to libc/src/math/generic/remquo.cpp
diff --git a/libc/src/math/remquof.cpp b/libc/src/math/generic/remquof.cpp
similarity index 100%
rename from libc/src/math/remquof.cpp
rename to libc/src/math/generic/remquof.cpp
diff --git a/libc/src/math/remquol.cpp b/libc/src/math/generic/remquol.cpp
similarity index 100%
rename from libc/src/math/remquol.cpp
rename to libc/src/math/generic/remquol.cpp
diff --git a/libc/src/math/rint.cpp b/libc/src/math/generic/rint.cpp
similarity index 100%
rename from libc/src/math/rint.cpp
rename to libc/src/math/generic/rint.cpp
diff --git a/libc/src/math/rintf.cpp b/libc/src/math/generic/rintf.cpp
similarity index 100%
rename from libc/src/math/rintf.cpp
rename to libc/src/math/generic/rintf.cpp
diff --git a/libc/src/math/rintl.cpp b/libc/src/math/generic/rintl.cpp
similarity index 100%
rename from libc/src/math/rintl.cpp
rename to libc/src/math/generic/rintl.cpp
diff --git a/libc/src/math/round.cpp b/libc/src/math/generic/round.cpp
similarity index 100%
rename from libc/src/math/round.cpp
rename to libc/src/math/generic/round.cpp
diff --git a/libc/src/math/roundf.cpp b/libc/src/math/generic/roundf.cpp
similarity index 100%
rename from libc/src/math/roundf.cpp
rename to libc/src/math/generic/roundf.cpp
diff --git a/libc/src/math/roundl.cpp b/libc/src/math/generic/roundl.cpp
similarity index 100%
rename from libc/src/math/roundl.cpp
rename to libc/src/math/generic/roundl.cpp
diff --git a/libc/src/math/sincosf.cpp b/libc/src/math/generic/sincosf.cpp
similarity index 100%
rename from libc/src/math/sincosf.cpp
rename to libc/src/math/generic/sincosf.cpp
diff --git a/libc/src/math/sincosf_data.cpp b/libc/src/math/generic/sincosf_data.cpp
similarity index 100%
rename from libc/src/math/sincosf_data.cpp
rename to libc/src/math/generic/sincosf_data.cpp
diff --git a/libc/src/math/sincosf_utils.h b/libc/src/math/generic/sincosf_utils.h
similarity index 100%
rename from libc/src/math/sincosf_utils.h
rename to libc/src/math/generic/sincosf_utils.h
diff --git a/libc/src/math/sinf.cpp b/libc/src/math/generic/sinf.cpp
similarity index 100%
rename from libc/src/math/sinf.cpp
rename to libc/src/math/generic/sinf.cpp
diff --git a/libc/src/math/sqrt.cpp b/libc/src/math/generic/sqrt.cpp
similarity index 100%
rename from libc/src/math/sqrt.cpp
rename to libc/src/math/generic/sqrt.cpp
diff --git a/libc/src/math/sqrtf.cpp b/libc/src/math/generic/sqrtf.cpp
similarity index 100%
rename from libc/src/math/sqrtf.cpp
rename to libc/src/math/generic/sqrtf.cpp
diff --git a/libc/src/math/sqrtl.cpp b/libc/src/math/generic/sqrtl.cpp
similarity index 100%
rename from libc/src/math/sqrtl.cpp
rename to libc/src/math/generic/sqrtl.cpp
diff --git a/libc/src/math/trunc.cpp b/libc/src/math/generic/trunc.cpp
similarity index 100%
rename from libc/src/math/trunc.cpp
rename to libc/src/math/generic/trunc.cpp
diff --git a/libc/src/math/truncf.cpp b/libc/src/math/generic/truncf.cpp
similarity index 100%
rename from libc/src/math/truncf.cpp
rename to libc/src/math/generic/truncf.cpp
diff --git a/libc/src/math/truncl.cpp b/libc/src/math/generic/truncl.cpp
similarity index 100%
rename from libc/src/math/truncl.cpp
rename to libc/src/math/generic/truncl.cpp
More information about the libc-commits
mailing list