[PATCH] D103539: RISCV: adjust handling of relocation emission for RISCV
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 15 15:09:44 PDT 2021
MaskRay added inline comments.
================
Comment at: llvm/lib/MC/MCAssembler.cpp:1086
+ bool WasRelaxed;
+ if (Layout.getAssembler().getBackend().relaxDwarfLineAddr(DF, Layout,
+ WasRelaxed))
----------------
================
Comment at: llvm/lib/MC/MCAssembler.cpp:1111
+ bool WasRelaxed;
+ if (Layout.getAssembler().getBackend().relaxDwarfCFA(DF, Layout, WasRelaxed))
+ return WasRelaxed;
----------------
================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp:236
+
+ if (Value > kAddrDeltaLimit) {
+ unsigned PtrSize = C.getAsmInfo()->getCodePointerSize();
----------------
The old comment is unintentionally dropped: `// According to DWARF spec., the DW_LNS_fixed_advance_pc opcode takes a ..`
s/50000/60000/ to restore the previous threshold.
================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp:277
+ MCContext &C = Layout.getAssembler().getContext();
+
+ const MCExpr &AddrDelta = DF.getAddrDelta();
----------------
blank line seems redundant
================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h:98
+ bool relaxDwarfLineAddr(MCDwarfLineAddrFragment &DF, MCAsmLayout &Layout,
+ bool &WasRelaxed) const override;
+ bool relaxDwarfCFA(MCDwarfCallFrameFragment &DF, MCAsmLayout &Layout,
----------------
s/WasRelaxed/Relaxed/ to be consistent with the impl
================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVFixupKinds.h:84
fixup_riscv_align,
+ // fixup_riscv_set_8 - 8-bit fixup corresponding to R_RISCV_SET8 for local
+ // label assignment.
----------------
https://llvm.org/docs/CodingStandards.html#doxygen-use-in-documentation-comments
"Don’t duplicate function or class name at the beginning of the comment. "
Just ignore some other comments which violate this rule.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103539/new/
https://reviews.llvm.org/D103539
More information about the llvm-commits
mailing list