[PATCH] D111362: [PowerPC] Add support for ROP protection for 32 bit.

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 12 05:36:45 PST 2021


nemanjai added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.td:5486
+// specified address.
+let mayLoad = 1, hasSideEffects = 1, isCodeGenOnly = 1 in {
+def HASHCHK : XForm_XD6_RA5_RB5<31, 754, (outs),
----------------
stefanp wrote:
> amyk wrote:
> > Just wanted to double check that `isCodeGenOnly` is intended for these, right? 
> > I don't have a strong opinion either way but since they're not on the 64-bit version and since `hasSideEffects` is documented, it may not hurt to document why `isCodeGenOnly` is added here.
> Sure. I can add that.
> The idea is that we don't want the llvm to get confused between HASHCHK and HASHCHK8 because they are both encoded the same way. I'll add a comment with an explanation. 
I think Amy's question is why this one parts with the convention to make the 32-bit versions the real instructions and the 64-bit version the `isCodeGenOnly` instruction (along with being marked with `Interpretation64Bit`). And I think the question is perfectly reasonable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111362



More information about the llvm-commits mailing list