diff options
author | Jim Grosbach <grosbach@apple.com> | 2011-06-30 17:34:04 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2011-06-30 17:34:04 +0000 |
commit | 417671a7b1f785f92362b8fd1dc9c8ec59bc51a6 (patch) | |
tree | 6f50f85db2ce55b9482cfc4c72a24089077789fb /llvm/lib/Target | |
parent | de7a9c2415205846dc28077d0d6ca4fa9b222fc8 (diff) | |
download | bcm5719-llvm-417671a7b1f785f92362b8fd1dc9c8ec59bc51a6.tar.gz bcm5719-llvm-417671a7b1f785f92362b8fd1dc9c8ec59bc51a6.zip |
Pseudo-ize the Thumb tPOP_RET instruction.
It's just a tPOP instruction with additional code-gen properties, so it
doesn't need encoding information.
llvm-svn: 134172
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/ARM/ARMAsmPrinter.cpp | 8 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMInstrThumb.td | 11 |
2 files changed, 10 insertions, 9 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp index 40595605482..1975c6da9fe 100644 --- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp @@ -1096,6 +1096,14 @@ void ARMAsmPrinter::EmitInstruction(const MachineInstr *MI) { OutStreamer.EmitInstruction(TmpInst); return; } + case ARM::tPOP_RET: { + // As above for LDMIA_RET. Map to the tPOP instruction. + MCInst TmpInst; + LowerARMMachineInstrToMCInst(MI, TmpInst, *this); + TmpInst.setOpcode(ARM::tPOP); + OutStreamer.EmitInstruction(TmpInst); + return; + } case ARM::t2MOVi32imm: assert(0 && "Should be lowered by thumb2it pass"); case ARM::DBG_VALUE: { diff --git a/llvm/lib/Target/ARM/ARMInstrThumb.td b/llvm/lib/Target/ARM/ARMInstrThumb.td index 735f3e934ea..bb261ec1711 100644 --- a/llvm/lib/Target/ARM/ARMInstrThumb.td +++ b/llvm/lib/Target/ARM/ARMInstrThumb.td @@ -408,15 +408,8 @@ let isBranch = 1, isTerminator = 1, isBarrier = 1, isIndirectBranch = 1 in { // FIXME: remove when we have a way to marking a MI with these properties. let isReturn = 1, isTerminator = 1, isBarrier = 1, mayLoad = 1, hasExtraDefRegAllocReq = 1 in -def tPOP_RET : T1I<(outs), (ins pred:$p, reglist:$regs, variable_ops), - IIC_iPop_Br, - "pop${p}\t$regs", []>, - T1Misc<{1,1,0,?,?,?,?}> { - // A8.6.121 - bits<16> regs; - let Inst{8} = regs{15}; // registers = P:'0000000':register_list - let Inst{7-0} = regs{7-0}; -} +def tPOP_RET : tPseudoInst<(outs), (ins pred:$p, reglist:$regs, variable_ops), + Size4Bytes, IIC_iPop_Br, []>; // All calls clobber the non-callee saved registers. SP is marked as a use to // prevent stack-pointer assignments that appear immediately before calls from |