pscoro abandoned this revision.
pscoro added inline comments.

================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:11136
+    MachineFrameInfo &MFI = MF.getFrameInfo();
+    int SPI = MFI.getStackProtectorIndex(); // should return  -1
+    
----------------
shchenz wrote:
> Why should return -1?
The source code for getStackProtectorIndex just returns StackProtectorIndex 
which is initialized to -1, it makes sense as the stack protector byte should 
be right before the stack frame begins


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:11144
+
+    unsigned int deadBird = 0x4C6C566D; // replaces canary word
+
----------------
shchenz wrote:
> nit: the first letter should be upper for `deadBird` according to LLVM coding 
> style.
> 
> And how can we make sure `0x4C6C566D` is not the same with the canary word 
> load with `TargetOpcode::LOAD_STACK_GUARD`?
What would you suggest for this? I'm not sure exactly how the canary word is 
created, is it worth loading the canary word first, manipulating it to make 
sure that we store something different?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125916

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to