summaryrefslogtreecommitdiff
path: root/src/compiler_llvm/method_compiler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler_llvm/method_compiler.cc')
-rw-r--r--src/compiler_llvm/method_compiler.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/compiler_llvm/method_compiler.cc b/src/compiler_llvm/method_compiler.cc
index 54e9decddb..7ddae88791 100644
--- a/src/compiler_llvm/method_compiler.cc
+++ b/src/compiler_llvm/method_compiler.cc
@@ -1137,8 +1137,15 @@ void MethodCompiler::EmitInsn_MoveException(uint32_t dex_pc,
void MethodCompiler::EmitInsn_ThrowException(uint32_t dex_pc,
Instruction const* insn) {
- // UNIMPLEMENTED(WARNING);
- irb_.CreateUnreachable();
+
+ Instruction::DecodedInstruction dec_insn(insn);
+
+ llvm::Value* exception_addr =
+ EmitLoadDalvikReg(dec_insn.vA_, kObject, kAccurate);
+
+ irb_.CreateCall(irb_.GetRuntime(ThrowException), exception_addr);
+
+ EmitBranchExceptionLandingPad(dex_pc);
}