-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
clang:headersHeaders provided by Clang, e.g. for intrinsicsHeaders provided by Clang, e.g. for intrinsicsgood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributelibc
Description
Some fixed point functions from ISO 18037 are implemented in llvm-libc, but not all of them are implemented. The various fxbits functions should also be added. Copying from the extension:
4.1.7.5 The bitwise integer to fixed-point conversion functions
The bitwise integer to fixed-point conversion functions fxbits, where fx stands for one of hr, r, lr, hk, k, lk, uhr, ur, ulr, uhk, uk or ulk, take one argument with type int_fx_t or uint_fx_t, the result type is a fixed-point type (corresponding to fx).
The bitwise fixed-point to integer conversion functions return an fixed-point value equal to the integer value of the argument divided by 2^F, where F is the number of fractional bits in the fixedpoint result type of the function. For example, if fract has 15 fractional bits, then the value of rbits(0x2000) is 0.25.
These can first be implemented as __builtin_* functions in clang then llvm-libc can provide the wrappers for each of the builtin functions.
Metadata
Metadata
Assignees
Labels
clang:headersHeaders provided by Clang, e.g. for intrinsicsHeaders provided by Clang, e.g. for intrinsicsgood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contributelibc