[libc][NFC] Add ceil[f], floor[f] and trunc[f] to the spec and config files.

This commit is contained in:
Siva Chandra Reddy 2020-06-03 22:39:34 -07:00
parent 1a2d4bf34e
commit b28167928d
3 changed files with 24 additions and 1 deletions

View File

@ -149,14 +149,20 @@ def MathAPI : PublicAPI<"math.h"> {
FloatT,
];
let Functions = [
"ceil",
"ceilf",
"cosf",
"fabs",
"fabsf",
"floor",
"floorf",
"expf",
"exp2f",
"round",
"sincosf",
"sinf",
"trunc",
"truncf",
];
}

View File

@ -42,8 +42,16 @@ set(LIBC_ENTRYPOINTS
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
)
libc.src.math.trunc
libc.src.math.truncf
)

View File

@ -187,9 +187,15 @@ def StdC : StandardSpec<"stdc"> {
],
[], // 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 @@ def StdC : StandardSpec<"stdc"> {
FunctionSpec<"exp2f", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
FunctionSpec<"round", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
FunctionSpec<"trunc", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
FunctionSpec<"truncf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
]
>;