-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement fixed point countls functions in llvm-libc #113357
Comments
@llvm/issue-subscribers-libc Author: None (PiJoules)
Some fixed point functions from ISO 18037 are implemented in llvm-libc, but not all of them are implemented. The various `countls` should also be added. Copying from the extension:
This effectively returns the number of leading sign bits. These can first be implemented as |
Hi! This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below. |
@llvm/issue-subscribers-good-first-issue Author: None (PiJoules)
Some fixed point functions from ISO 18037 are implemented in llvm-libc, but not all of them are implemented. The various `countls` should also be added. Copying from the extension:
This effectively returns the number of leading sign bits. These can first be implemented as |
I'll implement this! Please assign. |
@PiJoules Are we sure we want to implement these as clang builtins? Isn't that bad for portability? We wouldn't be able to build llvm-libc using an alternative compiler like GCC for instance... https://libc.llvm.org/compiler_support.html Sorry if this is a dumb question. It's my first contribution to LLVM. |
Currently generic versions of gcc do not support fixed point types. OTOH, since C23 defines many count / bit functions for unsigned integers under the names: Also we probably should post a RFC on LLVM discourse to consult with some C language standard people about modernizing the name of |
I'd also support the Thanks for taking this on also! |
@duncpro deleted the original attempt at a fix, so marking this as unassigned so that someone else can pick up the effort. |
hi @erichkeane i would like to work on this |
Great! Let us know if you need help along the way, and let us know when you've posted a patch. |
fixes #113357 --------- Signed-off-by: krishna2803 <[email protected]>
fixes llvm#113357 --------- Signed-off-by: krishna2803 <[email protected]>
fixes llvm#113357 --------- Signed-off-by: krishna2803 <[email protected]>
fixes llvm#113357 --------- Signed-off-by: krishna2803 <[email protected]>
fixes llvm#113357 --------- Signed-off-by: krishna2803 <[email protected]>
fixes llvm#113357 --------- Signed-off-by: krishna2803 <[email protected]>
Some fixed point functions from ISO 18037 are implemented in llvm-libc, but not all of them are implemented. The various countls
fx
functions should also be added. Copying from the extension:This effectively returns the number of leading sign bits. These can first be implemented as
__builtin_*
functions in clang then llvm-libc can provide thecountlsfx
wrappers for each of the builtin functions.The text was updated successfully, but these errors were encountered: