[llvm-commits] Fix ARM instruction LDMIA_RET
Bruno Cardoso Lopes
bruno.cardoso at gmail.com
Thu May 26 12:08:51 PDT 2011
Hi Daniel,
On Thu, May 26, 2011 at 3:37 PM, Danil Malyshev
<dmalyshev at accesssoftek.com> wrote:
> Hello everyone,
>
>> Do you have a simple test (ll -> s) to add?
>
> The updated patch with a regress test is attached.
> The test checks how LDMIA_RET actually gets emitted.
There seems to be a misunderstanding here, if you look at ARMAsmPrinter.cpp:
case ARM::LDMIA_RET: {
// LDMIA_RET is just a normal LDMIA_UPD instruction that targets PC and as
// such has additional code-gen properties and scheduling information.
// To emit it, we just construct as normal and set the opcode to LDMIA_UPD.
MCInst TmpInst;
LowerARMMachineInstrToMCInst(MI, TmpInst, *this);
TmpInst.setOpcode(ARM::LDMIA_UPD);
OutStreamer.EmitInstruction(TmpInst);
return;
}
This is right, because you want for RET a LDMIA_UPD instead of LDMIA
That is probably why you see a wrong encoding, right? Or did I miss something?
--
Bruno Cardoso Lopes
http://www.brunocardoso.cc
More information about the llvm-commits
mailing list