summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/jni_compiler.cc
diff options
context:
space:
mode:
author TDYa127 <tdy@google.com> 2012-04-17 10:51:25 -0700
committer Shih-wei Liao <sliao@google.com> 2012-04-18 18:03:43 -0700
commit69eafaae2c910ea6f704a3867f9b78647174a0df (patch)
tree00d40051fb85150650fbf813ac39693d088405f0 /src/compiler_llvm/jni_compiler.cc
parentf81400fae089cbc2b8cd1df421f1896abb111e2d (diff)
Fix jni compiler bug (Compiler_llvm).
Must test suspend before return. Change-Id: I1885c24848b40858ed1b8facdaaec459f49dfcf7
Diffstat (limited to 'src/compiler_llvm/jni_compiler.cc')
-rw-r--r--src/compiler_llvm/jni_compiler.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler_llvm/jni_compiler.cc b/src/compiler_llvm/jni_compiler.cc
index b35d7929a3..7855be09d9 100644
--- a/src/compiler_llvm/jni_compiler.cc
+++ b/src/compiler_llvm/jni_compiler.cc
@@ -259,6 +259,9 @@ CompiledMethod* JniCompiler::Compile() {
Thread::StateOffset().Int32Value(),
irb_.getInt32(kRunnable));
+ // Do a suspend check
+ irb_.CreateCall(irb_.GetRuntime(TestSuspend));
+
if (return_shorty == 'L') {
// If the return value is reference, it may point to SIRT, we should decode it.
retval = irb_.CreateCall2(irb_.GetRuntime(DecodeJObjectInThread),