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