[PATCH] ARM: Fix TPsoft for Thumb mode

Christian Pirker cpirker at a-bix.com
Tue Jun 24 07:59:25 PDT 2014


================
Comment at: lib/Target/ARM/ARMExpandPseudoInsts.cpp:934
@@ +933,3 @@
+                       TII->get( ARM::tBL))
+               .addImm((unsigned)ARMCC::AL).addReg(0)
+               .addExternalSymbol("__aeabi_read_tp", 0);
----------------
Renato Golin wrote:
> Is this to cope with IT blocks?
Yes, ARMCC::AL marks an unconditional branch.

================
Comment at: lib/Target/ARM/ARMInstrInfo.td:5118
@@ +5117,3 @@
+// is defined in "ARMInstrThumb.td".
+let Predicates = [IsARM] in {
+  let isCall = 1,
----------------
Renato Golin wrote:
> Is this really necessary? I'd have thought that everything in here is ARM anyway, plus the instruction is different (tTPsoft instead of TPsoft).
This pattern matches both in ARM and Thumb mode.
This predicate makes LLVM to match the tTPsoft pattern in Thumb mode.
I can change "PseudoInst" to "ARMPseudoInst" so that the predicate can be omitted, what you think?

http://reviews.llvm.org/D4230






More information about the llvm-commits mailing list