From 853cd09d6ffc87a270d0d531f84f246d534b8c82 Mon Sep 17 00:00:00 2001 From: TDYa127 Date: Sat, 21 Apr 2012 22:15:31 -0700 Subject: Fix llvm runtime support bug. Change-Id: I7c023e861cb8738ade67ef66155a318c8bd5735a --- src/compiler_llvm/method_compiler.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/compiler_llvm/method_compiler.cc') diff --git a/src/compiler_llvm/method_compiler.cc b/src/compiler_llvm/method_compiler.cc index 5bd1695ea1..8e592fe778 100644 --- a/src/compiler_llvm/method_compiler.cc +++ b/src/compiler_llvm/method_compiler.cc @@ -35,7 +35,6 @@ #include -#include #include #include #include @@ -3687,7 +3686,7 @@ CompiledMethod *MethodCompiler::Compile() { EmitPrologueLastBranch(); // Verify the generated bitcode - llvm::verifyFunction(*func_, llvm::PrintMessageAction); + VERIFY_LLVM_FUNCTION(*func_); // Add the memory usage approximation of the compilation unit cunit_->AddMemUsageApproximation(code_item_->insns_size_in_code_units_ * 900); @@ -3738,8 +3737,12 @@ void MethodCompiler::EmitGuard_ExceptionLandingPad(uint32_t dex_pc) { void MethodCompiler::EmitGuard_GarbageCollectionSuspend(uint32_t dex_pc) { llvm::Value* runtime_func = irb_.GetRuntime(TestSuspend); + + llvm::Value* thread_object_addr = irb_.CreateCall(irb_.GetRuntime(GetCurrentThread)); + EmitUpdateDexPC(dex_pc); - irb_.CreateCall(runtime_func); + + irb_.CreateCall(runtime_func, thread_object_addr); EmitGuard_ExceptionLandingPad(dex_pc); } -- cgit v1.2.3-59-g8ed1b