This patch implements jump tables for RISC-V so that CFI-icall can be enabled for it.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Ping?
The build failure is due to the name of the newly introduced kRISCVJumpTableEntrySize. Though I think we can put these magic numbers (4 and 8) just into LowerTypeTestsModule::getJumpTableEntrySize..
Good question. I had checked that the AArch64 implementation had included a test, but I think that was only for new target-specific stuff, which doesn't apply here. So I was assuming the answer was no, but it would be good to get confirmation. I was also confused by the comment about "the build failure", since this applied cleanly and built OK for me when I looked at it.
Hi, you can check here: https://buildkite.com/llvm-project/premerge-checks/builds/49755#814fd222-2e5a-4400-824d-d1a1f1293c01
The clang-tidy failed due to the invalid case style for variable 'kRISCVJumpTableEntrySize'.
We can ignore the lint check failure. The new constant follows the same style as the existing ones.
Add tests as suggested.
Use tail xxx@plt instruction instead of manually auipc + jr, which eliminates issues when linking dynamically-linked executables.
Thanks! I don't have commit access, so could you please commit on my behalf when appropriate? Wende Tan <twd2.me@gmail.com>