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.
*/
diff --git a/src/compiler/codegen/mips/codegen_mips.h b/src/compiler/codegen/mips/codegen_mips.h
index 4178f2e..fcd5669 100644
--- a/src/compiler/codegen/mips/codegen_mips.h
+++ b/src/compiler/codegen/mips/codegen_mips.h
@@ -138,6 +138,7 @@
virtual void GenMemBarrier(CompilationUnit* cu, MemBarrierKind barrier_kind);
virtual void GenMonitorEnter(CompilationUnit* cu, int opt_flags, RegLocation rl_src);
virtual void GenMonitorExit(CompilationUnit* cu, int opt_flags, RegLocation rl_src);
+ virtual void GenMoveException(CompilationUnit* cu, RegLocation rl_dest);
virtual void GenMultiplyByTwoBitMultiplier(CompilationUnit* cu, RegLocation rl_src,
RegLocation rl_result, int lit, int first_bit,
int second_bit);