Skip to content

Commit aaf758c

Browse files
author
Siva Chandra Reddy
committed
[libc][bazel] Add targets for fmod* and scalbn*.
Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D151354
1 parent 99a493e commit aaf758c

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

utils/bazel/llvm-project-overlay/libc/BUILD.bazel

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,21 @@ libc_support_library(
477477
],
478478
)
479479

480+
libc_support_library(
481+
name = "__support_fputil_generic_fmod",
482+
hdrs = ["src/__support/FPUtil/generic/FMod.h"],
483+
deps = [
484+
":__support_builtin_wrappers",
485+
":__support_common",
486+
":__support_cpp_limits",
487+
":__support_cpp_type_traits",
488+
":__support_fputil_fp_bits",
489+
":__support_fputil_fenv_impl",
490+
":libc_root",
491+
":math_utils",
492+
],
493+
)
494+
480495
libc_support_library(
481496
name = "__support_fputil_division_and_remainder_operations",
482497
hdrs = ["src/__support/FPUtil/DivisionAndRemainderOperations.h"],
@@ -1427,6 +1442,20 @@ libc_math_function(
14271442

14281443
libc_math_function(name = "roundl")
14291444

1445+
libc_math_function(
1446+
name = "fmod",
1447+
additional_deps = [
1448+
":__support_fputil_generic_fmod",
1449+
],
1450+
)
1451+
1452+
libc_math_function(
1453+
name = "fmodf",
1454+
additional_deps = [
1455+
":__support_fputil_generic_fmod",
1456+
],
1457+
)
1458+
14301459
libc_math_function(name = "frexp")
14311460

14321461
libc_math_function(name = "frexpf")
@@ -1602,6 +1631,12 @@ libc_math_function(name = "nextafterf")
16021631

16031632
libc_math_function(name = "nextafterl")
16041633

1634+
libc_math_function(name = "scalbn")
1635+
1636+
libc_math_function(name = "scalbnf")
1637+
1638+
libc_math_function(name = "scalbnl")
1639+
16051640
############################### stdlib targets ###############################
16061641

16071642
libc_function(

utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,3 +733,37 @@ math_test(
733733
"//libc/utils/MPFRWrapper:mpfr_wrapper",
734734
],
735735
)
736+
737+
math_test(
738+
name = "fmod",
739+
hdrs = ["FModTest.h"]
740+
)
741+
742+
math_test(
743+
name = "fmodf",
744+
hdrs = ["FModTest.h"]
745+
)
746+
747+
math_test(
748+
name = "scalbn",
749+
hdrs = [
750+
"LdExpTest.h",
751+
"ScalbnTest.h"
752+
],
753+
)
754+
755+
math_test(
756+
name = "scalbnf",
757+
hdrs = [
758+
"LdExpTest.h",
759+
"ScalbnTest.h"
760+
],
761+
)
762+
763+
math_test(
764+
name = "scalbnl",
765+
hdrs = [
766+
"LdExpTest.h",
767+
"ScalbnTest.h"
768+
],
769+
)

0 commit comments

Comments
 (0)