diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel --- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel @@ -477,6 +477,21 @@ ], ) +libc_support_library( + name = "__support_fputil_generic_fmod", + hdrs = ["src/__support/FPUtil/generic/FMod.h"], + deps = [ + ":__support_builtin_wrappers", + ":__support_common", + ":__support_cpp_limits", + ":__support_cpp_type_traits", + ":__support_fputil_fp_bits", + ":__support_fputil_fenv_impl", + ":libc_root", + ":math_utils", + ], +) + libc_support_library( name = "__support_fputil_division_and_remainder_operations", hdrs = ["src/__support/FPUtil/DivisionAndRemainderOperations.h"], @@ -1427,6 +1442,20 @@ libc_math_function(name = "roundl") +libc_math_function( + name = "fmod", + additional_deps = [ + ":__support_fputil_generic_fmod", + ], +) + +libc_math_function( + name = "fmodf", + additional_deps = [ + ":__support_fputil_generic_fmod", + ], +) + libc_math_function(name = "frexp") libc_math_function(name = "frexpf") @@ -1602,6 +1631,12 @@ libc_math_function(name = "nextafterl") +libc_math_function(name = "scalbn") + +libc_math_function(name = "scalbnf") + +libc_math_function(name = "scalbnl") + ############################### stdlib targets ############################### libc_function( diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel --- a/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel @@ -733,3 +733,37 @@ "//libc/utils/MPFRWrapper:mpfr_wrapper", ], ) + +math_test( + name = "fmod", + hdrs = ["FModTest.h"] +) + +math_test( + name = "fmodf", + hdrs = ["FModTest.h"] +) + +math_test( + name = "scalbn", + hdrs = [ + "LdExpTest.h", + "ScalbnTest.h" + ], +) + +math_test( + name = "scalbnf", + hdrs = [ + "LdExpTest.h", + "ScalbnTest.h" + ], +) + +math_test( + name = "scalbnl", + hdrs = [ + "LdExpTest.h", + "ScalbnTest.h" + ], +)