[PATCH] D93372: [CSKY 3/n] Add bare-bones C-SKY MCTargetDesc

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 21 16:40:57 PST 2020


MaskRay added inline comments.


================
Comment at: llvm/lib/Target/CSKY/MCTargetDesc/CSKYAsmBackend.cpp:37
+
+bool CSKYAsmBackend::mayNeedRelaxation(const MCInst &Inst,
+                                       const MCSubtargetInfo &STI) const {
----------------
No need to define since it has a default definition.


================
Comment at: llvm/lib/Target/CSKY/MCTargetDesc/CSKYELFObjectWriter.cpp:36
+                                           bool IsPCRel) const {
+  // Determine the type of the relocation
+  switch ((unsigned)Fixup.getKind()) {
----------------
Add a period for complete sentences in comments


================
Comment at: llvm/lib/Target/CSKY/MCTargetDesc/CSKYMCCodeEmitter.cpp:22
+
+#define DEBUG_TYPE "mccodeemitter"
+
----------------
The generic name can be misleading. Add a target prefix


================
Comment at: llvm/lib/Target/CSKY/MCTargetDesc/CSKYMCCodeEmitter.h:45
+
+  template <int shift = 0>
+  unsigned getImmOpValue(const MCInst &MI, unsigned Idx,
----------------
clang-format this line


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

https://reviews.llvm.org/D93372



More information about the llvm-commits mailing list