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

Sasa Stankovic Sasa.Stankovic at imgtec.com
Tue Mar 4 09:33:31 PST 2014



================
Comment at: lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp:32
@@ +31,3 @@
+
+bool isDangerousLoadOpcode(unsigned Opcode, int *AddrIdx) {
+  switch (Opcode) {
----------------
Mark Seaborn wrote:
> Could this be combined with isDangerousStoreOpcode() as isDangerousMemoryAccess()?  There's not a big difference between loads and stores for sandboxing.
There have to be separate methods for loads and stores because of the case where
load also changes SP (or they can be combined in one method with one additional
parameter that tells whether we check loads or stores).

================
Comment at: test/MC/Mips/nacl-align.ll:2
@@ -1,3 +1,3 @@
 ; RUN: llc -filetype=asm -mtriple=mipsel-none-nacl -relocation-model=static \
-; RUN:     -O3 < %s
+; RUN:     -O3 < %s | FileCheck %s
 
----------------
Mark Seaborn wrote:
> If you're fixing a mistake in a previous commit, really that should be commented in the commit message.  But I would prefer if you fixed this in a standalone change first.
I committed this as a separate change.


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



More information about the llvm-commits mailing list