-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[RISCV][compiler-rt] Small fixes for __riscv_feature_bits #100158
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
Conversation
Changes included: * Adding CONSTRUCTOR_ATTRIBUTE so that the static data is setup early on in process lifetime. This is required by gcc docs for __builtin_cpu_supports which we hope to implement in terms of this. * Move the length initialization outside of the #if defined(__linux__) block so that the length field always reflects the size of the structures even if non of the feature bits are non-zero. * Change the __riscv_vendor_feature_bits.length field to match the length of the actual structure. Note that this change has not been built or tested. I could not figure out how to get a working cross build for compiler-rt setup.
After moving to cpu_model directory, compiler-rt could build successfully. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
JFYI, since this seems to be textually the same as the final iteration on my review, I'm going to treat you posting this as an approval on that one. I don't care which one lands. I'm about to run out for an errand, and if this hasn't landed by the time I take another look this afternoon I'll land one or the other.
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/2033 Here is the relevant piece of the build log for the reference:
|
Summary: Changes included: - Adding CONSTRUCTOR_ATTRIBUTE so that the static data is setup early on in process lifetime. This is required by gcc docs for __builtin_cpu_supports which we hope to implement in terms of this. - Move the length initialization outside of the #if defined(linux) block so that the length field always reflects the size of the structures even if non of the feature bits are non-zero. - Change the __riscv_vendor_feature_bits.length field to match the length of the actual structure. Note: Copy from #99958 --------- Co-authored-by: Philip Reames <[email protected]> Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250767
Changes included:
Note: Copy from #99958