Skip to content
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

Fix forced integer to bitmap casts #79

Merged
merged 2 commits into from
Aug 22, 2023
Merged

Fix forced integer to bitmap casts #79

merged 2 commits into from
Aug 22, 2023

Conversation

josecm
Copy link
Member

@josecm josecm commented Jul 25, 2023

In order to use some of the operations defined for the bitmap_t* type, some functions were casting integer types pointers to bitmap_t*. This is not the best practice and was causing some issues with the latest GCC versions, as pointed out in #78.

This PR fixes this issue by refactoring these operations using simple bit manipulation functions available in bit/util/bit.h. However, it was still needed to add the bit_ffs and bit_count functions so that all functionality needed was available.

Signed-off-by: Jose Martins <josemartins90@gmail.com>
Signed-off-by: Jose Martins <josemartins90@gmail.com>
@ninolomata
Copy link
Member

ninolomata commented Jul 28, 2023

Just tested on RISC-V in QEMU and issue #78 is fixed.

@josecm
Copy link
Member Author

josecm commented Aug 15, 2023

@DavidMCerdeira

@danielRep danielRep self-assigned this Aug 22, 2023
@danielRep danielRep merged commit 291cac3 into main Aug 22, 2023
@danielRep danielRep deleted the fix/bitmap_casts branch August 22, 2023 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants