[PATCH] Change llvm-objdump to print (bad) for invalid instructions
Stephen Checkoway
s at pahtak.org
Wed Oct 16 11:49:23 PDT 2013
On Oct 16, 2013, at 2:25 PM, Stephen Checkoway <s at pahtak.org> wrote:
>
> On Oct 16, 2013, at 2:05 PM, Jim Grosbach <grosbach at apple.com> wrote:
>
>> I don’t think you want to always set the size to ‘1’ here. Won’t that result in mis-aligned instruction decoding for fixed-width instruction sets?
>
>
> That's a good point and there's a similar issue in MCObjectDisassemble.cpp. I wasn't sure if DisAsm::getInstruction() would set Size if it returns false but, looking closer at the code, I think it does.
>
> I'll fix this and also the MCObjectDisassembler patch I sent a little while ago that Rafael said he was going to look at.
Attached.
If you get a moment to look at the MCInstrAnalysis::evaluateBranch() patch and suggest the correct way to fix it, that'd be great.
--
Stephen Checkoway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-objdump-invalid-opcode.diff
Type: application/octet-stream
Size: 2341 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131016/919c9fe4/attachment.obj>
-------------- next part --------------
More information about the llvm-commits
mailing list