[PATCH] Add NaCl target for Mips. Forbid indexed loads and stores if the target is NaCl.
Mark Seaborn
mseaborn at chromium.org
Tue Feb 4 14:29:14 PST 2014
================
Comment at: lib/Target/Mips/MipsInstrFPU.td:393
@@ -392,3 +392,3 @@
// Indexed loads and stores.
-let Predicates = [HasFPIdx, HasStdEnc] in {
+let Predicates = [HasFPIdx, HasStdEnc, IsNotNaCl] in {
def LWXC1 : MMRel, LWXC1_FT<"lwxc1", FGR32Opnd, II_LWXC1, load>, LWXC1_FM<0>;
----------------
Petar Jovanovic wrote:
> Mark Seaborn wrote:
> > It might be worth commenting why these instructions are disallowed under NaCl -- either in the code or at least in the commit message -- because I don't actually know why they are.
> >
> > Are these inherently dangerous, or is it just that they haven't been added to the MIPS validator's whitelist yet?
> > Are these inherently dangerous, or is it just that they haven't been added to the MIPS validator's whitelist yet?
>
> Similar to ARM, register-indexed addressing is not supported by design in MIPS NaCl.
OK, I see. Is it the "x" in the instruction name that indicates this addressing mode? Which part of the tablegen definition indicates this addressing mode?
Maybe comment something like:
'"x" indicates a base register + offset register addressing mode which is disallowed under NaCl'
http://llvm-reviews.chandlerc.com/D2690
More information about the llvm-commits
mailing list