[PATCH] D44824: [Spectre] Introduce a new pass to do speculative load hardening to mitigate Spectre variant #1 for x86.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 12 14:08:17 PDT 2018


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp:413
+    ++NumInstsInserted;
+    assert(ZeroI->getOperand(1).isImplicit() && ZeroI->getOperand(1).isDef() &&
+           "Must have an implicit def of EFLAGS!");
----------------
should we also check getReg() == X86::EFLAGS in this assert.


================
Comment at: llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp:1442
+  // FIXME: This hard codes a shift distance based on the number of bits needed
+  // to stay canonacial on 64-bit. We should compute this somehow and support
+  // 32-bit as part of that.
----------------
canonical is still mispelled


Repository:
  rL LLVM

https://reviews.llvm.org/D44824





More information about the llvm-commits mailing list