[PATCH] D23562: [RISCV 5/10] Add bare-bones RISC-V MCTargetDesc
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 21 12:18:32 PDT 2016
reames added a subscriber: reames.
================
Comment at: lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp:27
@@ +26,3 @@
+class RISCVAsmBackend : public MCAsmBackend {
+ uint8_t OSABI;
+ bool Is64Bit;
----------------
What values can this take? Is this an enum, or a bitmask?
================
Comment at: lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp:50
@@ +49,3 @@
+
+ void relaxInstruction(const MCInst &Inst, const MCSubtargetInfo &STI,
+ MCInst &Res) const override {}
----------------
Should this function ever be called? If not, llvm_unreachable.
================
Comment at: lib/Target/RISCV/MCTargetDesc/RISCVMCAsmInfo.cpp:21
@@ +20,3 @@
+RISCVMCAsmInfo::RISCVMCAsmInfo(const Triple &TT) {
+ PointerSize = CalleeSaveStackSlotSize = TT.isArch64Bit() ? 8 : 4;
+ CommentString = "#";
----------------
OT for this patch, but does the use of a single variable CalleeSaveStackSlotSize imply that we assume all registers which are callee saved have a fixed spill size? This seems strange for architectures which have multiple register classes with different sizes.
https://reviews.llvm.org/D23562
More information about the llvm-commits
mailing list