]> granicus.if.org Git - llvm/commitdiff
[x86/SLH] Tidy up a comment, using doxygen structure and wording it to
authorChandler Carruth <chandlerc@gmail.com>
Tue, 24 Jul 2018 12:19:01 +0000 (12:19 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 24 Jul 2018 12:19:01 +0000 (12:19 +0000)
be more accurate and understandable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337822 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86SpeculativeLoadHardening.cpp

index c2453cef496bb412dcca8831b7f147fa1814fd5b..10e1132d87776fb48c62c5eb519286191c53a86b 100644 (file)
@@ -1866,11 +1866,13 @@ bool X86SpeculativeLoadHardeningPass::canHardenRegister(unsigned Reg) {
   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();