-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[compiler-rt][ARM] Add missing PACBTI support to assembly aeabi functions #142400
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
…ions Some of the aeabi functions were missing PACBTI support. The lack of it resulted in exceptions at runtime if the running environment had PAC and/or BTI enabled. This patch adds this support.
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.
If I've understood the rtabi correctly I think we're not allowed to corrupt r0 in the 3-way comparison routines, which it looks like we're doing in a couple of cases.
The rest looks good to me. There could be a case for adding some closing comments to the #else and #endif as nested ones can be awkward to figure out. Although in this case they are always the innermost ones.
The other possibility I thought about was to have a macro that conditionally expanded to , r12
or nothing depending on whether PAC was being used. That could be used in the save list for push, however I don't think there's any precedent for that in compiler-rt so it's probably not a good idea.
I also thought of that, however the register list argument for push and pop must be in order, therefore |
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.
Thanks for the update. I think I've spotted a way to get closer to the original code, but I could have missed something.
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 thanks for the updates. I don't have any more comments.
…ions (llvm#142400) Some of the aeabi functions were missing PACBTI support. The lack of it resulted in exceptions at runtime if the running environment had PAC and/or BTI enabled. This patch adds this support. This involves the addition of PACBTI instructions, depending on whether each of these features is enabled, plus the saving and restoring of the PAC code that resides in r12. Some of the common code has been put in preprocessor macros to reduce duplication, but not all, especially since some register saving and restoring is very specific to each context.
…ions (llvm#142400) Some of the aeabi functions were missing PACBTI support. The lack of it resulted in exceptions at runtime if the running environment had PAC and/or BTI enabled. This patch adds this support. This involves the addition of PACBTI instructions, depending on whether each of these features is enabled, plus the saving and restoring of the PAC code that resides in r12. Some of the common code has been put in preprocessor macros to reduce duplication, but not all, especially since some register saving and restoring is very specific to each context.
Some of the aeabi functions were missing PACBTI support. The lack of it resulted in exceptions at runtime if the running environment had PAC and/or BTI enabled.
This patch adds this support. This involves the addition of PACBTI instructions, depending on whether each of these features is enabled, plus the saving and restoring of the PAC code that resides in r12. Some of the common code has been put in preprocessor macros to reduce duplication, but not all, especially since some register saving and restoring is very specific to each context.