ART: Check high part of dalvik register pairs on put-wide

When verifying a put-wide, it is necessary to check the lo and the hi
register for the right type.

Bug: 16018242

(cherry picked from commit 2a593a14e8e0df01a50139e0d48c7be46fb057ef)

Change-Id: I9e661951d592e155e0f281ea959e778d8f4a67ab
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index c0e4ae7..afcc7c4 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -3496,10 +3496,12 @@
     value_compatible = value_type.IsFloatTypes();
   } else if (target_type.IsLong()) {
     instruction_compatible = insn_type.IsLong();
-    value_compatible = value_type.IsLongTypes();
+    const RegType& value_type_hi = work_line_->GetRegisterType(vregA + 1);
+    value_compatible = value_type.IsLongTypes() && value_type.CheckWidePair(value_type_hi);
   } else if (target_type.IsDouble()) {
     instruction_compatible = insn_type.IsLong();  // no put-double, so expect put-long
-    value_compatible = value_type.IsDoubleTypes();
+    const RegType& value_type_hi = work_line_->GetRegisterType(vregA + 1);
+    value_compatible = value_type.IsDoubleTypes() && value_type.CheckWidePair(value_type_hi);
   } else {
     instruction_compatible = false;  // reference with primitive store
     value_compatible = false;  // unused