[PATCH] D93159: [X86] Add REX prefix for GOTTPOFF/TLSDESC relocs in x32 mode

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 03:38:09 PST 2020


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM with a few minors



================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:1228
+        unsigned Reg = MO.getReg();
+        if (Reg == X86::AH || Reg == X86::BH || Reg == X86::CH || Reg == X86::DH)
+          UsesHighByteReg = true;
----------------
clang-format - check that you're not exceeding col80


================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:1241
+        // assembly without the user needing to write REX, as with GNU as.
+        const MCSymbolRefExpr *Ref = dyn_cast<MCSymbolRefExpr>(MO.getExpr());
+        if (Ref && (Ref->getKind() == MCSymbolRefExpr::VK_GOTTPOFF ||
----------------
(style) const auto *Ref


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93159



More information about the llvm-commits mailing list