Revert "Use implicit null checks inside try blocks."
Fails gcstress tests.
This reverts commit 7aa7560683626c7893011271c241b3265ded1dc3.
Change-Id: I4f5c89048b9ffddbafa02f3001e329ff87058ca2
diff --git a/runtime/arch/mips/fault_handler_mips.cc b/runtime/arch/mips/fault_handler_mips.cc
index b6a63ca..7969a8f 100644
--- a/runtime/arch/mips/fault_handler_mips.cc
+++ b/runtime/arch/mips/fault_handler_mips.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "arch/mips/quick_method_frame_info_mips.h"
+
#include "fault_handler.h"
#include <sys/ucontext.h>
#include "art_method-inl.h"
@@ -82,15 +82,12 @@
struct ucontext *uc = reinterpret_cast<struct ucontext*>(context);
struct sigcontext *sc = reinterpret_cast<struct sigcontext*>(&uc->uc_mcontext);
- // Decrement $sp by the frame size of the kSaveEverything method and store
- // the fault address in the padding right after the ArtMethod*.
- sc->sc_regs[mips::SP] -= mips::MipsCalleeSaveFrameSize(Runtime::kSaveEverything);
- uintptr_t* padding = reinterpret_cast<uintptr_t*>(sc->sc_regs[mips::SP]) + /* ArtMethod* */ 1;
- *padding = reinterpret_cast<uintptr_t>(info->si_addr);
-
sc->sc_regs[mips::RA] = sc->sc_pc + 4; // RA needs to point to gc map location
sc->sc_pc = reinterpret_cast<uintptr_t>(art_quick_throw_null_pointer_exception_from_signal);
sc->sc_regs[mips::T9] = sc->sc_pc; // make sure T9 points to the function
+ // Pass the faulting address as the first argument of
+ // art_quick_throw_null_pointer_exception_from_signal.
+ sc->sc_regs[mips::A0] = reinterpret_cast<uintptr_t>(info->si_addr);
VLOG(signals) << "Generating null pointer exception";
return true;
}