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