[PATCH] D109129: [ARM] Fix operands of `Int_eh_sjlj_longjmp`

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 14 15:03:03 PDT 2021


efriedma added a comment.

The general approach here seems fine.



================
Comment at: llvm/lib/Target/ARM/ARMInstrInfo.td:5910
 
 // FIXME: Non-IOS version(s)
 let isBarrier = 1, hasSideEffects = 1, isTerminator = 1,
----------------
I think this addresses the FIXME.  Add a comment noting that we're intentionally not defining separate versions of this instruction based on the frame pointer register.


================
Comment at: llvm/lib/Target/ARM/ARMRegisterInfo.td:258
+// GPRs without potential FPs.  Used by eh_sjlj_longjmp().
+def GPRnofp : RegisterClass<"ARM", [i32], 32, (sub GPR, R7, R11)> {
+  let AltOrders = [(add LR, GPRnofp), (trunc GPRnofp, 7),
----------------
Maybe `(sub GPR, R7, R11, PC)`?  Probably doesn't have any practical effect, but just in case.


================
Comment at: llvm/test/CodeGen/Thumb/high-reg-clobber.mir:47
     %1:hgpr = COPY %2
     INLINEASM &"mov r12, $0", 1 /* sideeffect attdialect */, 1048585 /* reguse:hGPR */, %1, 12 /* clobber */, implicit-def early-clobber $r12
     tBX_RET 14 /* CC::al */, $noreg
----------------
Please fix the number "1048585" to actually refer to the intended register class: hGPR.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109129/new/

https://reviews.llvm.org/D109129



More information about the llvm-commits mailing list