Home | History | Annotate | Download | only in interpreter
      1 /*
      2  * Copyright (C) 2012 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #include "interpreter_common.h"
     18 
     19 namespace art {
     20 namespace interpreter {
     21 
     22 #define HANDLE_PENDING_EXCEPTION()                                                              \
     23   do {                                                                                          \
     24     DCHECK(self->IsExceptionPending());                                                         \
     25     if (UNLIKELY(self->TestAllFlags())) {                                                       \
     26       CheckSuspend(self);                                                                       \
     27     }                                                                                           \
     28     uint32_t found_dex_pc = FindNextInstructionFollowingException(self, shadow_frame,           \
     29                                                                   inst->GetDexPc(insns),        \
     30                                                                   instrumentation);             \
     31     if (found_dex_pc == DexFile::kDexNoIndex) {                                                 \
     32       return JValue(); /* Handled in caller. */                                                 \
     33     } else {                                                                                    \
     34       int32_t displacement = static_cast<int32_t>(found_dex_pc) - static_cast<int32_t>(dex_pc); \
     35       inst = inst->RelativeAt(displacement);                                                    \
     36     }                                                                                           \
     37   } while (false)
     38 
     39 #define POSSIBLY_HANDLE_PENDING_EXCEPTION(_is_exception_pending, _next_function)  \
     40   do {                                                                            \
     41     if (UNLIKELY(_is_exception_pending)) {                                        \
     42       HANDLE_PENDING_EXCEPTION();                                                 \
     43     } else {                                                                      \
     44       inst = inst->_next_function();                                              \
     45     }                                                                             \
     46   } while (false)
     47 
     48 // Code to run before each dex instruction.
     49 #define PREAMBLE()                                                                              \
     50   do {                                                                                          \
     51     DCHECK(!inst->IsReturn());                                                                  \
     52     if (UNLIKELY(notified_method_entry_event)) {                                                \
     53       notified_method_entry_event = false;                                                      \
     54     } else if (UNLIKELY(instrumentation->HasDexPcListeners())) {                                \
     55       instrumentation->DexPcMovedEvent(self, shadow_frame.GetThisObject(code_item->ins_size_),  \
     56                                        shadow_frame.GetMethod(), dex_pc);                       \
     57     }                                                                                           \
     58   } while (false)
     59 
     60 template<bool do_access_check, bool transaction_active>
     61 JValue ExecuteSwitchImpl(Thread* self, MethodHelper& mh, const DexFile::CodeItem* code_item,
     62                          ShadowFrame& shadow_frame, JValue result_register) {
     63   bool do_assignability_check = do_access_check;
     64   if (UNLIKELY(!shadow_frame.HasReferenceArray())) {
     65     LOG(FATAL) << "Invalid shadow frame for interpreter use";
     66     return JValue();
     67   }
     68   self->VerifyStack();
     69 
     70   uint32_t dex_pc = shadow_frame.GetDexPC();
     71   bool notified_method_entry_event = false;
     72   const instrumentation::Instrumentation* const instrumentation = Runtime::Current()->GetInstrumentation();
     73   if (LIKELY(dex_pc == 0)) {  // We are entering the method as opposed to deoptimizing.
     74     if (kIsDebugBuild) {
     75         self->AssertNoPendingException();
     76     }
     77     if (UNLIKELY(instrumentation->HasMethodEntryListeners())) {
     78       instrumentation->MethodEnterEvent(self, shadow_frame.GetThisObject(code_item->ins_size_),
     79                                         shadow_frame.GetMethod(), 0);
     80       notified_method_entry_event = true;
     81     }
     82   }
     83   const uint16_t* const insns = code_item->insns_;
     84   const Instruction* inst = Instruction::At(insns + dex_pc);
     85   uint16_t inst_data;
     86   while (true) {
     87     dex_pc = inst->GetDexPc(insns);
     88     shadow_frame.SetDexPC(dex_pc);
     89     TraceExecution(shadow_frame, inst, dex_pc, mh);
     90     inst_data = inst->Fetch16(0);
     91     switch (inst->Opcode(inst_data)) {
     92       case Instruction::NOP:
     93         PREAMBLE();
     94         inst = inst->Next_1xx();
     95         break;
     96       case Instruction::MOVE:
     97         PREAMBLE();
     98         shadow_frame.SetVReg(inst->VRegA_12x(inst_data),
     99                              shadow_frame.GetVReg(inst->VRegB_12x(inst_data)));
    100         inst = inst->Next_1xx();
    101         break;
    102       case Instruction::MOVE_FROM16:
    103         PREAMBLE();
    104         shadow_frame.SetVReg(inst->VRegA_22x(inst_data),
    105                              shadow_frame.GetVReg(inst->VRegB_22x()));
    106         inst = inst->Next_2xx();
    107         break;
    108       case Instruction::MOVE_16:
    109         PREAMBLE();
    110         shadow_frame.SetVReg(inst->VRegA_32x(),
    111                              shadow_frame.GetVReg(inst->VRegB_32x()));
    112         inst = inst->Next_3xx();
    113         break;
    114       case Instruction::MOVE_WIDE:
    115         PREAMBLE();
    116         shadow_frame.SetVRegLong(inst->VRegA_12x(inst_data),
    117                                  shadow_frame.GetVRegLong(inst->VRegB_12x(inst_data)));
    118         inst = inst->Next_1xx();
    119         break;
    120       case Instruction::MOVE_WIDE_FROM16:
    121         PREAMBLE();
    122         shadow_frame.SetVRegLong(inst->VRegA_22x(inst_data),
    123                                  shadow_frame.GetVRegLong(inst->VRegB_22x()));
    124         inst = inst->Next_2xx();
    125         break;
    126       case Instruction::MOVE_WIDE_16:
    127         PREAMBLE();
    128         shadow_frame.SetVRegLong(inst->VRegA_32x(),
    129                                  shadow_frame.GetVRegLong(inst->VRegB_32x()));
    130         inst = inst->Next_3xx();
    131         break;
    132       case Instruction::MOVE_OBJECT:
    133         PREAMBLE();
    134         shadow_frame.SetVRegReference(inst->VRegA_12x(inst_data),
    135                                       shadow_frame.GetVRegReference(inst->VRegB_12x(inst_data)));
    136         inst = inst->Next_1xx();
    137         break;
    138       case Instruction::MOVE_OBJECT_FROM16:
    139         PREAMBLE();
    140         shadow_frame.SetVRegReference(inst->VRegA_22x(inst_data),
    141                                       shadow_frame.GetVRegReference(inst->VRegB_22x()));
    142         inst = inst->Next_2xx();
    143         break;
    144       case Instruction::MOVE_OBJECT_16:
    145         PREAMBLE();
    146         shadow_frame.SetVRegReference(inst->VRegA_32x(),
    147                                       shadow_frame.GetVRegReference(inst->VRegB_32x()));
    148         inst = inst->Next_3xx();
    149         break;
    150       case Instruction::MOVE_RESULT:
    151         PREAMBLE();
    152         shadow_frame.SetVReg(inst->VRegA_11x(inst_data), result_register.GetI());
    153         inst = inst->Next_1xx();
    154         break;
    155       case Instruction::MOVE_RESULT_WIDE:
    156         PREAMBLE();
    157         shadow_frame.SetVRegLong(inst->VRegA_11x(inst_data), result_register.GetJ());
    158         inst = inst->Next_1xx();
    159         break;
    160       case Instruction::MOVE_RESULT_OBJECT:
    161         PREAMBLE();
    162         shadow_frame.SetVRegReference(inst->VRegA_11x(inst_data), result_register.GetL());
    163         inst = inst->Next_1xx();
    164         break;
    165       case Instruction::MOVE_EXCEPTION: {
    166         PREAMBLE();
    167         Throwable* exception = self->GetException(nullptr);
    168         DCHECK(exception != nullptr) << "No pending exception on MOVE_EXCEPTION instruction";
    169         shadow_frame.SetVRegReference(inst->VRegA_11x(inst_data), exception);
    170         self->ClearException();
    171         inst = inst->Next_1xx();
    172         break;
    173       }
    174       case Instruction::RETURN_VOID: {
    175         JValue result;
    176         if (do_access_check) {
    177           // If access checks are required then the dex-to-dex compiler and analysis of
    178           // whether the class has final fields hasn't been performed. Conservatively
    179           // perform the memory barrier now.
    180           QuasiAtomic::ThreadFenceForConstructor();
    181         }
    182         if (UNLIKELY(self->TestAllFlags())) {
    183           CheckSuspend(self);
    184         }
    185         if (UNLIKELY(instrumentation->HasMethodExitListeners())) {
    186           instrumentation->MethodExitEvent(self, shadow_frame.GetThisObject(code_item->ins_size_),
    187                                            shadow_frame.GetMethod(), inst->GetDexPc(insns),
    188                                            result);
    189         } else if (UNLIKELY(instrumentation->HasDexPcListeners())) {
    190           instrumentation->DexPcMovedEvent(self, shadow_frame.GetThisObject(code_item->ins_size_),
    191                                            shadow_frame.GetMethod(), dex_pc);
    192         }
    193         return result;
    194       }
    195       case Instruction::RETURN_VOID_BARRIER: {
    196         QuasiAtomic::ThreadFenceForConstructor();
    197         JValue result;
    198         if (UNLIKELY(self->TestAllFlags())) {
    199           CheckSuspend(self);
    200         }
    201         if (UNLIKELY(instrumentation->HasMethodExitListeners())) {
    202           instrumentation->MethodExitEvent(self, shadow_frame.GetThisObject(code_item->ins_size_),
    203                                            shadow_frame.GetMethod(), inst->GetDexPc(insns),
    204                                            result);
    205         } else if (UNLIKELY(instrumentation->HasDexPcListeners())) {
    206           instrumentation->DexPcMovedEvent(self, shadow_frame.GetThisObject(code_item->ins_size_),
    207                                            shadow_frame.GetMethod(), dex_pc);
    208         }
    209         return result;
    210       }
    211       case Instruction::RETURN: {
    212         JValue result;
    213         result.SetJ(0);
    214         result.SetI(shadow_frame.GetVReg(inst->VRegA_11x(inst_data)));
    215         if (UNLIKELY(self->TestAllFlags())) {
    216           CheckSuspend(self);
    217         }
    218         if (UNLIKELY(instrumentation->HasMethodExitListeners())) {
    219           instrumentation->MethodExitEvent(self, shadow_frame.GetThisObject(code_item->ins_size_),
    220                                            shadow_frame.GetMethod(), inst->GetDexPc(insns),
    221                                            result);
    222         } else if (UNLIKELY(instrumentation->HasDexPcListeners())) {
    223           instrumentation->DexPcMovedEvent(self, shadow_frame.GetThisObject(code_item->ins_size_),
    224                                            shadow_frame.GetMethod(), dex_pc);
    225         }
    226         return result;
    227       }
    228       case Instruction::RETURN_WIDE: {
    229         JValue result;
    230         result.SetJ(shadow_frame.GetVRegLong(inst->VRegA_11x(inst_data)));
    231         if (UNLIKELY(self->TestAllFlags())) {
    232           CheckSuspend(self);
    233         }
    234         if (UNLIKELY(instrumentation->HasMethodExitListeners())) {
    235           instrumentation->MethodExitEvent(self, shadow_frame.GetThisObject(code_item->ins_size_),
    236                                            shadow_frame.GetMethod(), inst->GetDexPc(insns),
    237                                            result);
    238         } else if (UNLIKELY(instrumentation->HasDexPcListeners())) {
    239           instrumentation->DexPcMovedEvent(self, shadow_frame.GetThisObject(code_item->ins_size_),
    240                                            shadow_frame.GetMethod(), dex_pc);
    241         }
    242         return result;
    243       }
    244       case Instruction::RETURN_OBJECT: {
    245         JValue result;
    246         if (UNLIKELY(self->TestAllFlags())) {
    247           CheckSuspend(self);
    248         }
    249         const size_t ref_idx = inst->VRegA_11x(inst_data);
    250         Object* obj_result = shadow_frame.GetVRegReference(ref_idx);
    251         if (do_assignability_check && obj_result != NULL) {
    252           StackHandleScope<1> hs(self);
    253           MethodHelper mhs(hs.NewHandle(shadow_frame.GetMethod()));
    254           Class* return_type = mhs.GetReturnType();
    255           // Re-load since it might have moved.
    256           obj_result = shadow_frame.GetVRegReference(ref_idx);
    257           if (return_type == NULL) {
    258             // Return the pending exception.
    259             HANDLE_PENDING_EXCEPTION();
    260           }
    261           if (!obj_result->VerifierInstanceOf(return_type)) {
    262             // This should never happen.
    263             std::string temp1, temp2;
    264             self->ThrowNewExceptionF(self->GetCurrentLocationForThrow(),
    265                                      "Ljava/lang/VirtualMachineError;",
    266                                      "Returning '%s' that is not instance of return type '%s'",
    267                                      obj_result->GetClass()->GetDescriptor(&temp1),
    268                                      return_type->GetDescriptor(&temp2));
    269             HANDLE_PENDING_EXCEPTION();
    270           }
    271         }
    272         result.SetL(obj_result);
    273         if (UNLIKELY(instrumentation->HasMethodExitListeners())) {
    274           instrumentation->MethodExitEvent(self, shadow_frame.GetThisObject(code_item->ins_size_),
    275                                            shadow_frame.GetMethod(), inst->GetDexPc(insns),
    276                                            result);
    277         } else if (UNLIKELY(instrumentation->HasDexPcListeners())) {
    278           instrumentation->DexPcMovedEvent(self, shadow_frame.GetThisObject(code_item->ins_size_),
    279                                            shadow_frame.GetMethod(), dex_pc);
    280         }
    281         return result;
    282       }
    283       case Instruction::CONST_4: {
    284         PREAMBLE();
    285         uint4_t dst = inst->VRegA_11n(inst_data);
    286         int4_t val = inst->VRegB_11n(inst_data);
    287         shadow_frame.SetVReg(dst, val);
    288         if (val == 0) {
    289           shadow_frame.SetVRegReference(dst, NULL);
    290         }
    291         inst = inst->Next_1xx();
    292         break;
    293       }
    294       case Instruction::CONST_16: {
    295         PREAMBLE();
    296         uint8_t dst = inst->VRegA_21s(inst_data);
    297         int16_t val = inst->VRegB_21s();
    298         shadow_frame.SetVReg(dst, val);
    299         if (val == 0) {
    300           shadow_frame.SetVRegReference(dst, NULL);
    301         }
    302         inst = inst->Next_2xx();
    303         break;
    304       }
    305       case Instruction::CONST: {
    306         PREAMBLE();
    307         uint8_t dst = inst->VRegA_31i(inst_data);
    308         int32_t val = inst->VRegB_31i();
    309         shadow_frame.SetVReg(dst, val);
    310         if (val == 0) {
    311           shadow_frame.SetVRegReference(dst, NULL);
    312         }
    313         inst = inst->Next_3xx();
    314         break;
    315       }
    316       case Instruction::CONST_HIGH16: {
    317         PREAMBLE();
    318         uint8_t dst = inst->VRegA_21h(inst_data);
    319         int32_t val = static_cast<int32_t>(inst->VRegB_21h() << 16);
    320         shadow_frame.SetVReg(dst, val);
    321         if (val == 0) {
    322           shadow_frame.SetVRegReference(dst, NULL);
    323         }
    324         inst = inst->Next_2xx();
    325         break;
    326       }
    327       case Instruction::CONST_WIDE_16:
    328         PREAMBLE();
    329         shadow_frame.SetVRegLong(inst->VRegA_21s(inst_data), inst->VRegB_21s());
    330         inst = inst->Next_2xx();
    331         break;
    332       case Instruction::CONST_WIDE_32:
    333         PREAMBLE();
    334         shadow_frame.SetVRegLong(inst->VRegA_31i(inst_data), inst->VRegB_31i());
    335         inst = inst->Next_3xx();
    336         break;
    337       case Instruction::CONST_WIDE:
    338         PREAMBLE();
    339         shadow_frame.SetVRegLong(inst->VRegA_51l(inst_data), inst->VRegB_51l());
    340         inst = inst->Next_51l();
    341         break;
    342       case Instruction::CONST_WIDE_HIGH16:
    343         PREAMBLE();
    344         shadow_frame.SetVRegLong(inst->VRegA_21h(inst_data),
    345                                  static_cast<uint64_t>(inst->VRegB_21h()) << 48);
    346         inst = inst->Next_2xx();
    347         break;
    348       case Instruction::CONST_STRING: {
    349         PREAMBLE();
    350         String* s = ResolveString(self, mh,  inst->VRegB_21c());
    351         if (UNLIKELY(s == NULL)) {
    352           HANDLE_PENDING_EXCEPTION();
    353         } else {
    354           shadow_frame.SetVRegReference(inst->VRegA_21c(inst_data), s);
    355           inst = inst->Next_2xx();
    356         }
    357         break;
    358       }
    359       case Instruction::CONST_STRING_JUMBO: {
    360         PREAMBLE();
    361         String* s = ResolveString(self, mh,  inst->VRegB_31c());
    362         if (UNLIKELY(s == NULL)) {
    363           HANDLE_PENDING_EXCEPTION();
    364         } else {
    365           shadow_frame.SetVRegReference(inst->VRegA_31c(inst_data), s);
    366           inst = inst->Next_3xx();
    367         }
    368         break;
    369       }
    370       case Instruction::CONST_CLASS: {
    371         PREAMBLE();
    372         Class* c = ResolveVerifyAndClinit(inst->VRegB_21c(), shadow_frame.GetMethod(),
    373                                           self, false, do_access_check);
    374         if (UNLIKELY(c == NULL)) {
    375           HANDLE_PENDING_EXCEPTION();
    376         } else {
    377           shadow_frame.SetVRegReference(inst->VRegA_21c(inst_data), c);
    378           inst = inst->Next_2xx();
    379         }
    380         break;
    381       }
    382       case Instruction::MONITOR_ENTER: {
    383         PREAMBLE();
    384         Object* obj = shadow_frame.GetVRegReference(inst->VRegA_11x(inst_data));
    385         if (UNLIKELY(obj == NULL)) {
    386           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
    387           HANDLE_PENDING_EXCEPTION();
    388         } else {
    389           DoMonitorEnter(self, obj);
    390           POSSIBLY_HANDLE_PENDING_EXCEPTION(self->IsExceptionPending(), Next_1xx);
    391         }
    392         break;
    393       }
    394       case Instruction::MONITOR_EXIT: {
    395         PREAMBLE();
    396         Object* obj = shadow_frame.GetVRegReference(inst->VRegA_11x(inst_data));
    397         if (UNLIKELY(obj == NULL)) {
    398           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
    399           HANDLE_PENDING_EXCEPTION();
    400         } else {
    401           DoMonitorExit(self, obj);
    402           POSSIBLY_HANDLE_PENDING_EXCEPTION(self->IsExceptionPending(), Next_1xx);
    403         }
    404         break;
    405       }
    406       case Instruction::CHECK_CAST: {
    407         PREAMBLE();
    408         Class* c = ResolveVerifyAndClinit(inst->VRegB_21c(), shadow_frame.GetMethod(),
    409                                           self, false, do_access_check);
    410         if (UNLIKELY(c == NULL)) {
    411           HANDLE_PENDING_EXCEPTION();
    412         } else {
    413           Object* obj = shadow_frame.GetVRegReference(inst->VRegA_21c(inst_data));
    414           if (UNLIKELY(obj != NULL && !obj->InstanceOf(c))) {
    415             ThrowClassCastException(c, obj->GetClass());
    416             HANDLE_PENDING_EXCEPTION();
    417           } else {
    418             inst = inst->Next_2xx();
    419           }
    420         }
    421         break;
    422       }
    423       case Instruction::INSTANCE_OF: {
    424         PREAMBLE();
    425         Class* c = ResolveVerifyAndClinit(inst->VRegC_22c(), shadow_frame.GetMethod(),
    426                                           self, false, do_access_check);
    427         if (UNLIKELY(c == NULL)) {
    428           HANDLE_PENDING_EXCEPTION();
    429         } else {
    430           Object* obj = shadow_frame.GetVRegReference(inst->VRegB_22c(inst_data));
    431           shadow_frame.SetVReg(inst->VRegA_22c(inst_data), (obj != NULL && obj->InstanceOf(c)) ? 1 : 0);
    432           inst = inst->Next_2xx();
    433         }
    434         break;
    435       }
    436       case Instruction::ARRAY_LENGTH:  {
    437         PREAMBLE();
    438         Object* array = shadow_frame.GetVRegReference(inst->VRegB_12x(inst_data));
    439         if (UNLIKELY(array == NULL)) {
    440           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
    441           HANDLE_PENDING_EXCEPTION();
    442         } else {
    443           shadow_frame.SetVReg(inst->VRegA_12x(inst_data), array->AsArray()->GetLength());
    444           inst = inst->Next_1xx();
    445         }
    446         break;
    447       }
    448       case Instruction::NEW_INSTANCE: {
    449         PREAMBLE();
    450         Runtime* runtime = Runtime::Current();
    451         Object* obj = AllocObjectFromCode<do_access_check, true>(
    452             inst->VRegB_21c(), shadow_frame.GetMethod(), self,
    453             runtime->GetHeap()->GetCurrentAllocator());
    454         if (UNLIKELY(obj == NULL)) {
    455           HANDLE_PENDING_EXCEPTION();
    456         } else {
    457           obj->GetClass()->AssertInitializedOrInitializingInThread(self);
    458           // Don't allow finalizable objects to be allocated during a transaction since these can't
    459           // be finalized without a started runtime.
    460           if (transaction_active && obj->GetClass()->IsFinalizable()) {
    461             AbortTransaction(self, "Allocating finalizable object in transaction: %s",
    462                              PrettyTypeOf(obj).c_str());
    463             HANDLE_PENDING_EXCEPTION();
    464             break;
    465           }
    466           shadow_frame.SetVRegReference(inst->VRegA_21c(inst_data), obj);
    467           inst = inst->Next_2xx();
    468         }
    469         break;
    470       }
    471       case Instruction::NEW_ARRAY: {
    472         PREAMBLE();
    473         int32_t length = shadow_frame.GetVReg(inst->VRegB_22c(inst_data));
    474         Object* obj = AllocArrayFromCode<do_access_check, true>(
    475             inst->VRegC_22c(), shadow_frame.GetMethod(), length, self,
    476             Runtime::Current()->GetHeap()->GetCurrentAllocator());
    477         if (UNLIKELY(obj == NULL)) {
    478           HANDLE_PENDING_EXCEPTION();
    479         } else {
    480           shadow_frame.SetVRegReference(inst->VRegA_22c(inst_data), obj);
    481           inst = inst->Next_2xx();
    482         }
    483         break;
    484       }
    485       case Instruction::FILLED_NEW_ARRAY: {
    486         PREAMBLE();
    487         bool success =
    488             DoFilledNewArray<false, do_access_check, transaction_active>(inst, shadow_frame, self,
    489                                                                          &result_register);
    490         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_3xx);
    491         break;
    492       }
    493       case Instruction::FILLED_NEW_ARRAY_RANGE: {
    494         PREAMBLE();
    495         bool success =
    496             DoFilledNewArray<true, do_access_check, transaction_active>(inst, shadow_frame,
    497                                                                         self, &result_register);
    498         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_3xx);
    499         break;
    500       }
    501       case Instruction::FILL_ARRAY_DATA: {
    502         PREAMBLE();
    503         Object* obj = shadow_frame.GetVRegReference(inst->VRegA_31t(inst_data));
    504         if (UNLIKELY(obj == NULL)) {
    505           ThrowNullPointerException(NULL, "null array in FILL_ARRAY_DATA");
    506           HANDLE_PENDING_EXCEPTION();
    507           break;
    508         }
    509         Array* array = obj->AsArray();
    510         DCHECK(array->IsArrayInstance() && !array->IsObjectArray());
    511         const uint16_t* payload_addr = reinterpret_cast<const uint16_t*>(inst) + inst->VRegB_31t();
    512         const Instruction::ArrayDataPayload* payload =
    513             reinterpret_cast<const Instruction::ArrayDataPayload*>(payload_addr);
    514         if (UNLIKELY(static_cast<int32_t>(payload->element_count) > array->GetLength())) {
    515           self->ThrowNewExceptionF(shadow_frame.GetCurrentLocationForThrow(),
    516                                    "Ljava/lang/ArrayIndexOutOfBoundsException;",
    517                                    "failed FILL_ARRAY_DATA; length=%d, index=%d",
    518                                    array->GetLength(), payload->element_count);
    519           HANDLE_PENDING_EXCEPTION();
    520           break;
    521         }
    522         if (transaction_active) {
    523           RecordArrayElementsInTransaction(array, payload->element_count);
    524         }
    525         uint32_t size_in_bytes = payload->element_count * payload->element_width;
    526         memcpy(array->GetRawData(payload->element_width, 0), payload->data, size_in_bytes);
    527         inst = inst->Next_3xx();
    528         break;
    529       }
    530       case Instruction::THROW: {
    531         PREAMBLE();
    532         Object* exception = shadow_frame.GetVRegReference(inst->VRegA_11x(inst_data));
    533         if (UNLIKELY(exception == NULL)) {
    534           ThrowNullPointerException(NULL, "throw with null exception");
    535         } else if (do_assignability_check && !exception->GetClass()->IsThrowableClass()) {
    536           // This should never happen.
    537           std::string temp;
    538           self->ThrowNewExceptionF(self->GetCurrentLocationForThrow(),
    539                                    "Ljava/lang/VirtualMachineError;",
    540                                    "Throwing '%s' that is not instance of Throwable",
    541                                    exception->GetClass()->GetDescriptor(&temp));
    542         } else {
    543           self->SetException(shadow_frame.GetCurrentLocationForThrow(), exception->AsThrowable());
    544         }
    545         HANDLE_PENDING_EXCEPTION();
    546         break;
    547       }
    548       case Instruction::GOTO: {
    549         PREAMBLE();
    550         int8_t offset = inst->VRegA_10t(inst_data);
    551         if (IsBackwardBranch(offset)) {
    552           if (UNLIKELY(self->TestAllFlags())) {
    553             CheckSuspend(self);
    554           }
    555         }
    556         inst = inst->RelativeAt(offset);
    557         break;
    558       }
    559       case Instruction::GOTO_16: {
    560         PREAMBLE();
    561         int16_t offset = inst->VRegA_20t();
    562         if (IsBackwardBranch(offset)) {
    563           if (UNLIKELY(self->TestAllFlags())) {
    564             CheckSuspend(self);
    565           }
    566         }
    567         inst = inst->RelativeAt(offset);
    568         break;
    569       }
    570       case Instruction::GOTO_32: {
    571         PREAMBLE();
    572         int32_t offset = inst->VRegA_30t();
    573         if (IsBackwardBranch(offset)) {
    574           if (UNLIKELY(self->TestAllFlags())) {
    575             CheckSuspend(self);
    576           }
    577         }
    578         inst = inst->RelativeAt(offset);
    579         break;
    580       }
    581       case Instruction::PACKED_SWITCH: {
    582         PREAMBLE();
    583         int32_t offset = DoPackedSwitch(inst, shadow_frame, inst_data);
    584         if (IsBackwardBranch(offset)) {
    585           if (UNLIKELY(self->TestAllFlags())) {
    586             CheckSuspend(self);
    587           }
    588         }
    589         inst = inst->RelativeAt(offset);
    590         break;
    591       }
    592       case Instruction::SPARSE_SWITCH: {
    593         PREAMBLE();
    594         int32_t offset = DoSparseSwitch(inst, shadow_frame, inst_data);
    595         if (IsBackwardBranch(offset)) {
    596           if (UNLIKELY(self->TestAllFlags())) {
    597             CheckSuspend(self);
    598           }
    599         }
    600         inst = inst->RelativeAt(offset);
    601         break;
    602       }
    603       case Instruction::CMPL_FLOAT: {
    604         PREAMBLE();
    605         float val1 = shadow_frame.GetVRegFloat(inst->VRegB_23x());
    606         float val2 = shadow_frame.GetVRegFloat(inst->VRegC_23x());
    607         int32_t result;
    608         if (val1 > val2) {
    609           result = 1;
    610         } else if (val1 == val2) {
    611           result = 0;
    612         } else {
    613           result = -1;
    614         }
    615         shadow_frame.SetVReg(inst->VRegA_23x(inst_data), result);
    616         inst = inst->Next_2xx();
    617         break;
    618       }
    619       case Instruction::CMPG_FLOAT: {
    620         PREAMBLE();
    621         float val1 = shadow_frame.GetVRegFloat(inst->VRegB_23x());
    622         float val2 = shadow_frame.GetVRegFloat(inst->VRegC_23x());
    623         int32_t result;
    624         if (val1 < val2) {
    625           result = -1;
    626         } else if (val1 == val2) {
    627           result = 0;
    628         } else {
    629           result = 1;
    630         }
    631         shadow_frame.SetVReg(inst->VRegA_23x(inst_data), result);
    632         inst = inst->Next_2xx();
    633         break;
    634       }
    635       case Instruction::CMPL_DOUBLE: {
    636         PREAMBLE();
    637         double val1 = shadow_frame.GetVRegDouble(inst->VRegB_23x());
    638         double val2 = shadow_frame.GetVRegDouble(inst->VRegC_23x());
    639         int32_t result;
    640         if (val1 > val2) {
    641           result = 1;
    642         } else if (val1 == val2) {
    643           result = 0;
    644         } else {
    645           result = -1;
    646         }
    647         shadow_frame.SetVReg(inst->VRegA_23x(inst_data), result);
    648         inst = inst->Next_2xx();
    649         break;
    650       }
    651 
    652       case Instruction::CMPG_DOUBLE: {
    653         PREAMBLE();
    654         double val1 = shadow_frame.GetVRegDouble(inst->VRegB_23x());
    655         double val2 = shadow_frame.GetVRegDouble(inst->VRegC_23x());
    656         int32_t result;
    657         if (val1 < val2) {
    658           result = -1;
    659         } else if (val1 == val2) {
    660           result = 0;
    661         } else {
    662           result = 1;
    663         }
    664         shadow_frame.SetVReg(inst->VRegA_23x(inst_data), result);
    665         inst = inst->Next_2xx();
    666         break;
    667       }
    668       case Instruction::CMP_LONG: {
    669         PREAMBLE();
    670         int64_t val1 = shadow_frame.GetVRegLong(inst->VRegB_23x());
    671         int64_t val2 = shadow_frame.GetVRegLong(inst->VRegC_23x());
    672         int32_t result;
    673         if (val1 > val2) {
    674           result = 1;
    675         } else if (val1 == val2) {
    676           result = 0;
    677         } else {
    678           result = -1;
    679         }
    680         shadow_frame.SetVReg(inst->VRegA_23x(inst_data), result);
    681         inst = inst->Next_2xx();
    682         break;
    683       }
    684       case Instruction::IF_EQ: {
    685         PREAMBLE();
    686         if (shadow_frame.GetVReg(inst->VRegA_22t(inst_data)) == shadow_frame.GetVReg(inst->VRegB_22t(inst_data))) {
    687           int16_t offset = inst->VRegC_22t();
    688           if (IsBackwardBranch(offset)) {
    689             if (UNLIKELY(self->TestAllFlags())) {
    690               CheckSuspend(self);
    691             }
    692           }
    693           inst = inst->RelativeAt(offset);
    694         } else {
    695           inst = inst->Next_2xx();
    696         }
    697         break;
    698       }
    699       case Instruction::IF_NE: {
    700         PREAMBLE();
    701         if (shadow_frame.GetVReg(inst->VRegA_22t(inst_data)) != shadow_frame.GetVReg(inst->VRegB_22t(inst_data))) {
    702           int16_t offset = inst->VRegC_22t();
    703           if (IsBackwardBranch(offset)) {
    704             if (UNLIKELY(self->TestAllFlags())) {
    705               CheckSuspend(self);
    706             }
    707           }
    708           inst = inst->RelativeAt(offset);
    709         } else {
    710           inst = inst->Next_2xx();
    711         }
    712         break;
    713       }
    714       case Instruction::IF_LT: {
    715         PREAMBLE();
    716         if (shadow_frame.GetVReg(inst->VRegA_22t(inst_data)) < shadow_frame.GetVReg(inst->VRegB_22t(inst_data))) {
    717           int16_t offset = inst->VRegC_22t();
    718           if (IsBackwardBranch(offset)) {
    719             if (UNLIKELY(self->TestAllFlags())) {
    720               CheckSuspend(self);
    721             }
    722           }
    723           inst = inst->RelativeAt(offset);
    724         } else {
    725           inst = inst->Next_2xx();
    726         }
    727         break;
    728       }
    729       case Instruction::IF_GE: {
    730         PREAMBLE();
    731         if (shadow_frame.GetVReg(inst->VRegA_22t(inst_data)) >= shadow_frame.GetVReg(inst->VRegB_22t(inst_data))) {
    732           int16_t offset = inst->VRegC_22t();
    733           if (IsBackwardBranch(offset)) {
    734             if (UNLIKELY(self->TestAllFlags())) {
    735               CheckSuspend(self);
    736             }
    737           }
    738           inst = inst->RelativeAt(offset);
    739         } else {
    740           inst = inst->Next_2xx();
    741         }
    742         break;
    743       }
    744       case Instruction::IF_GT: {
    745         PREAMBLE();
    746         if (shadow_frame.GetVReg(inst->VRegA_22t(inst_data)) > shadow_frame.GetVReg(inst->VRegB_22t(inst_data))) {
    747           int16_t offset = inst->VRegC_22t();
    748           if (IsBackwardBranch(offset)) {
    749             if (UNLIKELY(self->TestAllFlags())) {
    750               CheckSuspend(self);
    751             }
    752           }
    753           inst = inst->RelativeAt(offset);
    754         } else {
    755           inst = inst->Next_2xx();
    756         }
    757         break;
    758       }
    759       case Instruction::IF_LE: {
    760         PREAMBLE();
    761         if (shadow_frame.GetVReg(inst->VRegA_22t(inst_data)) <= shadow_frame.GetVReg(inst->VRegB_22t(inst_data))) {
    762           int16_t offset = inst->VRegC_22t();
    763           if (IsBackwardBranch(offset)) {
    764             if (UNLIKELY(self->TestAllFlags())) {
    765               CheckSuspend(self);
    766             }
    767           }
    768           inst = inst->RelativeAt(offset);
    769         } else {
    770           inst = inst->Next_2xx();
    771         }
    772         break;
    773       }
    774       case Instruction::IF_EQZ: {
    775         PREAMBLE();
    776         if (shadow_frame.GetVReg(inst->VRegA_21t(inst_data)) == 0) {
    777           int16_t offset = inst->VRegB_21t();
    778           if (IsBackwardBranch(offset)) {
    779             if (UNLIKELY(self->TestAllFlags())) {
    780               CheckSuspend(self);
    781             }
    782           }
    783           inst = inst->RelativeAt(offset);
    784         } else {
    785           inst = inst->Next_2xx();
    786         }
    787         break;
    788       }
    789       case Instruction::IF_NEZ: {
    790         PREAMBLE();
    791         if (shadow_frame.GetVReg(inst->VRegA_21t(inst_data)) != 0) {
    792           int16_t offset = inst->VRegB_21t();
    793           if (IsBackwardBranch(offset)) {
    794             if (UNLIKELY(self->TestAllFlags())) {
    795               CheckSuspend(self);
    796             }
    797           }
    798           inst = inst->RelativeAt(offset);
    799         } else {
    800           inst = inst->Next_2xx();
    801         }
    802         break;
    803       }
    804       case Instruction::IF_LTZ: {
    805         PREAMBLE();
    806         if (shadow_frame.GetVReg(inst->VRegA_21t(inst_data)) < 0) {
    807           int16_t offset = inst->VRegB_21t();
    808           if (IsBackwardBranch(offset)) {
    809             if (UNLIKELY(self->TestAllFlags())) {
    810               CheckSuspend(self);
    811             }
    812           }
    813           inst = inst->RelativeAt(offset);
    814         } else {
    815           inst = inst->Next_2xx();
    816         }
    817         break;
    818       }
    819       case Instruction::IF_GEZ: {
    820         PREAMBLE();
    821         if (shadow_frame.GetVReg(inst->VRegA_21t(inst_data)) >= 0) {
    822           int16_t offset = inst->VRegB_21t();
    823           if (IsBackwardBranch(offset)) {
    824             if (UNLIKELY(self->TestAllFlags())) {
    825               CheckSuspend(self);
    826             }
    827           }
    828           inst = inst->RelativeAt(offset);
    829         } else {
    830           inst = inst->Next_2xx();
    831         }
    832         break;
    833       }
    834       case Instruction::IF_GTZ: {
    835         PREAMBLE();
    836         if (shadow_frame.GetVReg(inst->VRegA_21t(inst_data)) > 0) {
    837           int16_t offset = inst->VRegB_21t();
    838           if (IsBackwardBranch(offset)) {
    839             if (UNLIKELY(self->TestAllFlags())) {
    840               CheckSuspend(self);
    841             }
    842           }
    843           inst = inst->RelativeAt(offset);
    844         } else {
    845           inst = inst->Next_2xx();
    846         }
    847         break;
    848       }
    849       case Instruction::IF_LEZ:  {
    850         PREAMBLE();
    851         if (shadow_frame.GetVReg(inst->VRegA_21t(inst_data)) <= 0) {
    852           int16_t offset = inst->VRegB_21t();
    853           if (IsBackwardBranch(offset)) {
    854             if (UNLIKELY(self->TestAllFlags())) {
    855               CheckSuspend(self);
    856             }
    857           }
    858           inst = inst->RelativeAt(offset);
    859         } else {
    860           inst = inst->Next_2xx();
    861         }
    862         break;
    863       }
    864       case Instruction::AGET_BOOLEAN: {
    865         PREAMBLE();
    866         Object* a = shadow_frame.GetVRegReference(inst->VRegB_23x());
    867         if (UNLIKELY(a == NULL)) {
    868           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
    869           HANDLE_PENDING_EXCEPTION();
    870           break;
    871         }
    872         int32_t index = shadow_frame.GetVReg(inst->VRegC_23x());
    873         BooleanArray* array = a->AsBooleanArray();
    874         if (array->CheckIsValidIndex(index)) {
    875           shadow_frame.SetVReg(inst->VRegA_23x(inst_data), array->GetWithoutChecks(index));
    876           inst = inst->Next_2xx();
    877         } else {
    878           HANDLE_PENDING_EXCEPTION();
    879         }
    880         break;
    881       }
    882       case Instruction::AGET_BYTE: {
    883         PREAMBLE();
    884         Object* a = shadow_frame.GetVRegReference(inst->VRegB_23x());
    885         if (UNLIKELY(a == NULL)) {
    886           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
    887           HANDLE_PENDING_EXCEPTION();
    888           break;
    889         }
    890         int32_t index = shadow_frame.GetVReg(inst->VRegC_23x());
    891         ByteArray* array = a->AsByteArray();
    892         if (array->CheckIsValidIndex(index)) {
    893           shadow_frame.SetVReg(inst->VRegA_23x(inst_data), array->GetWithoutChecks(index));
    894           inst = inst->Next_2xx();
    895         } else {
    896           HANDLE_PENDING_EXCEPTION();
    897         }
    898         break;
    899       }
    900       case Instruction::AGET_CHAR: {
    901         PREAMBLE();
    902         Object* a = shadow_frame.GetVRegReference(inst->VRegB_23x());
    903         if (UNLIKELY(a == NULL)) {
    904           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
    905           HANDLE_PENDING_EXCEPTION();
    906           break;
    907         }
    908         int32_t index = shadow_frame.GetVReg(inst->VRegC_23x());
    909         CharArray* array = a->AsCharArray();
    910         if (array->CheckIsValidIndex(index)) {
    911           shadow_frame.SetVReg(inst->VRegA_23x(inst_data), array->GetWithoutChecks(index));
    912           inst = inst->Next_2xx();
    913         } else {
    914           HANDLE_PENDING_EXCEPTION();
    915         }
    916         break;
    917       }
    918       case Instruction::AGET_SHORT: {
    919         PREAMBLE();
    920         Object* a = shadow_frame.GetVRegReference(inst->VRegB_23x());
    921         if (UNLIKELY(a == NULL)) {
    922           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
    923           HANDLE_PENDING_EXCEPTION();
    924           break;
    925         }
    926         int32_t index = shadow_frame.GetVReg(inst->VRegC_23x());
    927         ShortArray* array = a->AsShortArray();
    928         if (array->CheckIsValidIndex(index)) {
    929           shadow_frame.SetVReg(inst->VRegA_23x(inst_data), array->GetWithoutChecks(index));
    930           inst = inst->Next_2xx();
    931         } else {
    932           HANDLE_PENDING_EXCEPTION();
    933         }
    934         break;
    935       }
    936       case Instruction::AGET: {
    937         PREAMBLE();
    938         Object* a = shadow_frame.GetVRegReference(inst->VRegB_23x());
    939         if (UNLIKELY(a == NULL)) {
    940           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
    941           HANDLE_PENDING_EXCEPTION();
    942           break;
    943         }
    944         int32_t index = shadow_frame.GetVReg(inst->VRegC_23x());
    945         IntArray* array = a->AsIntArray();
    946         if (array->CheckIsValidIndex(index)) {
    947           shadow_frame.SetVReg(inst->VRegA_23x(inst_data), array->GetWithoutChecks(index));
    948           inst = inst->Next_2xx();
    949         } else {
    950           HANDLE_PENDING_EXCEPTION();
    951         }
    952         break;
    953       }
    954       case Instruction::AGET_WIDE:  {
    955         PREAMBLE();
    956         Object* a = shadow_frame.GetVRegReference(inst->VRegB_23x());
    957         if (UNLIKELY(a == NULL)) {
    958           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
    959           HANDLE_PENDING_EXCEPTION();
    960           break;
    961         }
    962         int32_t index = shadow_frame.GetVReg(inst->VRegC_23x());
    963         LongArray* array = a->AsLongArray();
    964         if (array->CheckIsValidIndex(index)) {
    965           shadow_frame.SetVRegLong(inst->VRegA_23x(inst_data), array->GetWithoutChecks(index));
    966           inst = inst->Next_2xx();
    967         } else {
    968           HANDLE_PENDING_EXCEPTION();
    969         }
    970         break;
    971       }
    972       case Instruction::AGET_OBJECT: {
    973         PREAMBLE();
    974         Object* a = shadow_frame.GetVRegReference(inst->VRegB_23x());
    975         if (UNLIKELY(a == NULL)) {
    976           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
    977           HANDLE_PENDING_EXCEPTION();
    978           break;
    979         }
    980         int32_t index = shadow_frame.GetVReg(inst->VRegC_23x());
    981         ObjectArray<Object>* array = a->AsObjectArray<Object>();
    982         if (array->CheckIsValidIndex(index)) {
    983           shadow_frame.SetVRegReference(inst->VRegA_23x(inst_data), array->GetWithoutChecks(index));
    984           inst = inst->Next_2xx();
    985         } else {
    986           HANDLE_PENDING_EXCEPTION();
    987         }
    988         break;
    989       }
    990       case Instruction::APUT_BOOLEAN: {
    991         PREAMBLE();
    992         Object* a = shadow_frame.GetVRegReference(inst->VRegB_23x());
    993         if (UNLIKELY(a == NULL)) {
    994           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
    995           HANDLE_PENDING_EXCEPTION();
    996           break;
    997         }
    998         uint8_t val = shadow_frame.GetVReg(inst->VRegA_23x(inst_data));
    999         int32_t index = shadow_frame.GetVReg(inst->VRegC_23x());
   1000         BooleanArray* array = a->AsBooleanArray();
   1001         if (array->CheckIsValidIndex(index)) {
   1002           array->SetWithoutChecks<transaction_active>(index, val);
   1003           inst = inst->Next_2xx();
   1004         } else {
   1005           HANDLE_PENDING_EXCEPTION();
   1006         }
   1007         break;
   1008       }
   1009       case Instruction::APUT_BYTE: {
   1010         PREAMBLE();
   1011         Object* a = shadow_frame.GetVRegReference(inst->VRegB_23x());
   1012         if (UNLIKELY(a == NULL)) {
   1013           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
   1014           HANDLE_PENDING_EXCEPTION();
   1015           break;
   1016         }
   1017         int8_t val = shadow_frame.GetVReg(inst->VRegA_23x(inst_data));
   1018         int32_t index = shadow_frame.GetVReg(inst->VRegC_23x());
   1019         ByteArray* array = a->AsByteArray();
   1020         if (array->CheckIsValidIndex(index)) {
   1021           array->SetWithoutChecks<transaction_active>(index, val);
   1022           inst = inst->Next_2xx();
   1023         } else {
   1024           HANDLE_PENDING_EXCEPTION();
   1025         }
   1026         break;
   1027       }
   1028       case Instruction::APUT_CHAR: {
   1029         PREAMBLE();
   1030         Object* a = shadow_frame.GetVRegReference(inst->VRegB_23x());
   1031         if (UNLIKELY(a == NULL)) {
   1032           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
   1033           HANDLE_PENDING_EXCEPTION();
   1034           break;
   1035         }
   1036         uint16_t val = shadow_frame.GetVReg(inst->VRegA_23x(inst_data));
   1037         int32_t index = shadow_frame.GetVReg(inst->VRegC_23x());
   1038         CharArray* array = a->AsCharArray();
   1039         if (array->CheckIsValidIndex(index)) {
   1040           array->SetWithoutChecks<transaction_active>(index, val);
   1041           inst = inst->Next_2xx();
   1042         } else {
   1043           HANDLE_PENDING_EXCEPTION();
   1044         }
   1045         break;
   1046       }
   1047       case Instruction::APUT_SHORT: {
   1048         PREAMBLE();
   1049         Object* a = shadow_frame.GetVRegReference(inst->VRegB_23x());
   1050         if (UNLIKELY(a == NULL)) {
   1051           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
   1052           HANDLE_PENDING_EXCEPTION();
   1053           break;
   1054         }
   1055         int16_t val = shadow_frame.GetVReg(inst->VRegA_23x(inst_data));
   1056         int32_t index = shadow_frame.GetVReg(inst->VRegC_23x());
   1057         ShortArray* array = a->AsShortArray();
   1058         if (array->CheckIsValidIndex(index)) {
   1059           array->SetWithoutChecks<transaction_active>(index, val);
   1060           inst = inst->Next_2xx();
   1061         } else {
   1062           HANDLE_PENDING_EXCEPTION();
   1063         }
   1064         break;
   1065       }
   1066       case Instruction::APUT: {
   1067         PREAMBLE();
   1068         Object* a = shadow_frame.GetVRegReference(inst->VRegB_23x());
   1069         if (UNLIKELY(a == NULL)) {
   1070           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
   1071           HANDLE_PENDING_EXCEPTION();
   1072           break;
   1073         }
   1074         int32_t val = shadow_frame.GetVReg(inst->VRegA_23x(inst_data));
   1075         int32_t index = shadow_frame.GetVReg(inst->VRegC_23x());
   1076         IntArray* array = a->AsIntArray();
   1077         if (array->CheckIsValidIndex(index)) {
   1078           array->SetWithoutChecks<transaction_active>(index, val);
   1079           inst = inst->Next_2xx();
   1080         } else {
   1081           HANDLE_PENDING_EXCEPTION();
   1082         }
   1083         break;
   1084       }
   1085       case Instruction::APUT_WIDE: {
   1086         PREAMBLE();
   1087         Object* a = shadow_frame.GetVRegReference(inst->VRegB_23x());
   1088         if (UNLIKELY(a == NULL)) {
   1089           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
   1090           HANDLE_PENDING_EXCEPTION();
   1091           break;
   1092         }
   1093         int64_t val = shadow_frame.GetVRegLong(inst->VRegA_23x(inst_data));
   1094         int32_t index = shadow_frame.GetVReg(inst->VRegC_23x());
   1095         LongArray* array = a->AsLongArray();
   1096         if (array->CheckIsValidIndex(index)) {
   1097           array->SetWithoutChecks<transaction_active>(index, val);
   1098           inst = inst->Next_2xx();
   1099         } else {
   1100           HANDLE_PENDING_EXCEPTION();
   1101         }
   1102         break;
   1103       }
   1104       case Instruction::APUT_OBJECT: {
   1105         PREAMBLE();
   1106         Object* a = shadow_frame.GetVRegReference(inst->VRegB_23x());
   1107         if (UNLIKELY(a == NULL)) {
   1108           ThrowNullPointerExceptionFromInterpreter(shadow_frame);
   1109           HANDLE_PENDING_EXCEPTION();
   1110           break;
   1111         }
   1112         int32_t index = shadow_frame.GetVReg(inst->VRegC_23x());
   1113         Object* val = shadow_frame.GetVRegReference(inst->VRegA_23x(inst_data));
   1114         ObjectArray<Object>* array = a->AsObjectArray<Object>();
   1115         if (array->CheckIsValidIndex(index) && array->CheckAssignable(val)) {
   1116           array->SetWithoutChecks<transaction_active>(index, val);
   1117           inst = inst->Next_2xx();
   1118         } else {
   1119           HANDLE_PENDING_EXCEPTION();
   1120         }
   1121         break;
   1122       }
   1123       case Instruction::IGET_BOOLEAN: {
   1124         PREAMBLE();
   1125         bool success = DoFieldGet<InstancePrimitiveRead, Primitive::kPrimBoolean, do_access_check>(self, shadow_frame, inst, inst_data);
   1126         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1127         break;
   1128       }
   1129       case Instruction::IGET_BYTE: {
   1130         PREAMBLE();
   1131         bool success = DoFieldGet<InstancePrimitiveRead, Primitive::kPrimByte, do_access_check>(self, shadow_frame, inst, inst_data);
   1132         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1133         break;
   1134       }
   1135       case Instruction::IGET_CHAR: {
   1136         PREAMBLE();
   1137         bool success = DoFieldGet<InstancePrimitiveRead, Primitive::kPrimChar, do_access_check>(self, shadow_frame, inst, inst_data);
   1138         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1139         break;
   1140       }
   1141       case Instruction::IGET_SHORT: {
   1142         PREAMBLE();
   1143         bool success = DoFieldGet<InstancePrimitiveRead, Primitive::kPrimShort, do_access_check>(self, shadow_frame, inst, inst_data);
   1144         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1145         break;
   1146       }
   1147       case Instruction::IGET: {
   1148         PREAMBLE();
   1149         bool success = DoFieldGet<InstancePrimitiveRead, Primitive::kPrimInt, do_access_check>(self, shadow_frame, inst, inst_data);
   1150         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1151         break;
   1152       }
   1153       case Instruction::IGET_WIDE: {
   1154         PREAMBLE();
   1155         bool success = DoFieldGet<InstancePrimitiveRead, Primitive::kPrimLong, do_access_check>(self, shadow_frame, inst, inst_data);
   1156         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1157         break;
   1158       }
   1159       case Instruction::IGET_OBJECT: {
   1160         PREAMBLE();
   1161         bool success = DoFieldGet<InstanceObjectRead, Primitive::kPrimNot, do_access_check>(self, shadow_frame, inst, inst_data);
   1162         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1163         break;
   1164       }
   1165       case Instruction::IGET_QUICK: {
   1166         PREAMBLE();
   1167         bool success = DoIGetQuick<Primitive::kPrimInt>(shadow_frame, inst, inst_data);
   1168         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1169         break;
   1170       }
   1171       case Instruction::IGET_WIDE_QUICK: {
   1172         PREAMBLE();
   1173         bool success = DoIGetQuick<Primitive::kPrimLong>(shadow_frame, inst, inst_data);
   1174         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1175         break;
   1176       }
   1177       case Instruction::IGET_OBJECT_QUICK: {
   1178         PREAMBLE();
   1179         bool success = DoIGetQuick<Primitive::kPrimNot>(shadow_frame, inst, inst_data);
   1180         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1181         break;
   1182       }
   1183       case Instruction::SGET_BOOLEAN: {
   1184         PREAMBLE();
   1185         bool success = DoFieldGet<StaticPrimitiveRead, Primitive::kPrimBoolean, do_access_check>(self, shadow_frame, inst, inst_data);
   1186         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1187         break;
   1188       }
   1189       case Instruction::SGET_BYTE: {
   1190         PREAMBLE();
   1191         bool success = DoFieldGet<StaticPrimitiveRead, Primitive::kPrimByte, do_access_check>(self, shadow_frame, inst, inst_data);
   1192         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1193         break;
   1194       }
   1195       case Instruction::SGET_CHAR: {
   1196         PREAMBLE();
   1197         bool success = DoFieldGet<StaticPrimitiveRead, Primitive::kPrimChar, do_access_check>(self, shadow_frame, inst, inst_data);
   1198         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1199         break;
   1200       }
   1201       case Instruction::SGET_SHORT: {
   1202         PREAMBLE();
   1203         bool success = DoFieldGet<StaticPrimitiveRead, Primitive::kPrimShort, do_access_check>(self, shadow_frame, inst, inst_data);
   1204         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1205         break;
   1206       }
   1207       case Instruction::SGET: {
   1208         PREAMBLE();
   1209         bool success = DoFieldGet<StaticPrimitiveRead, Primitive::kPrimInt, do_access_check>(self, shadow_frame, inst, inst_data);
   1210         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1211         break;
   1212       }
   1213       case Instruction::SGET_WIDE: {
   1214         PREAMBLE();
   1215         bool success = DoFieldGet<StaticPrimitiveRead, Primitive::kPrimLong, do_access_check>(self, shadow_frame, inst, inst_data);
   1216         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1217         break;
   1218       }
   1219       case Instruction::SGET_OBJECT: {
   1220         PREAMBLE();
   1221         bool success = DoFieldGet<StaticObjectRead, Primitive::kPrimNot, do_access_check>(self, shadow_frame, inst, inst_data);
   1222         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1223         break;
   1224       }
   1225       case Instruction::IPUT_BOOLEAN: {
   1226         PREAMBLE();
   1227         bool success = DoFieldPut<InstancePrimitiveWrite, Primitive::kPrimBoolean, do_access_check, transaction_active>(self, shadow_frame, inst, inst_data);
   1228         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1229         break;
   1230       }
   1231       case Instruction::IPUT_BYTE: {
   1232         PREAMBLE();
   1233         bool success = DoFieldPut<InstancePrimitiveWrite, Primitive::kPrimByte, do_access_check, transaction_active>(self, shadow_frame, inst, inst_data);
   1234         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1235         break;
   1236       }
   1237       case Instruction::IPUT_CHAR: {
   1238         PREAMBLE();
   1239         bool success = DoFieldPut<InstancePrimitiveWrite, Primitive::kPrimChar, do_access_check, transaction_active>(self, shadow_frame, inst, inst_data);
   1240         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1241         break;
   1242       }
   1243       case Instruction::IPUT_SHORT: {
   1244         PREAMBLE();
   1245         bool success = DoFieldPut<InstancePrimitiveWrite, Primitive::kPrimShort, do_access_check, transaction_active>(self, shadow_frame, inst, inst_data);
   1246         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1247         break;
   1248       }
   1249       case Instruction::IPUT: {
   1250         PREAMBLE();
   1251         bool success = DoFieldPut<InstancePrimitiveWrite, Primitive::kPrimInt, do_access_check, transaction_active>(self, shadow_frame, inst, inst_data);
   1252         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1253         break;
   1254       }
   1255       case Instruction::IPUT_WIDE: {
   1256         PREAMBLE();
   1257         bool success = DoFieldPut<InstancePrimitiveWrite, Primitive::kPrimLong, do_access_check, transaction_active>(self, shadow_frame, inst, inst_data);
   1258         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1259         break;
   1260       }
   1261       case Instruction::IPUT_OBJECT: {
   1262         PREAMBLE();
   1263         bool success = DoFieldPut<InstanceObjectWrite, Primitive::kPrimNot, do_access_check, transaction_active>(self, shadow_frame, inst, inst_data);
   1264         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1265         break;
   1266       }
   1267       case Instruction::IPUT_QUICK: {
   1268         PREAMBLE();
   1269         bool success = DoIPutQuick<Primitive::kPrimInt, transaction_active>(shadow_frame, inst, inst_data);
   1270         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1271         break;
   1272       }
   1273       case Instruction::IPUT_WIDE_QUICK: {
   1274         PREAMBLE();
   1275         bool success = DoIPutQuick<Primitive::kPrimLong, transaction_active>(shadow_frame, inst, inst_data);
   1276         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1277         break;
   1278       }
   1279       case Instruction::IPUT_OBJECT_QUICK: {
   1280         PREAMBLE();
   1281         bool success = DoIPutQuick<Primitive::kPrimNot, transaction_active>(shadow_frame, inst, inst_data);
   1282         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1283         break;
   1284       }
   1285       case Instruction::SPUT_BOOLEAN: {
   1286         PREAMBLE();
   1287         bool success = DoFieldPut<StaticPrimitiveWrite, Primitive::kPrimBoolean, do_access_check, transaction_active>(self, shadow_frame, inst, inst_data);
   1288         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1289         break;
   1290       }
   1291       case Instruction::SPUT_BYTE: {
   1292         PREAMBLE();
   1293         bool success = DoFieldPut<StaticPrimitiveWrite, Primitive::kPrimByte, do_access_check, transaction_active>(self, shadow_frame, inst, inst_data);
   1294         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1295         break;
   1296       }
   1297       case Instruction::SPUT_CHAR: {
   1298         PREAMBLE();
   1299         bool success = DoFieldPut<StaticPrimitiveWrite, Primitive::kPrimChar, do_access_check, transaction_active>(self, shadow_frame, inst, inst_data);
   1300         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1301         break;
   1302       }
   1303       case Instruction::SPUT_SHORT: {
   1304         PREAMBLE();
   1305         bool success = DoFieldPut<StaticPrimitiveWrite, Primitive::kPrimShort, do_access_check, transaction_active>(self, shadow_frame, inst, inst_data);
   1306         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1307         break;
   1308       }
   1309       case Instruction::SPUT: {
   1310         PREAMBLE();
   1311         bool success = DoFieldPut<StaticPrimitiveWrite, Primitive::kPrimInt, do_access_check, transaction_active>(self, shadow_frame, inst, inst_data);
   1312         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1313         break;
   1314       }
   1315       case Instruction::SPUT_WIDE: {
   1316         PREAMBLE();
   1317         bool success = DoFieldPut<StaticPrimitiveWrite, Primitive::kPrimLong, do_access_check, transaction_active>(self, shadow_frame, inst, inst_data);
   1318         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1319         break;
   1320       }
   1321       case Instruction::SPUT_OBJECT: {
   1322         PREAMBLE();
   1323         bool success = DoFieldPut<StaticObjectWrite, Primitive::kPrimNot, do_access_check, transaction_active>(self, shadow_frame, inst, inst_data);
   1324         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1325         break;
   1326       }
   1327       case Instruction::INVOKE_VIRTUAL: {
   1328         PREAMBLE();
   1329         bool success = DoInvoke<kVirtual, false, do_access_check>(self, shadow_frame, inst, inst_data, &result_register);
   1330         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_3xx);
   1331         break;
   1332       }
   1333       case Instruction::INVOKE_VIRTUAL_RANGE: {
   1334         PREAMBLE();
   1335         bool success = DoInvoke<kVirtual, true, do_access_check>(self, shadow_frame, inst, inst_data, &result_register);
   1336         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_3xx);
   1337         break;
   1338       }
   1339       case Instruction::INVOKE_SUPER: {
   1340         PREAMBLE();
   1341         bool success = DoInvoke<kSuper, false, do_access_check>(self, shadow_frame, inst, inst_data, &result_register);
   1342         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_3xx);
   1343         break;
   1344       }
   1345       case Instruction::INVOKE_SUPER_RANGE: {
   1346         PREAMBLE();
   1347         bool success = DoInvoke<kSuper, true, do_access_check>(self, shadow_frame, inst, inst_data, &result_register);
   1348         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_3xx);
   1349         break;
   1350       }
   1351       case Instruction::INVOKE_DIRECT: {
   1352         PREAMBLE();
   1353         bool success = DoInvoke<kDirect, false, do_access_check>(self, shadow_frame, inst, inst_data, &result_register);
   1354         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_3xx);
   1355         break;
   1356       }
   1357       case Instruction::INVOKE_DIRECT_RANGE: {
   1358         PREAMBLE();
   1359         bool success = DoInvoke<kDirect, true, do_access_check>(self, shadow_frame, inst, inst_data, &result_register);
   1360         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_3xx);
   1361         break;
   1362       }
   1363       case Instruction::INVOKE_INTERFACE: {
   1364         PREAMBLE();
   1365         bool success = DoInvoke<kInterface, false, do_access_check>(self, shadow_frame, inst, inst_data, &result_register);
   1366         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_3xx);
   1367         break;
   1368       }
   1369       case Instruction::INVOKE_INTERFACE_RANGE: {
   1370         PREAMBLE();
   1371         bool success = DoInvoke<kInterface, true, do_access_check>(self, shadow_frame, inst, inst_data, &result_register);
   1372         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_3xx);
   1373         break;
   1374       }
   1375       case Instruction::INVOKE_STATIC: {
   1376         PREAMBLE();
   1377         bool success = DoInvoke<kStatic, false, do_access_check>(self, shadow_frame, inst, inst_data, &result_register);
   1378         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_3xx);
   1379         break;
   1380       }
   1381       case Instruction::INVOKE_STATIC_RANGE: {
   1382         PREAMBLE();
   1383         bool success = DoInvoke<kStatic, true, do_access_check>(self, shadow_frame, inst, inst_data, &result_register);
   1384         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_3xx);
   1385         break;
   1386       }
   1387       case Instruction::INVOKE_VIRTUAL_QUICK: {
   1388         PREAMBLE();
   1389         bool success = DoInvokeVirtualQuick<false>(self, shadow_frame, inst, inst_data, &result_register);
   1390         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_3xx);
   1391         break;
   1392       }
   1393       case Instruction::INVOKE_VIRTUAL_RANGE_QUICK: {
   1394         PREAMBLE();
   1395         bool success = DoInvokeVirtualQuick<true>(self, shadow_frame, inst, inst_data, &result_register);
   1396         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_3xx);
   1397         break;
   1398       }
   1399       case Instruction::NEG_INT:
   1400         PREAMBLE();
   1401         shadow_frame.SetVReg(inst->VRegA_12x(inst_data), -shadow_frame.GetVReg(inst->VRegB_12x(inst_data)));
   1402         inst = inst->Next_1xx();
   1403         break;
   1404       case Instruction::NOT_INT:
   1405         PREAMBLE();
   1406         shadow_frame.SetVReg(inst->VRegA_12x(inst_data), ~shadow_frame.GetVReg(inst->VRegB_12x(inst_data)));
   1407         inst = inst->Next_1xx();
   1408         break;
   1409       case Instruction::NEG_LONG:
   1410         PREAMBLE();
   1411         shadow_frame.SetVRegLong(inst->VRegA_12x(inst_data), -shadow_frame.GetVRegLong(inst->VRegB_12x(inst_data)));
   1412         inst = inst->Next_1xx();
   1413         break;
   1414       case Instruction::NOT_LONG:
   1415         PREAMBLE();
   1416         shadow_frame.SetVRegLong(inst->VRegA_12x(inst_data), ~shadow_frame.GetVRegLong(inst->VRegB_12x(inst_data)));
   1417         inst = inst->Next_1xx();
   1418         break;
   1419       case Instruction::NEG_FLOAT:
   1420         PREAMBLE();
   1421         shadow_frame.SetVRegFloat(inst->VRegA_12x(inst_data), -shadow_frame.GetVRegFloat(inst->VRegB_12x(inst_data)));
   1422         inst = inst->Next_1xx();
   1423         break;
   1424       case Instruction::NEG_DOUBLE:
   1425         PREAMBLE();
   1426         shadow_frame.SetVRegDouble(inst->VRegA_12x(inst_data), -shadow_frame.GetVRegDouble(inst->VRegB_12x(inst_data)));
   1427         inst = inst->Next_1xx();
   1428         break;
   1429       case Instruction::INT_TO_LONG:
   1430         PREAMBLE();
   1431         shadow_frame.SetVRegLong(inst->VRegA_12x(inst_data),
   1432                                  shadow_frame.GetVReg(inst->VRegB_12x(inst_data)));
   1433         inst = inst->Next_1xx();
   1434         break;
   1435       case Instruction::INT_TO_FLOAT:
   1436         PREAMBLE();
   1437         shadow_frame.SetVRegFloat(inst->VRegA_12x(inst_data),
   1438                                   shadow_frame.GetVReg(inst->VRegB_12x(inst_data)));
   1439         inst = inst->Next_1xx();
   1440         break;
   1441       case Instruction::INT_TO_DOUBLE:
   1442         PREAMBLE();
   1443         shadow_frame.SetVRegDouble(inst->VRegA_12x(inst_data),
   1444                                    shadow_frame.GetVReg(inst->VRegB_12x(inst_data)));
   1445         inst = inst->Next_1xx();
   1446         break;
   1447       case Instruction::LONG_TO_INT:
   1448         PREAMBLE();
   1449         shadow_frame.SetVReg(inst->VRegA_12x(inst_data),
   1450                              shadow_frame.GetVRegLong(inst->VRegB_12x(inst_data)));
   1451         inst = inst->Next_1xx();
   1452         break;
   1453       case Instruction::LONG_TO_FLOAT:
   1454         PREAMBLE();
   1455         shadow_frame.SetVRegFloat(inst->VRegA_12x(inst_data),
   1456                                   shadow_frame.GetVRegLong(inst->VRegB_12x(inst_data)));
   1457         inst = inst->Next_1xx();
   1458         break;
   1459       case Instruction::LONG_TO_DOUBLE:
   1460         PREAMBLE();
   1461         shadow_frame.SetVRegDouble(inst->VRegA_12x(inst_data),
   1462                                    shadow_frame.GetVRegLong(inst->VRegB_12x(inst_data)));
   1463         inst = inst->Next_1xx();
   1464         break;
   1465       case Instruction::FLOAT_TO_INT: {
   1466         PREAMBLE();
   1467         float val = shadow_frame.GetVRegFloat(inst->VRegB_12x(inst_data));
   1468         int32_t result = art_float_to_integral<int32_t, float>(val);
   1469         shadow_frame.SetVReg(inst->VRegA_12x(inst_data), result);
   1470         inst = inst->Next_1xx();
   1471         break;
   1472       }
   1473       case Instruction::FLOAT_TO_LONG: {
   1474         PREAMBLE();
   1475         float val = shadow_frame.GetVRegFloat(inst->VRegB_12x(inst_data));
   1476         int64_t result = art_float_to_integral<int64_t, float>(val);
   1477         shadow_frame.SetVRegLong(inst->VRegA_12x(inst_data), result);
   1478         inst = inst->Next_1xx();
   1479         break;
   1480       }
   1481       case Instruction::FLOAT_TO_DOUBLE:
   1482         PREAMBLE();
   1483         shadow_frame.SetVRegDouble(inst->VRegA_12x(inst_data),
   1484                                    shadow_frame.GetVRegFloat(inst->VRegB_12x(inst_data)));
   1485         inst = inst->Next_1xx();
   1486         break;
   1487       case Instruction::DOUBLE_TO_INT: {
   1488         PREAMBLE();
   1489         double val = shadow_frame.GetVRegDouble(inst->VRegB_12x(inst_data));
   1490         int32_t result = art_float_to_integral<int32_t, double>(val);
   1491         shadow_frame.SetVReg(inst->VRegA_12x(inst_data), result);
   1492         inst = inst->Next_1xx();
   1493         break;
   1494       }
   1495       case Instruction::DOUBLE_TO_LONG: {
   1496         PREAMBLE();
   1497         double val = shadow_frame.GetVRegDouble(inst->VRegB_12x(inst_data));
   1498         int64_t result = art_float_to_integral<int64_t, double>(val);
   1499         shadow_frame.SetVRegLong(inst->VRegA_12x(inst_data), result);
   1500         inst = inst->Next_1xx();
   1501         break;
   1502       }
   1503       case Instruction::DOUBLE_TO_FLOAT:
   1504         PREAMBLE();
   1505         shadow_frame.SetVRegFloat(inst->VRegA_12x(inst_data),
   1506                                   shadow_frame.GetVRegDouble(inst->VRegB_12x(inst_data)));
   1507         inst = inst->Next_1xx();
   1508         break;
   1509       case Instruction::INT_TO_BYTE:
   1510         PREAMBLE();
   1511         shadow_frame.SetVReg(inst->VRegA_12x(inst_data),
   1512                              static_cast<int8_t>(shadow_frame.GetVReg(inst->VRegB_12x(inst_data))));
   1513         inst = inst->Next_1xx();
   1514         break;
   1515       case Instruction::INT_TO_CHAR:
   1516         PREAMBLE();
   1517         shadow_frame.SetVReg(inst->VRegA_12x(inst_data),
   1518                              static_cast<uint16_t>(shadow_frame.GetVReg(inst->VRegB_12x(inst_data))));
   1519         inst = inst->Next_1xx();
   1520         break;
   1521       case Instruction::INT_TO_SHORT:
   1522         PREAMBLE();
   1523         shadow_frame.SetVReg(inst->VRegA_12x(inst_data),
   1524                              static_cast<int16_t>(shadow_frame.GetVReg(inst->VRegB_12x(inst_data))));
   1525         inst = inst->Next_1xx();
   1526         break;
   1527       case Instruction::ADD_INT:
   1528         PREAMBLE();
   1529         shadow_frame.SetVReg(inst->VRegA_23x(inst_data),
   1530                              shadow_frame.GetVReg(inst->VRegB_23x()) +
   1531                              shadow_frame.GetVReg(inst->VRegC_23x()));
   1532         inst = inst->Next_2xx();
   1533         break;
   1534       case Instruction::SUB_INT:
   1535         PREAMBLE();
   1536         shadow_frame.SetVReg(inst->VRegA_23x(inst_data),
   1537                              shadow_frame.GetVReg(inst->VRegB_23x()) -
   1538                              shadow_frame.GetVReg(inst->VRegC_23x()));
   1539         inst = inst->Next_2xx();
   1540         break;
   1541       case Instruction::MUL_INT:
   1542         PREAMBLE();
   1543         shadow_frame.SetVReg(inst->VRegA_23x(inst_data),
   1544                              shadow_frame.GetVReg(inst->VRegB_23x()) *
   1545                              shadow_frame.GetVReg(inst->VRegC_23x()));
   1546         inst = inst->Next_2xx();
   1547         break;
   1548       case Instruction::DIV_INT: {
   1549         PREAMBLE();
   1550         bool success = DoIntDivide(shadow_frame, inst->VRegA_23x(inst_data),
   1551                                    shadow_frame.GetVReg(inst->VRegB_23x()),
   1552                                    shadow_frame.GetVReg(inst->VRegC_23x()));
   1553         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1554         break;
   1555       }
   1556       case Instruction::REM_INT: {
   1557         PREAMBLE();
   1558         bool success = DoIntRemainder(shadow_frame, inst->VRegA_23x(inst_data),
   1559                                       shadow_frame.GetVReg(inst->VRegB_23x()),
   1560                                       shadow_frame.GetVReg(inst->VRegC_23x()));
   1561         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   1562         break;
   1563       }
   1564       case Instruction::SHL_INT:
   1565         PREAMBLE();
   1566         shadow_frame.SetVReg(inst->VRegA_23x(inst_data),
   1567                              shadow_frame.GetVReg(inst->VRegB_23x()) <<
   1568                              (shadow_frame.GetVReg(inst->VRegC_23x()) & 0x1f));
   1569         inst = inst->Next_2xx();
   1570         break;
   1571       case Instruction::SHR_INT:
   1572         PREAMBLE();
   1573         shadow_frame.SetVReg(inst->VRegA_23x(inst_data),
   1574                              shadow_frame.GetVReg(inst->VRegB_23x()) >>
   1575                              (shadow_frame.GetVReg(inst->VRegC_23x()) & 0x1f));
   1576         inst = inst->Next_2xx();
   1577         break;
   1578       case Instruction::USHR_INT:
   1579         PREAMBLE();
   1580         shadow_frame.SetVReg(inst->VRegA_23x(inst_data),
   1581                              static_cast<uint32_t>(shadow_frame.GetVReg(inst->VRegB_23x())) >>
   1582                              (shadow_frame.GetVReg(inst->VRegC_23x()) & 0x1f));
   1583         inst = inst->Next_2xx();
   1584         break;
   1585       case Instruction::AND_INT:
   1586         PREAMBLE();
   1587         shadow_frame.SetVReg(inst->VRegA_23x(inst_data),
   1588                              shadow_frame.GetVReg(inst->VRegB_23x()) &
   1589                              shadow_frame.GetVReg(inst->VRegC_23x()));
   1590         inst = inst->Next_2xx();
   1591         break;
   1592       case Instruction::OR_INT:
   1593         PREAMBLE();
   1594         shadow_frame.SetVReg(inst->VRegA_23x(inst_data),
   1595                              shadow_frame.GetVReg(inst->VRegB_23x()) |
   1596                              shadow_frame.GetVReg(inst->VRegC_23x()));
   1597         inst = inst->Next_2xx();
   1598         break;
   1599       case Instruction::XOR_INT:
   1600         PREAMBLE();
   1601         shadow_frame.SetVReg(inst->VRegA_23x(inst_data),
   1602                              shadow_frame.GetVReg(inst->VRegB_23x()) ^
   1603                              shadow_frame.GetVReg(inst->VRegC_23x()));
   1604         inst = inst->Next_2xx();
   1605         break;
   1606       case Instruction::ADD_LONG:
   1607         PREAMBLE();
   1608         shadow_frame.SetVRegLong(inst->VRegA_23x(inst_data),
   1609                                  shadow_frame.GetVRegLong(inst->VRegB_23x()) +
   1610                                  shadow_frame.GetVRegLong(inst->VRegC_23x()));
   1611         inst = inst->Next_2xx();
   1612         break;
   1613       case Instruction::SUB_LONG:
   1614         PREAMBLE();
   1615         shadow_frame.SetVRegLong(inst->VRegA_23x(inst_data),
   1616                                  shadow_frame.GetVRegLong(inst->VRegB_23x()) -
   1617                                  shadow_frame.GetVRegLong(inst->VRegC_23x()));
   1618         inst = inst->Next_2xx();
   1619         break;
   1620       case Instruction::MUL_LONG:
   1621         PREAMBLE();
   1622         shadow_frame.SetVRegLong(inst->VRegA_23x(inst_data),
   1623                                  shadow_frame.GetVRegLong(inst->VRegB_23x()) *
   1624                                  shadow_frame.GetVRegLong(inst->VRegC_23x()));
   1625         inst = inst->Next_2xx();
   1626         break;
   1627       case Instruction::DIV_LONG:
   1628         PREAMBLE();
   1629         DoLongDivide(shadow_frame, inst->VRegA_23x(inst_data),
   1630                      shadow_frame.GetVRegLong(inst->VRegB_23x()),
   1631                     shadow_frame.GetVRegLong(inst->VRegC_23x()));
   1632         POSSIBLY_HANDLE_PENDING_EXCEPTION(self->IsExceptionPending(), Next_2xx);
   1633         break;
   1634       case Instruction::REM_LONG:
   1635         PREAMBLE();
   1636         DoLongRemainder(shadow_frame, inst->VRegA_23x(inst_data),
   1637                         shadow_frame.GetVRegLong(inst->VRegB_23x()),
   1638                         shadow_frame.GetVRegLong(inst->VRegC_23x()));
   1639         POSSIBLY_HANDLE_PENDING_EXCEPTION(self->IsExceptionPending(), Next_2xx);
   1640         break;
   1641       case Instruction::AND_LONG:
   1642         PREAMBLE();
   1643         shadow_frame.SetVRegLong(inst->VRegA_23x(inst_data),
   1644                                  shadow_frame.GetVRegLong(inst->VRegB_23x()) &
   1645                                  shadow_frame.GetVRegLong(inst->VRegC_23x()));
   1646         inst = inst->Next_2xx();
   1647         break;
   1648       case Instruction::OR_LONG:
   1649         PREAMBLE();
   1650         shadow_frame.SetVRegLong(inst->VRegA_23x(inst_data),
   1651                                  shadow_frame.GetVRegLong(inst->VRegB_23x()) |
   1652                                  shadow_frame.GetVRegLong(inst->VRegC_23x()));
   1653         inst = inst->Next_2xx();
   1654         break;
   1655       case Instruction::XOR_LONG:
   1656         PREAMBLE();
   1657         shadow_frame.SetVRegLong(inst->VRegA_23x(inst_data),
   1658                                  shadow_frame.GetVRegLong(inst->VRegB_23x()) ^
   1659                                  shadow_frame.GetVRegLong(inst->VRegC_23x()));
   1660         inst = inst->Next_2xx();
   1661         break;
   1662       case Instruction::SHL_LONG:
   1663         PREAMBLE();
   1664         shadow_frame.SetVRegLong(inst->VRegA_23x(inst_data),
   1665                                  shadow_frame.GetVRegLong(inst->VRegB_23x()) <<
   1666                                  (shadow_frame.GetVReg(inst->VRegC_23x()) & 0x3f));
   1667         inst = inst->Next_2xx();
   1668         break;
   1669       case Instruction::SHR_LONG:
   1670         PREAMBLE();
   1671         shadow_frame.SetVRegLong(inst->VRegA_23x(inst_data),
   1672                                  shadow_frame.GetVRegLong(inst->VRegB_23x()) >>
   1673                                  (shadow_frame.GetVReg(inst->VRegC_23x()) & 0x3f));
   1674         inst = inst->Next_2xx();
   1675         break;
   1676       case Instruction::USHR_LONG:
   1677         PREAMBLE();
   1678         shadow_frame.SetVRegLong(inst->VRegA_23x(inst_data),
   1679                                  static_cast<uint64_t>(shadow_frame.GetVRegLong(inst->VRegB_23x())) >>
   1680                                  (shadow_frame.GetVReg(inst->VRegC_23x()) & 0x3f));
   1681         inst = inst->Next_2xx();
   1682         break;
   1683       case Instruction::ADD_FLOAT:
   1684         PREAMBLE();
   1685         shadow_frame.SetVRegFloat(inst->VRegA_23x(inst_data),
   1686                                   shadow_frame.GetVRegFloat(inst->VRegB_23x()) +
   1687                                   shadow_frame.GetVRegFloat(inst->VRegC_23x()));
   1688         inst = inst->Next_2xx();
   1689         break;
   1690       case Instruction::SUB_FLOAT:
   1691         PREAMBLE();
   1692         shadow_frame.SetVRegFloat(inst->VRegA_23x(inst_data),
   1693                                   shadow_frame.GetVRegFloat(inst->VRegB_23x()) -
   1694                                   shadow_frame.GetVRegFloat(inst->VRegC_23x()));
   1695         inst = inst->Next_2xx();
   1696         break;
   1697       case Instruction::MUL_FLOAT:
   1698         PREAMBLE();
   1699         shadow_frame.SetVRegFloat(inst->VRegA_23x(inst_data),
   1700                                   shadow_frame.GetVRegFloat(inst->VRegB_23x()) *
   1701                                   shadow_frame.GetVRegFloat(inst->VRegC_23x()));
   1702         inst = inst->Next_2xx();
   1703         break;
   1704       case Instruction::DIV_FLOAT:
   1705         PREAMBLE();
   1706         shadow_frame.SetVRegFloat(inst->VRegA_23x(inst_data),
   1707                                   shadow_frame.GetVRegFloat(inst->VRegB_23x()) /
   1708                                   shadow_frame.GetVRegFloat(inst->VRegC_23x()));
   1709         inst = inst->Next_2xx();
   1710         break;
   1711       case Instruction::REM_FLOAT:
   1712         PREAMBLE();
   1713         shadow_frame.SetVRegFloat(inst->VRegA_23x(inst_data),
   1714                                   fmodf(shadow_frame.GetVRegFloat(inst->VRegB_23x()),
   1715                                         shadow_frame.GetVRegFloat(inst->VRegC_23x())));
   1716         inst = inst->Next_2xx();
   1717         break;
   1718       case Instruction::ADD_DOUBLE:
   1719         PREAMBLE();
   1720         shadow_frame.SetVRegDouble(inst->VRegA_23x(inst_data),
   1721                                    shadow_frame.GetVRegDouble(inst->VRegB_23x()) +
   1722                                    shadow_frame.GetVRegDouble(inst->VRegC_23x()));
   1723         inst = inst->Next_2xx();
   1724         break;
   1725       case Instruction::SUB_DOUBLE:
   1726         PREAMBLE();
   1727         shadow_frame.SetVRegDouble(inst->VRegA_23x(inst_data),
   1728                                    shadow_frame.GetVRegDouble(inst->VRegB_23x()) -
   1729                                    shadow_frame.GetVRegDouble(inst->VRegC_23x()));
   1730         inst = inst->Next_2xx();
   1731         break;
   1732       case Instruction::MUL_DOUBLE:
   1733         PREAMBLE();
   1734         shadow_frame.SetVRegDouble(inst->VRegA_23x(inst_data),
   1735                                    shadow_frame.GetVRegDouble(inst->VRegB_23x()) *
   1736                                    shadow_frame.GetVRegDouble(inst->VRegC_23x()));
   1737         inst = inst->Next_2xx();
   1738         break;
   1739       case Instruction::DIV_DOUBLE:
   1740         PREAMBLE();
   1741         shadow_frame.SetVRegDouble(inst->VRegA_23x(inst_data),
   1742                                    shadow_frame.GetVRegDouble(inst->VRegB_23x()) /
   1743                                    shadow_frame.GetVRegDouble(inst->VRegC_23x()));
   1744         inst = inst->Next_2xx();
   1745         break;
   1746       case Instruction::REM_DOUBLE:
   1747         PREAMBLE();
   1748         shadow_frame.SetVRegDouble(inst->VRegA_23x(inst_data),
   1749                                    fmod(shadow_frame.GetVRegDouble(inst->VRegB_23x()),
   1750                                         shadow_frame.GetVRegDouble(inst->VRegC_23x())));
   1751         inst = inst->Next_2xx();
   1752         break;
   1753       case Instruction::ADD_INT_2ADDR: {
   1754         PREAMBLE();
   1755         uint4_t vregA = inst->VRegA_12x(inst_data);
   1756         shadow_frame.SetVReg(vregA,
   1757                              shadow_frame.GetVReg(vregA) +
   1758                              shadow_frame.GetVReg(inst->VRegB_12x(inst_data)));
   1759         inst = inst->Next_1xx();
   1760         break;
   1761       }
   1762       case Instruction::SUB_INT_2ADDR: {
   1763         PREAMBLE();
   1764         uint4_t vregA = inst->VRegA_12x(inst_data);
   1765         shadow_frame.SetVReg(vregA,
   1766                              shadow_frame.GetVReg(vregA) -
   1767                              shadow_frame.GetVReg(inst->VRegB_12x(inst_data)));
   1768         inst = inst->Next_1xx();
   1769         break;
   1770       }
   1771       case Instruction::MUL_INT_2ADDR: {
   1772         PREAMBLE();
   1773         uint4_t vregA = inst->VRegA_12x(inst_data);
   1774         shadow_frame.SetVReg(vregA,
   1775                              shadow_frame.GetVReg(vregA) *
   1776                              shadow_frame.GetVReg(inst->VRegB_12x(inst_data)));
   1777         inst = inst->Next_1xx();
   1778         break;
   1779       }
   1780       case Instruction::DIV_INT_2ADDR: {
   1781         PREAMBLE();
   1782         uint4_t vregA = inst->VRegA_12x(inst_data);
   1783         bool success = DoIntDivide(shadow_frame, vregA, shadow_frame.GetVReg(vregA),
   1784                                    shadow_frame.GetVReg(inst->VRegB_12x(inst_data)));
   1785         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_1xx);
   1786         break;
   1787       }
   1788       case Instruction::REM_INT_2ADDR: {
   1789         PREAMBLE();
   1790         uint4_t vregA = inst->VRegA_12x(inst_data);
   1791         bool success = DoIntRemainder(shadow_frame, vregA, shadow_frame.GetVReg(vregA),
   1792                                       shadow_frame.GetVReg(inst->VRegB_12x(inst_data)));
   1793         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_1xx);
   1794         break;
   1795       }
   1796       case Instruction::SHL_INT_2ADDR: {
   1797         PREAMBLE();
   1798         uint4_t vregA = inst->VRegA_12x(inst_data);
   1799         shadow_frame.SetVReg(vregA,
   1800                              shadow_frame.GetVReg(vregA) <<
   1801                              (shadow_frame.GetVReg(inst->VRegB_12x(inst_data)) & 0x1f));
   1802         inst = inst->Next_1xx();
   1803         break;
   1804       }
   1805       case Instruction::SHR_INT_2ADDR: {
   1806         PREAMBLE();
   1807         uint4_t vregA = inst->VRegA_12x(inst_data);
   1808         shadow_frame.SetVReg(vregA,
   1809                              shadow_frame.GetVReg(vregA) >>
   1810                              (shadow_frame.GetVReg(inst->VRegB_12x(inst_data)) & 0x1f));
   1811         inst = inst->Next_1xx();
   1812         break;
   1813       }
   1814       case Instruction::USHR_INT_2ADDR: {
   1815         PREAMBLE();
   1816         uint4_t vregA = inst->VRegA_12x(inst_data);
   1817         shadow_frame.SetVReg(vregA,
   1818                              static_cast<uint32_t>(shadow_frame.GetVReg(vregA)) >>
   1819                              (shadow_frame.GetVReg(inst->VRegB_12x(inst_data)) & 0x1f));
   1820         inst = inst->Next_1xx();
   1821         break;
   1822       }
   1823       case Instruction::AND_INT_2ADDR: {
   1824         PREAMBLE();
   1825         uint4_t vregA = inst->VRegA_12x(inst_data);
   1826         shadow_frame.SetVReg(vregA,
   1827                              shadow_frame.GetVReg(vregA) &
   1828                              shadow_frame.GetVReg(inst->VRegB_12x(inst_data)));
   1829         inst = inst->Next_1xx();
   1830         break;
   1831       }
   1832       case Instruction::OR_INT_2ADDR: {
   1833         PREAMBLE();
   1834         uint4_t vregA = inst->VRegA_12x(inst_data);
   1835         shadow_frame.SetVReg(vregA,
   1836                              shadow_frame.GetVReg(vregA) |
   1837                              shadow_frame.GetVReg(inst->VRegB_12x(inst_data)));
   1838         inst = inst->Next_1xx();
   1839         break;
   1840       }
   1841       case Instruction::XOR_INT_2ADDR: {
   1842         PREAMBLE();
   1843         uint4_t vregA = inst->VRegA_12x(inst_data);
   1844         shadow_frame.SetVReg(vregA,
   1845                              shadow_frame.GetVReg(vregA) ^
   1846                              shadow_frame.GetVReg(inst->VRegB_12x(inst_data)));
   1847         inst = inst->Next_1xx();
   1848         break;
   1849       }
   1850       case Instruction::ADD_LONG_2ADDR: {
   1851         PREAMBLE();
   1852         uint4_t vregA = inst->VRegA_12x(inst_data);
   1853         shadow_frame.SetVRegLong(vregA,
   1854                                  shadow_frame.GetVRegLong(vregA) +
   1855                                  shadow_frame.GetVRegLong(inst->VRegB_12x(inst_data)));
   1856         inst = inst->Next_1xx();
   1857         break;
   1858       }
   1859       case Instruction::SUB_LONG_2ADDR: {
   1860         PREAMBLE();
   1861         uint4_t vregA = inst->VRegA_12x(inst_data);
   1862         shadow_frame.SetVRegLong(vregA,
   1863                                  shadow_frame.GetVRegLong(vregA) -
   1864                                  shadow_frame.GetVRegLong(inst->VRegB_12x(inst_data)));
   1865         inst = inst->Next_1xx();
   1866         break;
   1867       }
   1868       case Instruction::MUL_LONG_2ADDR: {
   1869         PREAMBLE();
   1870         uint4_t vregA = inst->VRegA_12x(inst_data);
   1871         shadow_frame.SetVRegLong(vregA,
   1872                                  shadow_frame.GetVRegLong(vregA) *
   1873                                  shadow_frame.GetVRegLong(inst->VRegB_12x(inst_data)));
   1874         inst = inst->Next_1xx();
   1875         break;
   1876       }
   1877       case Instruction::DIV_LONG_2ADDR: {
   1878         PREAMBLE();
   1879         uint4_t vregA = inst->VRegA_12x(inst_data);
   1880         DoLongDivide(shadow_frame, vregA, shadow_frame.GetVRegLong(vregA),
   1881                     shadow_frame.GetVRegLong(inst->VRegB_12x(inst_data)));
   1882         POSSIBLY_HANDLE_PENDING_EXCEPTION(self->IsExceptionPending(), Next_1xx);
   1883         break;
   1884       }
   1885       case Instruction::REM_LONG_2ADDR: {
   1886         PREAMBLE();
   1887         uint4_t vregA = inst->VRegA_12x(inst_data);
   1888         DoLongRemainder(shadow_frame, vregA, shadow_frame.GetVRegLong(vregA),
   1889                         shadow_frame.GetVRegLong(inst->VRegB_12x(inst_data)));
   1890         POSSIBLY_HANDLE_PENDING_EXCEPTION(self->IsExceptionPending(), Next_1xx);
   1891         break;
   1892       }
   1893       case Instruction::AND_LONG_2ADDR: {
   1894         PREAMBLE();
   1895         uint4_t vregA = inst->VRegA_12x(inst_data);
   1896         shadow_frame.SetVRegLong(vregA,
   1897                                  shadow_frame.GetVRegLong(vregA) &
   1898                                  shadow_frame.GetVRegLong(inst->VRegB_12x(inst_data)));
   1899         inst = inst->Next_1xx();
   1900         break;
   1901       }
   1902       case Instruction::OR_LONG_2ADDR: {
   1903         PREAMBLE();
   1904         uint4_t vregA = inst->VRegA_12x(inst_data);
   1905         shadow_frame.SetVRegLong(vregA,
   1906                                  shadow_frame.GetVRegLong(vregA) |
   1907                                  shadow_frame.GetVRegLong(inst->VRegB_12x(inst_data)));
   1908         inst = inst->Next_1xx();
   1909         break;
   1910       }
   1911       case Instruction::XOR_LONG_2ADDR: {
   1912         PREAMBLE();
   1913         uint4_t vregA = inst->VRegA_12x(inst_data);
   1914         shadow_frame.SetVRegLong(vregA,
   1915                                  shadow_frame.GetVRegLong(vregA) ^
   1916                                  shadow_frame.GetVRegLong(inst->VRegB_12x(inst_data)));
   1917         inst = inst->Next_1xx();
   1918         break;
   1919       }
   1920       case Instruction::SHL_LONG_2ADDR: {
   1921         PREAMBLE();
   1922         uint4_t vregA = inst->VRegA_12x(inst_data);
   1923         shadow_frame.SetVRegLong(vregA,
   1924                                  shadow_frame.GetVRegLong(vregA) <<
   1925                                  (shadow_frame.GetVReg(inst->VRegB_12x(inst_data)) & 0x3f));
   1926         inst = inst->Next_1xx();
   1927         break;
   1928       }
   1929       case Instruction::SHR_LONG_2ADDR: {
   1930         PREAMBLE();
   1931         uint4_t vregA = inst->VRegA_12x(inst_data);
   1932         shadow_frame.SetVRegLong(vregA,
   1933                                  shadow_frame.GetVRegLong(vregA) >>
   1934                                  (shadow_frame.GetVReg(inst->VRegB_12x(inst_data)) & 0x3f));
   1935         inst = inst->Next_1xx();
   1936         break;
   1937       }
   1938       case Instruction::USHR_LONG_2ADDR: {
   1939         PREAMBLE();
   1940         uint4_t vregA = inst->VRegA_12x(inst_data);
   1941         shadow_frame.SetVRegLong(vregA,
   1942                                  static_cast<uint64_t>(shadow_frame.GetVRegLong(vregA)) >>
   1943                                  (shadow_frame.GetVReg(inst->VRegB_12x(inst_data)) & 0x3f));
   1944         inst = inst->Next_1xx();
   1945         break;
   1946       }
   1947       case Instruction::ADD_FLOAT_2ADDR: {
   1948         PREAMBLE();
   1949         uint4_t vregA = inst->VRegA_12x(inst_data);
   1950         shadow_frame.SetVRegFloat(vregA,
   1951                                   shadow_frame.GetVRegFloat(vregA) +
   1952                                   shadow_frame.GetVRegFloat(inst->VRegB_12x(inst_data)));
   1953         inst = inst->Next_1xx();
   1954         break;
   1955       }
   1956       case Instruction::SUB_FLOAT_2ADDR: {
   1957         PREAMBLE();
   1958         uint4_t vregA = inst->VRegA_12x(inst_data);
   1959         shadow_frame.SetVRegFloat(vregA,
   1960                                   shadow_frame.GetVRegFloat(vregA) -
   1961                                   shadow_frame.GetVRegFloat(inst->VRegB_12x(inst_data)));
   1962         inst = inst->Next_1xx();
   1963         break;
   1964       }
   1965       case Instruction::MUL_FLOAT_2ADDR: {
   1966         PREAMBLE();
   1967         uint4_t vregA = inst->VRegA_12x(inst_data);
   1968         shadow_frame.SetVRegFloat(vregA,
   1969                                   shadow_frame.GetVRegFloat(vregA) *
   1970                                   shadow_frame.GetVRegFloat(inst->VRegB_12x(inst_data)));
   1971         inst = inst->Next_1xx();
   1972         break;
   1973       }
   1974       case Instruction::DIV_FLOAT_2ADDR: {
   1975         PREAMBLE();
   1976         uint4_t vregA = inst->VRegA_12x(inst_data);
   1977         shadow_frame.SetVRegFloat(vregA,
   1978                                   shadow_frame.GetVRegFloat(vregA) /
   1979                                   shadow_frame.GetVRegFloat(inst->VRegB_12x(inst_data)));
   1980         inst = inst->Next_1xx();
   1981         break;
   1982       }
   1983       case Instruction::REM_FLOAT_2ADDR: {
   1984         PREAMBLE();
   1985         uint4_t vregA = inst->VRegA_12x(inst_data);
   1986         shadow_frame.SetVRegFloat(vregA,
   1987                                   fmodf(shadow_frame.GetVRegFloat(vregA),
   1988                                         shadow_frame.GetVRegFloat(inst->VRegB_12x(inst_data))));
   1989         inst = inst->Next_1xx();
   1990         break;
   1991       }
   1992       case Instruction::ADD_DOUBLE_2ADDR: {
   1993         PREAMBLE();
   1994         uint4_t vregA = inst->VRegA_12x(inst_data);
   1995         shadow_frame.SetVRegDouble(vregA,
   1996                                    shadow_frame.GetVRegDouble(vregA) +
   1997                                    shadow_frame.GetVRegDouble(inst->VRegB_12x(inst_data)));
   1998         inst = inst->Next_1xx();
   1999         break;
   2000       }
   2001       case Instruction::SUB_DOUBLE_2ADDR: {
   2002         PREAMBLE();
   2003         uint4_t vregA = inst->VRegA_12x(inst_data);
   2004         shadow_frame.SetVRegDouble(vregA,
   2005                                    shadow_frame.GetVRegDouble(vregA) -
   2006                                    shadow_frame.GetVRegDouble(inst->VRegB_12x(inst_data)));
   2007         inst = inst->Next_1xx();
   2008         break;
   2009       }
   2010       case Instruction::MUL_DOUBLE_2ADDR: {
   2011         PREAMBLE();
   2012         uint4_t vregA = inst->VRegA_12x(inst_data);
   2013         shadow_frame.SetVRegDouble(vregA,
   2014                                    shadow_frame.GetVRegDouble(vregA) *
   2015                                    shadow_frame.GetVRegDouble(inst->VRegB_12x(inst_data)));
   2016         inst = inst->Next_1xx();
   2017         break;
   2018       }
   2019       case Instruction::DIV_DOUBLE_2ADDR: {
   2020         PREAMBLE();
   2021         uint4_t vregA = inst->VRegA_12x(inst_data);
   2022         shadow_frame.SetVRegDouble(vregA,
   2023                                    shadow_frame.GetVRegDouble(vregA) /
   2024                                    shadow_frame.GetVRegDouble(inst->VRegB_12x(inst_data)));
   2025         inst = inst->Next_1xx();
   2026         break;
   2027       }
   2028       case Instruction::REM_DOUBLE_2ADDR: {
   2029         PREAMBLE();
   2030         uint4_t vregA = inst->VRegA_12x(inst_data);
   2031         shadow_frame.SetVRegDouble(vregA,
   2032                                    fmod(shadow_frame.GetVRegDouble(vregA),
   2033                                         shadow_frame.GetVRegDouble(inst->VRegB_12x(inst_data))));
   2034         inst = inst->Next_1xx();
   2035         break;
   2036       }
   2037       case Instruction::ADD_INT_LIT16:
   2038         PREAMBLE();
   2039         shadow_frame.SetVReg(inst->VRegA_22s(inst_data),
   2040                              shadow_frame.GetVReg(inst->VRegB_22s(inst_data)) +
   2041                              inst->VRegC_22s());
   2042         inst = inst->Next_2xx();
   2043         break;
   2044       case Instruction::RSUB_INT:
   2045         PREAMBLE();
   2046         shadow_frame.SetVReg(inst->VRegA_22s(inst_data),
   2047                              inst->VRegC_22s() -
   2048                              shadow_frame.GetVReg(inst->VRegB_22s(inst_data)));
   2049         inst = inst->Next_2xx();
   2050         break;
   2051       case Instruction::MUL_INT_LIT16:
   2052         PREAMBLE();
   2053         shadow_frame.SetVReg(inst->VRegA_22s(inst_data),
   2054                              shadow_frame.GetVReg(inst->VRegB_22s(inst_data)) *
   2055                              inst->VRegC_22s());
   2056         inst = inst->Next_2xx();
   2057         break;
   2058       case Instruction::DIV_INT_LIT16: {
   2059         PREAMBLE();
   2060         bool success = DoIntDivide(shadow_frame, inst->VRegA_22s(inst_data),
   2061                                    shadow_frame.GetVReg(inst->VRegB_22s(inst_data)), inst->VRegC_22s());
   2062         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   2063         break;
   2064       }
   2065       case Instruction::REM_INT_LIT16: {
   2066         PREAMBLE();
   2067         bool success = DoIntRemainder(shadow_frame, inst->VRegA_22s(inst_data),
   2068                                       shadow_frame.GetVReg(inst->VRegB_22s(inst_data)), inst->VRegC_22s());
   2069         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   2070         break;
   2071       }
   2072       case Instruction::AND_INT_LIT16:
   2073         PREAMBLE();
   2074         shadow_frame.SetVReg(inst->VRegA_22s(inst_data),
   2075                              shadow_frame.GetVReg(inst->VRegB_22s(inst_data)) &
   2076                              inst->VRegC_22s());
   2077         inst = inst->Next_2xx();
   2078         break;
   2079       case Instruction::OR_INT_LIT16:
   2080         PREAMBLE();
   2081         shadow_frame.SetVReg(inst->VRegA_22s(inst_data),
   2082                              shadow_frame.GetVReg(inst->VRegB_22s(inst_data)) |
   2083                              inst->VRegC_22s());
   2084         inst = inst->Next_2xx();
   2085         break;
   2086       case Instruction::XOR_INT_LIT16:
   2087         PREAMBLE();
   2088         shadow_frame.SetVReg(inst->VRegA_22s(inst_data),
   2089                              shadow_frame.GetVReg(inst->VRegB_22s(inst_data)) ^
   2090                              inst->VRegC_22s());
   2091         inst = inst->Next_2xx();
   2092         break;
   2093       case Instruction::ADD_INT_LIT8:
   2094         PREAMBLE();
   2095         shadow_frame.SetVReg(inst->VRegA_22b(inst_data),
   2096                              shadow_frame.GetVReg(inst->VRegB_22b()) +
   2097                              inst->VRegC_22b());
   2098         inst = inst->Next_2xx();
   2099         break;
   2100       case Instruction::RSUB_INT_LIT8:
   2101         PREAMBLE();
   2102         shadow_frame.SetVReg(inst->VRegA_22b(inst_data),
   2103                              inst->VRegC_22b() -
   2104                              shadow_frame.GetVReg(inst->VRegB_22b()));
   2105         inst = inst->Next_2xx();
   2106         break;
   2107       case Instruction::MUL_INT_LIT8:
   2108         PREAMBLE();
   2109         shadow_frame.SetVReg(inst->VRegA_22b(inst_data),
   2110                              shadow_frame.GetVReg(inst->VRegB_22b()) *
   2111                              inst->VRegC_22b());
   2112         inst = inst->Next_2xx();
   2113         break;
   2114       case Instruction::DIV_INT_LIT8: {
   2115         PREAMBLE();
   2116         bool success = DoIntDivide(shadow_frame, inst->VRegA_22b(inst_data),
   2117                                    shadow_frame.GetVReg(inst->VRegB_22b()), inst->VRegC_22b());
   2118         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   2119         break;
   2120       }
   2121       case Instruction::REM_INT_LIT8: {
   2122         PREAMBLE();
   2123         bool success = DoIntRemainder(shadow_frame, inst->VRegA_22b(inst_data),
   2124                                       shadow_frame.GetVReg(inst->VRegB_22b()), inst->VRegC_22b());
   2125         POSSIBLY_HANDLE_PENDING_EXCEPTION(!success, Next_2xx);
   2126         break;
   2127       }
   2128       case Instruction::AND_INT_LIT8:
   2129         PREAMBLE();
   2130         shadow_frame.SetVReg(inst->VRegA_22b(inst_data),
   2131                              shadow_frame.GetVReg(inst->VRegB_22b()) &
   2132                              inst->VRegC_22b());
   2133         inst = inst->Next_2xx();
   2134         break;
   2135       case Instruction::OR_INT_LIT8:
   2136         PREAMBLE();
   2137         shadow_frame.SetVReg(inst->VRegA_22b(inst_data),
   2138                              shadow_frame.GetVReg(inst->VRegB_22b()) |
   2139                              inst->VRegC_22b());
   2140         inst = inst->Next_2xx();
   2141         break;
   2142       case Instruction::XOR_INT_LIT8:
   2143         PREAMBLE();
   2144         shadow_frame.SetVReg(inst->VRegA_22b(inst_data),
   2145                              shadow_frame.GetVReg(inst->VRegB_22b()) ^
   2146                              inst->VRegC_22b());
   2147         inst = inst->Next_2xx();
   2148         break;
   2149       case Instruction::SHL_INT_LIT8:
   2150         PREAMBLE();
   2151         shadow_frame.SetVReg(inst->VRegA_22b(inst_data),
   2152                              shadow_frame.GetVReg(inst->VRegB_22b()) <<
   2153                              (inst->VRegC_22b() & 0x1f));
   2154         inst = inst->Next_2xx();
   2155         break;
   2156       case Instruction::SHR_INT_LIT8:
   2157         PREAMBLE();
   2158         shadow_frame.SetVReg(inst->VRegA_22b(inst_data),
   2159                              shadow_frame.GetVReg(inst->VRegB_22b()) >>
   2160                              (inst->VRegC_22b() & 0x1f));
   2161         inst = inst->Next_2xx();
   2162         break;
   2163       case Instruction::USHR_INT_LIT8:
   2164         PREAMBLE();
   2165         shadow_frame.SetVReg(inst->VRegA_22b(inst_data),
   2166                              static_cast<uint32_t>(shadow_frame.GetVReg(inst->VRegB_22b())) >>
   2167                              (inst->VRegC_22b() & 0x1f));
   2168         inst = inst->Next_2xx();
   2169         break;
   2170       case Instruction::UNUSED_3E ... Instruction::UNUSED_43:
   2171       case Instruction::UNUSED_EB ... Instruction::UNUSED_FF:
   2172       case Instruction::UNUSED_79:
   2173       case Instruction::UNUSED_7A:
   2174         UnexpectedOpcode(inst, mh);
   2175     }
   2176   }
   2177 }  // NOLINT(readability/fn_size)
   2178 
   2179 // Explicit definitions of ExecuteSwitchImpl.
   2180 template SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) HOT_ATTR
   2181 JValue ExecuteSwitchImpl<true, false>(Thread* self, MethodHelper& mh,
   2182                                       const DexFile::CodeItem* code_item,
   2183                                       ShadowFrame& shadow_frame, JValue result_register);
   2184 template SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) HOT_ATTR
   2185 JValue ExecuteSwitchImpl<false, false>(Thread* self, MethodHelper& mh,
   2186                                        const DexFile::CodeItem* code_item,
   2187                                        ShadowFrame& shadow_frame, JValue result_register);
   2188 template SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
   2189 JValue ExecuteSwitchImpl<true, true>(Thread* self, MethodHelper& mh,
   2190                                      const DexFile::CodeItem* code_item,
   2191                                      ShadowFrame& shadow_frame, JValue result_register);
   2192 template SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
   2193 JValue ExecuteSwitchImpl<false, true>(Thread* self, MethodHelper& mh,
   2194                                       const DexFile::CodeItem* code_item,
   2195                                       ShadowFrame& shadow_frame, JValue result_register);
   2196 
   2197 }  // namespace interpreter
   2198 }  // namespace art
   2199