[PATCH] D153774: [ARM] Generate out-of-line jump tables for XO without 32-bit branch

John Brawn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 05:24:56 PDT 2023


john.brawn added a comment.

In D153774#4449785 <https://reviews.llvm.org/D153774#4449785>, @efriedma wrote:

> I'd prefer if the Thumb1 and Thumb2 codepaths work as close to the same way as possible; this looks significantly different.  (Thumb2 execute-only has basically the same issues as Thumb1 execute-only, as far as I can tell; we only get away with "loading" from the text segment if we can form tbb/tbh.)

The thumb1 and thumb2 handling of jump tables is already different, and the only difference of execute-only thumb1 from non-execute-only is the location of the jump table (inline vs out-of-line).

> (Do we care about execute-only PIC?)

No.



================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:3498
+  // execute-only it must be placed out-of-line.
+  if (Subtarget->genExecuteOnly() && !Subtarget->hasV8MBaselineOps())
+    return MachineJumpTableInfo::EK_BlockAddress;
----------------
efriedma wrote:
> What relevant instructions does v8m.base have?
t2B, the 32-bit direct branch instruction.


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