summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/method_compiler.cc
diff options
context:
space:
mode:
author TDYa127 <tdy@google.com> 2012-04-18 00:21:49 -0700
committer Shih-wei Liao <sliao@google.com> 2012-04-18 22:04:06 -0700
commitda83d972b1aa90ada23b592bcea00603d1ee78b7 (patch)
treebc779d13ff01b6e1327f466b8ded621eb21f6ff6 /src/compiler_llvm/method_compiler.cc
parent0200d0739c8ca560a2166b185fda39a63fb37851 (diff)
Add Thread to some runtime support.
Change-Id: Ic88e4a17126d2902d26e84009848c36fef7a9075
Diffstat (limited to 'src/compiler_llvm/method_compiler.cc')
-rw-r--r--src/compiler_llvm/method_compiler.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/compiler_llvm/method_compiler.cc b/src/compiler_llvm/method_compiler.cc
index fa8a827100..556dd510a7 100644
--- a/src/compiler_llvm/method_compiler.cc
+++ b/src/compiler_llvm/method_compiler.cc
@@ -1736,10 +1736,12 @@ void MethodCompiler::EmitInsn_NewInstance(uint32_t dex_pc,
llvm::Value* method_object_addr = EmitLoadMethodObjectAddr();
+ llvm::Value* thread_object_addr = irb_.CreateCall(irb_.GetRuntime(GetCurrentThread));
+
EmitUpdateLineNumFromDexPC(dex_pc);
llvm::Value* object_addr =
- irb_.CreateCall2(runtime_func, type_index_value, method_object_addr);
+ irb_.CreateCall3(runtime_func, type_index_value, method_object_addr, thread_object_addr);
EmitGuard_ExceptionLandingPad(dex_pc);
@@ -1777,11 +1779,13 @@ llvm::Value* MethodCompiler::EmitAllocNewArray(uint32_t dex_pc,
llvm::Value* method_object_addr = EmitLoadMethodObjectAddr();
+ llvm::Value* thread_object_addr = irb_.CreateCall(irb_.GetRuntime(GetCurrentThread));
+
EmitUpdateLineNumFromDexPC(dex_pc);
llvm::Value* object_addr =
- irb_.CreateCall3(runtime_func, type_index_value, method_object_addr,
- array_length_value);
+ irb_.CreateCall4(runtime_func, type_index_value, method_object_addr,
+ array_length_value, thread_object_addr);
EmitGuard_ExceptionLandingPad(dex_pc);
@@ -3074,13 +3078,16 @@ EmitCallRuntimeForCalleeMethodObjectAddr(uint32_t callee_method_idx,
llvm::Value* caller_method_object_addr = EmitLoadMethodObjectAddr();
+ llvm::Value* thread_object_addr = irb_.CreateCall(irb_.GetRuntime(GetCurrentThread));
+
EmitUpdateLineNumFromDexPC(dex_pc);
llvm::Value* callee_method_object_addr =
- irb_.CreateCall3(runtime_func,
+ irb_.CreateCall4(runtime_func,
callee_method_idx_value,
this_addr,
- caller_method_object_addr);
+ caller_method_object_addr,
+ thread_object_addr);
EmitGuard_ExceptionLandingPad(dex_pc);