[PATCH] Change llvm-objdump to print (bad) for invalid instructions

Rafael Espíndola rafael.espindola at gmail.com
Thu Oct 17 14:31:08 PDT 2013


I think you forgot to attache the patch.

On 17 October 2013 14:18, Stephen Checkoway <s at pahtak.org> wrote:
>
> On Oct 16, 2013, at 7:13 PM, Jim Grosbach <grosbach at apple.com> wrote:
>
>> Looks like there’s something addition that may need cleaned up in that interface. The assertion is firing in test case "MC/ARM/AlignedBundling/group-bundle-arm.s”. Can you have a look and see what’s up?
>
>
> Good catch. The other disassemblers were setting Size to 0 when they failed to disassemble the instruction.
>
> The attached patch changes all of the targets in the tree with disassemblers and adds a unittest to check that each target with a disassembler (and for which we can trivially construct an MCSubtargetInfo) returns a nonzero size when it fails to disassemble an instruction. It's a pretty limited check since it only tries to disassemble 0x00 and it's certainly possible that an architecture has an instruction that is simply 0x00 (e.g., Z80's NOP is 0x00).
>
> Can you think of a better way to test this, particularly for out-of-tree targets that may need to change?
>
> After this, the llvm-objdump and the header comment patches should apply cleanly.
>
> --
> Stephen Checkoway
>
>
>
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list