[PATCH] [AArch64] Add add/sub/cmp/cmn aliases to MC AsmParser

Jim Grosbach grosbach at apple.com
Fri Jul 11 11:01:12 PDT 2014


Hi Arnaud,

Does the ARM ARM specify these aliases? I can’t find them, if so, but it’s not always the most readable document, so I could just be missing it.

-Jim

> On Jul 11, 2014, at 5:28 AM, Arnaud A. de Grandmaison <arnaud.degrandmaison at arm.com> wrote:
> 
> Well, the title says it all.
>  
> This patch teaches the AsmParser to accept some add/sub/cmp/cmn with
> negative immediate operand and convert them as shown:
>  
>   add  Rd, Rn, -imm -> sub  Rd, Rn, imm
>   sub  Rd, Rn, -imm -> add  Rd, Rn, imm
>   adds Rd, Rn, -imm -> subs Rd, Rn, imm
>   subs Rd, Rn, -imm -> adds Rd, Rn, imm
>   cmp  Rn, -imm     -> cmn  Rn, imm
>   cmn  Rn, -imm     -> cmp  Rn, imm
>  
> Those instructions are an alternate syntax available to assembly coders,
> and are needed in order to support code already compiling with some other
> assemblers.
>  
> OK to commit ?
>  
> Cheers,
> --
> Arnaud A. de Grandmaison
> <0001-AArch64-Add-add-sub-cmp-cmn-aliases-to-MC-AsmParser.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140711/bde507ef/attachment.html>


More information about the llvm-commits mailing list