Implement throw-verification-error opcode in LLVM-based compiler.

Change-Id: I3b902e593f380d7524c8a2d94800d0323364c613
diff --git a/src/compiler_llvm/method_compiler.cc b/src/compiler_llvm/method_compiler.cc
index 5485ba6..d3d7e39 100644
--- a/src/compiler_llvm/method_compiler.cc
+++ b/src/compiler_llvm/method_compiler.cc
@@ -1139,6 +1139,10 @@
     EmitInsn_IntShiftArithmImmediate(ARGS, kIntArithm_UShr);
     break;
 
+  case Instruction::THROW_VERIFICATION_ERROR:
+    EmitInsn_ThrowVerificationError(ARGS);
+    break;
+
   case Instruction::UNUSED_3E:
   case Instruction::UNUSED_3F:
   case Instruction::UNUSED_40:
@@ -1158,7 +1162,6 @@
   case Instruction::UNUSED_EA:
   case Instruction::UNUSED_EB:
   case Instruction::UNUSED_EC:
-  case Instruction::THROW_VERIFICATION_ERROR:
   case Instruction::UNUSED_EE:
   case Instruction::UNUSED_EF:
   case Instruction::UNUSED_F0:
@@ -1271,6 +1274,24 @@
 }
 
 
+void MethodCompiler::EmitInsn_ThrowVerificationError(uint32_t dex_pc,
+                                                     Instruction const* insn) {
+
+  DecodedInstruction dec_insn(insn);
+
+  EmitUpdateLineNumFromDexPC(dex_pc);
+
+  llvm::Value* method_object_addr = EmitLoadMethodObjectAddr();
+  llvm::Value* kind_value = irb_.getInt32(dec_insn.vA);
+  llvm::Value* ref_value = irb_.getInt32(dec_insn.vB);
+
+  irb_.CreateCall3(irb_.GetRuntime(ThrowVerificationError),
+                   method_object_addr, kind_value, ref_value);
+
+  EmitBranchExceptionLandingPad(dex_pc);
+}
+
+
 void MethodCompiler::EmitInsn_ReturnVoid(uint32_t dex_pc,
                                          Instruction const* insn) {
   // Garbage collection safe-point