[libc] Move fma and fmaf into generic dir
authorAlex Brachet <abrachet@google.com>
Thu, 23 Mar 2023 18:43:09 +0000 (18:43 +0000)
committerAlex Brachet <abrachet@google.com>
Thu, 23 Mar 2023 18:43:09 +0000 (18:43 +0000)
Differential Revision: https://reviews.llvm.org/D146740

libc/src/math/CMakeLists.txt
libc/src/math/generic/CMakeLists.txt
libc/src/math/generic/fma.cpp [moved from libc/src/math/fma.cpp with 100% similarity]
libc/src/math/generic/fmaf.cpp [moved from libc/src/math/fmaf.cpp with 100% similarity]

index 78bab46..bc9a5d7 100644 (file)
@@ -40,30 +40,6 @@ function(add_math_entrypoint_object name)
   )
 endfunction()
 
-add_entrypoint_object(
-  fmaf
-  SRCS
-    fmaf.cpp
-  HDRS
-    fmaf.h
-  DEPENDS
-    libc.src.__support.FPUtil.fma
-  COMPILE_OPTIONS
-    -O3
-)
-
-add_entrypoint_object(
-  fma
-  SRCS
-    fma.cpp
-  HDRS
-    fma.h
-  DEPENDS
-    libc.src.__support.FPUtil.fma
-  COMPILE_OPTIONS
-    -O3
-)
-
 add_math_entrypoint_object(acosf)
 add_math_entrypoint_object(acoshf)
 
@@ -107,6 +83,9 @@ add_math_entrypoint_object(floor)
 add_math_entrypoint_object(floorf)
 add_math_entrypoint_object(floorl)
 
+add_math_entrypoint_object(fma)
+add_math_entrypoint_object(fmaf)
+
 add_math_entrypoint_object(fmax)
 add_math_entrypoint_object(fmaxf)
 add_math_entrypoint_object(fmaxl)
index 09aefc6..9fe0fce 100644 (file)
@@ -1491,3 +1491,27 @@ add_entrypoint_object(
   COMPILE_OPTIONS
     -O3
 )
+
+add_entrypoint_object(
+  fmaf
+  SRCS
+    fmaf.cpp
+  HDRS
+    ../fmaf.h
+  DEPENDS
+    libc.src.__support.FPUtil.fma
+  COMPILE_OPTIONS
+    -O3
+)
+
+add_entrypoint_object(
+  fma
+  SRCS
+    fma.cpp
+  HDRS
+    ../fma.h
+  DEPENDS
+    libc.src.__support.FPUtil.fma
+  COMPILE_OPTIONS
+    -O3
+)