[PATCH] Patch that adds address-masking instructions before loads and stores, and after the instructions that change stack-pointer.

Mark Seaborn mseaborn at chromium.org
Fri Mar 7 15:03:47 PST 2014



================
Comment at: lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp:105
@@ +104,3 @@
+    else if (isMemoryAccess(Inst.getOpcode(), &AddrIdx, &Load)) {
+      if (baseRegNeedsLoadStoreMask(Inst.getOperand(AddrIdx).getReg()))
+        sandboxLoadStoreStackChange(Inst, AddrIdx, STI, true,
----------------
Now this doesn't handle this case correctly:
lw $sp, 123($sp)

It doesn't generate a mask after the load.  Can you fix this and add a test, please?

================
Comment at: lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp:100
@@ +99,3 @@
+    unsigned AddrIdx;
+    bool Load;
+
----------------
Maybe "IsLoad" for readability?


http://llvm-reviews.chandlerc.com/D2904



More information about the llvm-commits mailing list