[PATCH] D43486: [mips] Spectre variant two mitigation for MIPSR2

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 05:35:08 PST 2018


sdardis added inline comments.


================
Comment at: lib/Target/Mips/MipsLongBranch.cpp:389
+            Subtarget.useIndirectJumpsHazard() ? Mips::JR_HB : Mips::JR;
+        BuildMI(*BalTgtMBB, Pos, DL, TII->get(JROp)).addReg(Mips::AT);
 
----------------
atanasyan wrote:
> Just to check that I understand the code above properly - in case of targeting mips32r6 and using the +use-indirect-jump-hazard feature we will emit the `jr.hb` instruction and fill up the dealt slot. Right?
Yes. For mips32r6 and +use-indirect-jump-hazard we don't use a compact branch, we use a jr.hb and fill the delay slot.

Also, that JR_HB needs another check for mips32r6 to use the correct encoding. 


Repository:
  rL LLVM

https://reviews.llvm.org/D43486





More information about the llvm-commits mailing list