Subzero, MIPS32: Atomic intrinsics fixes

This patch introduces changes to the MIPS32 intrinsic functions to
comply with PNaCl smoke tests.

Also made a change regarding addressing relative to frame pointer,
since it differs in MIPS compared to ARM and x86.

R=stichnot@chromium.org

Patch from Stefan Maksimovic <makdstefan@gmail.com>.

Review-Url: https://codereview.chromium.org/2619363003 .
diff --git a/src/IceTargetLowering.h b/src/IceTargetLowering.h
index 3de6965..41108f8 100644
--- a/src/IceTargetLowering.h
+++ b/src/IceTargetLowering.h
@@ -253,7 +253,13 @@
   virtual void reserveFixedAllocaArea(size_t Size, size_t Align) = 0;
   virtual int32_t getFrameFixedAllocaOffset() const = 0;
   virtual uint32_t maxOutArgsSizeBytes() const { return 0; }
-
+  // Addressing relative to frame pointer differs in MIPS compared to X86/ARM
+  // since MIPS decrements its stack pointer prior to saving it in the frame
+  // pointer register.
+  virtual uint32_t getFramePointerOffset(uint32_t CurrentOffset,
+                                         uint32_t Size) const {
+    return -(CurrentOffset + Size);
+  }
   /// Return whether a 64-bit Variable should be split into a Variable64On32.
   virtual bool shouldSplitToVariable64On32(Type Ty) const = 0;