[PATCH] D44885: [RISCV] Expand function call to auipc and jalr
Ana Pazos via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 28 16:24:25 PDT 2018
apazos added inline comments.
================
Comment at: lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp:49
+ const unsigned FixupKind = Fixup.getKind();
+ // It's hard to fix fixup_riscv_pcrel_lo12_i by assembler, se we leave
+ // relocation types and let linker to resolve it.
----------------
maybe change leave relocation types -> preserve relocation types, to be in line with the term you use in other patches.
================
Comment at: lib/Target/RISCV/RISCVAsmPrinter.cpp:73
+ unsigned Ra = RISCV::X1;
+ MCSymbol *Sym = NULL;
+
----------------
NULL->nullptr
================
Comment at: lib/Target/RISCV/RISCVAsmPrinter.cpp:106
+ TmpInst = MCInstBuilder(RISCV::JALR)
+ .addReg(Ra)
+ .addReg(Ra)
----------------
I think creating the instruction with RISCV::X1 would be clearer than referencing the alternative return address name.
Repository:
rL LLVM
https://reviews.llvm.org/D44885
More information about the llvm-commits
mailing list