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

Zixuan Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 13 22:31:37 PDT 2021


zixuan-wu added inline comments.


================
Comment at: llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp:165
 
+  bool isUImm2() const { return isUImm<2>(); }
   bool isUImm5() const { return isUImm<5>(); }
----------------
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);
}
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94007



More information about the llvm-commits mailing list