[PATCH] D23834: [AArch64] Allow label arithmetic with add/sub/cmp
    Renato Golin via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Aug 24 05:58:03 PDT 2016
    
    
  
rengolin added a comment.
@t.p.northover should have a look at the Darwin relocation, but the rest looks fine for me.
Nice set of tests, thanks!
================
Comment at: lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp:3606
@@ +3605,3 @@
+        // for instructions with only 2 operands (e.g. 'cmp w0, borked'). A
+        // slightly off diagnostic seems better than an internal compiler error.
+        return Error(Loc[1], "invalid immediate expression");
----------------
Maybe hacky, but can't you just count Loc[] and return 2 | 3 depending on the size?
https://reviews.llvm.org/D23834
    
    
More information about the llvm-commits
mailing list