Remove kExceptionPending flag from thread and codegen.

Code just checks if exception_ is NULL instead. Compiled code simply
clears the exception_ field for MOVE_EXCEPTION instead of calling a
helper.

Change-Id: Iefaa780f66c327c3d20598bd71d3c14d7a9c8119
diff --git a/src/compiler/codegen/mips/call_mips.cc b/src/compiler/codegen/mips/call_mips.cc
index f14ebab..76c9fbd 100644
--- a/src/compiler/codegen/mips/call_mips.cc
+++ b/src/compiler/codegen/mips/call_mips.cc
@@ -294,6 +294,18 @@
   MarkSafepointPC(cu, call_inst);
 }
 
+void MipsCodegen::GenMoveException(CompilationUnit* cu, RegLocation rl_dest)
+{
+  int ex_offset = Thread::ExceptionOffset().Int32Value();
+  RegLocation rl_result = EvalLoc(cu, rl_dest, kCoreReg, true);
+  int reset_reg = AllocTemp(cu);
+  LoadWordDisp(cu, rMIPS_SELF, ex_offset, rl_result.low_reg);
+  LoadConstant(cu, reset_reg, 0);
+  StoreWordDisp(cu, rMIPS_SELF, ex_offset, reset_reg);
+  FreeTemp(cu, reset_reg);
+  StoreValue(cu, rl_dest, rl_result);
+}
+
 /*
  * Mark garbage collection card. Skip if the value we're storing is null.
  */