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