[llvm-commits] Remove internal fault in ARM assembler

Jim Grosbach grosbach at apple.com
Wed Jun 13 10:36:20 PDT 2012


Hi Richard,

I believe the patch is obviously correct and good for commit. However, I'm a bit concerned that the parser got there at all in this particular instance. The way we parse these instructions, in particular the imod operand (effect mnemonic suffix), is pretty horrible and could use a good hard look and likely a lot of refactoring. If you're interested in digging into some of the underbelly of the ARM asm parser and cleaning things up a bit, this is a good place to do start. :)

-Jim


On Jun 13, 2012, at 9:51 AM, Richard Barton <richard.barton at arm.com> wrote:

> Hello Reviewers
> 
> Our testing has turned up an assertion failure in the MC Assembler for CPS
> instructions.
> 
> The assembly string that causes the error is a non-interrupt affecting CPS with
> an interrupt flag set (e.g. CPS f,#1)
> 
> This is not legal assembly, but the instruction is unpredictable, so there is no
> restriction on assembly representation. The MC assembler should not abort on any
> input, but should fail with an error message.
> 
> The attached patch replaces the internal fault with an error message, and adds a
> test.
> 
> Please review
> 
> Regards,
> 
> Richard Barton
> ARM Ltd, Cambridge
> <cps_asm_parser_abort.patch>




More information about the llvm-commits mailing list