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