[llvm] r337822 - [x86/SLH] Tidy up a comment, using doxygen structure and wording it to

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 24 05:19:01 PDT 2018


Author: chandlerc
Date: Tue Jul 24 05:19:01 2018
New Revision: 337822

URL: http://llvm.org/viewvc/llvm-project?rev=337822&view=rev
Log:
[x86/SLH] Tidy up a comment, using doxygen structure and wording it to
be more accurate and understandable.

Modified:
    llvm/trunk/lib/Target/X86/X86SpeculativeLoadHardening.cpp

Modified: llvm/trunk/lib/Target/X86/X86SpeculativeLoadHardening.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SpeculativeLoadHardening.cpp?rev=337822&r1=337821&r2=337822&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SpeculativeLoadHardening.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86SpeculativeLoadHardening.cpp Tue Jul 24 05:19:01 2018
@@ -1866,11 +1866,13 @@ bool X86SpeculativeLoadHardeningPass::ca
   return RC->hasSuperClassEq(GPRRegClasses[Log2_32(RegBytes)]);
 }
 
-// We can harden non-leaking loads into register without touching the address
-// by just hiding all of the loaded bits. We use an `or` instruction to do
-// this because having the poison value be all ones allows us to use the same
-// value below. And the goal is just for the loaded bits to not be exposed to
-// execution and coercing them to one is sufficient.
+/// Harden a load by hardening the loaded value in the defined register.
+///
+/// We can harden a non-leaking load into a register without touching the
+/// address by just hiding all of the loaded bits during misspeculation. We use
+/// an `or` instruction to do this because we set up our poison value as all
+/// ones. And the goal is just for the loaded bits to not be exposed to
+/// execution and coercing them to one is sufficient.
 void X86SpeculativeLoadHardeningPass::hardenPostLoad(MachineInstr &MI) {
   MachineBasicBlock &MBB = *MI.getParent();
   DebugLoc Loc = MI.getDebugLoc();




More information about the llvm-commits mailing list