This patch implements the definition of __ARM_FEATURE_RCPC when clang commands specifies +rcpc.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The patch looks correct to me, but looking at https://github.com/ARM-software/acle/blob/main/main/acle.md where all the ACLE macros are defined, I'm not sure that __ARM_FEATURE_RCPC is there currently. Maybe you also want to submit a patch there, or at least explain the context of this change please?
thanks for taking a look!
Before this patch, there is a piece of inline assembly like [1] that uses LDAPR and guarded by #if defined(__aarch64__). Since not all aarch64 platforms support LDAPR, we want to further guard the usage of LDAPR by MACRO __ARM_FEATURE_RCPC. May I know if there are alternatives for this use case, if introducing __ARM_FEATURE_RCPC sounds ad-hoc?
I'm glad to send a patch to add __ARM_FEATURE_RCPC to https://github.com/ARM-software/acle/blob/main/main/acle.md if it's conventional to do so. Just let me know your suggestions!
[1]
add x6, x1, x4 ldapr x5, [x6]
Yes. Please submit a PR or Issue to the ACLE, explaining the use-case (the explanation here is good enough, I think).
Once the ACLE changes are merged, then you can proceed with a patch for clang.
This makes sense to me. I created https://github.com/ARM-software/acle/pull/199, yet not able to add reviewer (which is WAI since I don't have write permission).
In clang/test/Preprocessor/aarch64-target-features.c, move __ARM_FEATURE_RCPC to keep the alphabetical list, and use -target=aarch64.. (the join style) rather than legacy while-space separated style (key value).
change from -target=aarch64-none-linux-gnu to --target=aarch64-none-linux-gnu to resolve a compile error.
Verified no other compilation error by ninja check-all
Use --target=aarch64 rather than --target=aarch64-unknown-linux-gnu, given the former means all ELF based operating systems can expect the feature. (thanks maskray@ for pointing it out!)
It has been a while since this patch was updated, rebase for review now that the Github PR was accepted.
Hi folks,
The ARM ACLE PR (https://github.com/ARM-software/acle/pull/199) was accepted. Would you take another look of this patch at your convenience? Thanks!
The list is alphabetical. RCPC should be moved below.