[PATCH] D79625: [PowerPC] Extend .reloc directive on PowerPC
Anil Mahmud via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 8 23:25:41 PDT 2020
anil9 added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp:1829
+ Offset->getKind() != llvm::MCExpr::Binary,
+ OffsetLoc, "expected non-negative number, label or a binary "
+ "expression")) ||
----------------
nit : change number to constant ?
================
Comment at: llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp:1854
+
+ if (getStreamer().emitRelocDirective(*Offset, Name, Expr, DirectiveLoc, getSTI()))
+ return Error(NameLoc, "unknown relocation name");
----------------
nit > 80 char
================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp:126
+ switch(BinExpr.getOpcode()) {
+ default:
+ // Other opcodes are not supported.
----------------
Indentation.
================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp:148
+
+ Optional<MCFixupKind> MaybeKind = getAssembler().getBackend().getFixupKind(Name);
+ if (!MaybeKind.hasValue())
----------------
nit > 80 char.
================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp:155
+ switch(Offset.getKind()) {
+ case MCExpr::Binary: {
+ const MCBinaryExpr &BinExpr = cast<const MCBinaryExpr>(Offset);
----------------
Indentation.
================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp:162
+
+ assert(DF && "Expected a valid data fragment.");
+
----------------
will this assertion be reached given the break just before it ?
================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h:46
+ // A linker opt fixup
+ fixup_ppc_linker_opt,
----------------
nit , fullstop.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79625/new/
https://reviews.llvm.org/D79625
More information about the llvm-commits
mailing list