[libc][NFC] Add ceil[f], floor[f] and trunc[f] to the spec and config files.
GitOrigin-RevId: b28167928d2722e8774da3fce8b3307a0fa27245
diff --git a/config/linux/api.td b/config/linux/api.td
index d45be84..4259fd7 100644
--- a/config/linux/api.td
+++ b/config/linux/api.td
@@ -149,14 +149,20 @@
FloatT,
];
let Functions = [
+ "ceil",
+ "ceilf",
"cosf",
"fabs",
"fabsf",
+ "floor",
+ "floorf",
"expf",
"exp2f",
"round",
"sincosf",
"sinf",
+ "trunc",
+ "truncf",
];
}
diff --git a/config/linux/x86_64/entrypoints.txt b/config/linux/x86_64/entrypoints.txt
index 2f79d7f..54fe783 100644
--- a/config/linux/x86_64/entrypoints.txt
+++ b/config/linux/x86_64/entrypoints.txt
@@ -42,8 +42,16 @@
set(LIBM_ENTRYPOINTS
# math.h entrypoints
+ libc.src.math.ceil
+ libc.src.math.ceilf
libc.src.math.cosf
+ libc.src.math.expf
+ libc.src.math.exp2f
+ libc.src.math.floor
+ libc.src.math.floorf
libc.src.math.round
libc.src.math.sincosf
libc.src.math.sinf
-)
\ No newline at end of file
+ libc.src.math.trunc
+ libc.src.math.truncf
+)
diff --git a/spec/stdc.td b/spec/stdc.td
index 4e6bfbf..077dc21 100644
--- a/spec/stdc.td
+++ b/spec/stdc.td
@@ -187,9 +187,15 @@
],
[], // Enumerations
[
+ FunctionSpec<"ceil", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
+ FunctionSpec<"ceilf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
+
FunctionSpec<"fabs", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
FunctionSpec<"fabsf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
+ FunctionSpec<"floor", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
+ FunctionSpec<"floorf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
+
FunctionSpec<"cosf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
FunctionSpec<"sinf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
@@ -197,6 +203,9 @@
FunctionSpec<"exp2f", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
FunctionSpec<"round", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
+
+ FunctionSpec<"trunc", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
+ FunctionSpec<"truncf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
]
>;