[PATCH] D153774: [ARM] Generate out-of-line jump tables for XO without 32-bit branch
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 27 12:21:56 PDT 2023
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
Oh, I didn't remember JUMPTABLE_INSTS was a thing. This is making more sense now; Thumb2/armv8m.base defaults to jumping to a table of jumps, which works fine with execute-only, but Thumb1 (and apparently ARM-mode) loads offsets from a table instead, which doesn't work with execute-only. So to make Thumb1 work, you force the table to be emitted out-of-line.
That makes sense, but depending how much we care, there are probably better sequences. We can use "bl" as a 32-bit branch on Thumb1, like we do in other places. And we can then compress those 32-bit branches to 16-bit branches if the offsets aren't too big.
If you just care about getting it working, this is okay as-is. LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153774/new/
https://reviews.llvm.org/D153774
More information about the llvm-commits
mailing list