[PATCH] D94007: [CSKY 5/n] Add support for all CSKY basic integer instructions except for branch series

Renato Golin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 14 02:39:07 PDT 2021


rengolin accepted this revision.
rengolin added a comment.
This revision is now accepted and ready to land.

This looks good to me, thanks!



================
Comment at: llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp:165
 
+  bool isUImm2() const { return isUImm<2>(); }
   bool isUImm5() const { return isUImm<5>(); }
----------------
zixuan-wu wrote:
> rengolin wrote:
> > These helpers look unnecessary, since the actual function call is so simple...
> 
> It's hook function described in td file. The following `Name` is related to those functions.
> 
> 
> ```
> class ImmAsmOperand<string prefix, int width, string suffix> : AsmOperandClass {
>   let Name = prefix # "Imm" # width # suffix;
>   let RenderMethod = "addImmOperands";
>   let DiagnosticType = !strconcat("Invalid", Name);
> }
> ```
Ah, yes, makes sense. Thanks!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94007/new/

https://reviews.llvm.org/D94007



More information about the llvm-commits mailing list