blob: 3041458d6d776a8742f29d86201306cc2f4c0da4 [file] [log] [blame]
Brian Carlstrom7940e442013-07-12 13:46:57 -07001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/* This file contains codegen for the X86 ISA */
18
19#include "codegen_x86.h"
Andreas Gampe0b9203e2015-01-22 20:39:27 -080020
21#include "base/logging.h"
Brian Carlstrom7940e442013-07-12 13:46:57 -070022#include "dex/quick/mir_to_lir-inl.h"
Andreas Gampe0b9203e2015-01-22 20:39:27 -080023#include "driver/compiler_driver.h"
Vladimir Marko20f85592015-03-19 10:07:02 +000024#include "driver/compiler_options.h"
Ian Rogers576ca0c2014-06-06 15:58:22 -070025#include "gc/accounting/card_table.h"
Vladimir Markof4da6752014-08-01 19:04:18 +010026#include "mirror/art_method.h"
27#include "mirror/object_array-inl.h"
Vladimir Markodc56cc52015-03-27 18:18:36 +000028#include "utils/dex_cache_arrays_layout-inl.h"
Brian Carlstrom7940e442013-07-12 13:46:57 -070029#include "x86_lir.h"
30
31namespace art {
32
Brian Carlstrom7940e442013-07-12 13:46:57 -070033/*
34 * The sparse table in the literal pool is an array of <key,displacement>
35 * pairs.
36 */
Andreas Gampe48971b32014-08-06 10:09:01 -070037void X86Mir2Lir::GenLargeSparseSwitch(MIR* mir, DexOffset table_offset, RegLocation rl_src) {
Chao-ying Fuda96aed2014-10-27 14:42:00 -070038 GenSmallSparseSwitch(mir, table_offset, rl_src);
39}
40
41/*
Brian Carlstrom7940e442013-07-12 13:46:57 -070042 * Code pattern will look something like:
43 *
44 * mov r_val, ..
45 * call 0
46 * pop r_start_of_method
47 * sub r_start_of_method, ..
48 * mov r_key_reg, r_val
49 * sub r_key_reg, low_key
50 * cmp r_key_reg, size-1 ; bound check
51 * ja done
52 * mov r_disp, [r_start_of_method + r_key_reg * 4 + table_offset]
53 * add r_start_of_method, r_disp
54 * jmp r_start_of_method
55 * done:
56 */
Andreas Gampe48971b32014-08-06 10:09:01 -070057void X86Mir2Lir::GenLargePackedSwitch(MIR* mir, DexOffset table_offset, RegLocation rl_src) {
Chao-ying Fu72f53af2014-11-11 16:48:40 -080058 const uint16_t* table = mir_graph_->GetTable(mir, table_offset);
Brian Carlstrom7940e442013-07-12 13:46:57 -070059 // Add the table to the list - we'll process it later
buzbee0d829482013-10-11 15:24:55 -070060 SwitchTable* tab_rec =
Vladimir Marko83cc7ae2014-02-12 18:02:05 +000061 static_cast<SwitchTable*>(arena_->Alloc(sizeof(SwitchTable), kArenaAllocData));
Chao-ying Fu72f53af2014-11-11 16:48:40 -080062 tab_rec->switch_mir = mir;
Brian Carlstrom7940e442013-07-12 13:46:57 -070063 tab_rec->table = table;
64 tab_rec->vaddr = current_dalvik_offset_;
65 int size = table[1];
Vladimir Markoe39c54e2014-09-22 14:50:02 +010066 switch_tables_.push_back(tab_rec);
Brian Carlstrom7940e442013-07-12 13:46:57 -070067
68 // Get the switch value
69 rl_src = LoadValue(rl_src, kCoreReg);
Mark Mendell67c39c42014-01-31 17:28:00 -080070
Brian Carlstrom7940e442013-07-12 13:46:57 -070071 int low_key = s4FromSwitchData(&table[2]);
buzbee2700f7e2014-03-07 09:46:20 -080072 RegStorage keyReg;
Brian Carlstrom7940e442013-07-12 13:46:57 -070073 // Remove the bias, if necessary
74 if (low_key == 0) {
buzbee2700f7e2014-03-07 09:46:20 -080075 keyReg = rl_src.reg;
Brian Carlstrom7940e442013-07-12 13:46:57 -070076 } else {
77 keyReg = AllocTemp();
buzbee2700f7e2014-03-07 09:46:20 -080078 OpRegRegImm(kOpSub, keyReg, rl_src.reg, low_key);
Brian Carlstrom7940e442013-07-12 13:46:57 -070079 }
Mark Mendell27dee8b2014-12-01 19:06:12 -050080
Brian Carlstrom7940e442013-07-12 13:46:57 -070081 // Bounds check - if < 0 or >= size continue following switch
Serguei Katkov407a9d22014-07-05 03:09:32 +070082 OpRegImm(kOpCmp, keyReg, size - 1);
Brian Carlstrom7940e442013-07-12 13:46:57 -070083 LIR* branch_over = OpCondBranch(kCondHi, NULL);
84
Mark Mendell27dee8b2014-12-01 19:06:12 -050085 RegStorage addr_for_jump;
86 if (cu_->target64) {
87 RegStorage table_base = AllocTempWide();
88 // Load the address of the table into table_base.
89 LIR* lea = RawLIR(current_dalvik_offset_, kX86Lea64RM, table_base.GetReg(), kRIPReg,
90 256, 0, WrapPointer(tab_rec));
91 lea->flags.fixup = kFixupSwitchTable;
92 AppendLIR(lea);
93
94 // Load the offset from the table out of the table.
95 addr_for_jump = AllocTempWide();
96 NewLIR5(kX86MovsxdRA, addr_for_jump.GetReg(), table_base.GetReg(), keyReg.GetReg(), 2, 0);
97
98 // Add the offset from the table to the table base.
99 OpRegReg(kOpAdd, addr_for_jump, table_base);
Vladimir Marko1961b602015-04-08 20:51:48 +0100100 tab_rec->anchor = nullptr; // Unused for x86-64.
Mark Mendell27dee8b2014-12-01 19:06:12 -0500101 } else {
Vladimir Marko1961b602015-04-08 20:51:48 +0100102 // Get the PC to a register and get the anchor.
103 LIR* anchor;
104 RegStorage r_pc = GetPcAndAnchor(&anchor);
105
Mark Mendell27dee8b2014-12-01 19:06:12 -0500106 // Load the displacement from the switch table.
107 addr_for_jump = AllocTemp();
Vladimir Marko1961b602015-04-08 20:51:48 +0100108 NewLIR5(kX86PcRelLoadRA, addr_for_jump.GetReg(), r_pc.GetReg(), keyReg.GetReg(),
Mark Mendell27dee8b2014-12-01 19:06:12 -0500109 2, WrapPointer(tab_rec));
Vladimir Marko1961b602015-04-08 20:51:48 +0100110 // Add displacement and r_pc to get the address.
111 OpRegReg(kOpAdd, addr_for_jump, r_pc);
112 tab_rec->anchor = anchor;
Mark Mendell27dee8b2014-12-01 19:06:12 -0500113 }
114
Brian Carlstrom7940e442013-07-12 13:46:57 -0700115 // ..and go!
Vladimir Marko1961b602015-04-08 20:51:48 +0100116 NewLIR1(kX86JmpR, addr_for_jump.GetReg());
Brian Carlstrom7940e442013-07-12 13:46:57 -0700117
118 /* branch_over target here */
119 LIR* target = NewLIR0(kPseudoTargetLabel);
120 branch_over->target = target;
121}
122
Brian Carlstrom2ce745c2013-07-17 17:44:30 -0700123void X86Mir2Lir::GenMoveException(RegLocation rl_dest) {
buzbee33ae5582014-06-12 14:56:32 -0700124 int ex_offset = cu_->target64 ?
Andreas Gampe2f244e92014-05-08 03:35:25 -0700125 Thread::ExceptionOffset<8>().Int32Value() :
126 Thread::ExceptionOffset<4>().Int32Value();
buzbeea0cd2d72014-06-01 09:33:49 -0700127 RegLocation rl_result = EvalLoc(rl_dest, kRefReg, true);
Serguei Katkov407a9d22014-07-05 03:09:32 +0700128 NewLIR2(cu_->target64 ? kX86Mov64RT : kX86Mov32RT, rl_result.reg.GetReg(), ex_offset);
129 NewLIR2(cu_->target64 ? kX86Mov64TI : kX86Mov32TI, ex_offset, 0);
Brian Carlstrom7940e442013-07-12 13:46:57 -0700130 StoreValue(rl_dest, rl_result);
131}
132
Vladimir Markobf535be2014-11-19 18:52:35 +0000133void X86Mir2Lir::UnconditionallyMarkGCCard(RegStorage tgt_addr_reg) {
Serguei Katkov407a9d22014-07-05 03:09:32 +0700134 DCHECK_EQ(tgt_addr_reg.Is64Bit(), cu_->target64);
Serguei Katkov407a9d22014-07-05 03:09:32 +0700135 RegStorage reg_card_base = AllocTempRef();
136 RegStorage reg_card_no = AllocTempRef();
buzbee33ae5582014-06-12 14:56:32 -0700137 int ct_offset = cu_->target64 ?
Andreas Gampe2f244e92014-05-08 03:35:25 -0700138 Thread::CardTableOffset<8>().Int32Value() :
139 Thread::CardTableOffset<4>().Int32Value();
Serguei Katkov407a9d22014-07-05 03:09:32 +0700140 NewLIR2(cu_->target64 ? kX86Mov64RT : kX86Mov32RT, reg_card_base.GetReg(), ct_offset);
Brian Carlstrom7940e442013-07-12 13:46:57 -0700141 OpRegRegImm(kOpLsr, reg_card_no, tgt_addr_reg, gc::accounting::CardTable::kCardShift);
buzbee2700f7e2014-03-07 09:46:20 -0800142 StoreBaseIndexed(reg_card_base, reg_card_no, reg_card_base, 0, kUnsignedByte);
Brian Carlstrom7940e442013-07-12 13:46:57 -0700143 FreeTemp(reg_card_base);
144 FreeTemp(reg_card_no);
145}
146
Brian Carlstrom2ce745c2013-07-17 17:44:30 -0700147void X86Mir2Lir::GenEntrySequence(RegLocation* ArgLocs, RegLocation rl_method) {
Brian Carlstrom7940e442013-07-12 13:46:57 -0700148 /*
149 * On entry, rX86_ARG0, rX86_ARG1, rX86_ARG2 are live. Let the register
150 * allocation mechanism know so it doesn't try to use any of them when
151 * expanding the frame or flushing. This leaves the utility
152 * code with no spare temps.
153 */
Ian Rogersb28c1c02014-11-08 11:21:21 -0800154 const RegStorage arg0 = TargetReg32(kArg0);
155 const RegStorage arg1 = TargetReg32(kArg1);
156 const RegStorage arg2 = TargetReg32(kArg2);
157 LockTemp(arg0);
158 LockTemp(arg1);
159 LockTemp(arg2);
Brian Carlstrom7940e442013-07-12 13:46:57 -0700160
Brian Carlstrom7940e442013-07-12 13:46:57 -0700161 /*
162 * We can safely skip the stack overflow check if we're
163 * a leaf *and* our frame size < fudge factor.
164 */
Ian Rogersb28c1c02014-11-08 11:21:21 -0800165 const InstructionSet isa = cu_->target64 ? kX86_64 : kX86;
Dave Allison648d7112014-07-25 16:15:27 -0700166 bool skip_overflow_check = mir_graph_->MethodIsLeaf() && !FrameNeedsStackCheck(frame_size_, isa);
Ian Rogersb28c1c02014-11-08 11:21:21 -0800167 const RegStorage rs_rSP = cu_->target64 ? rs_rX86_SP_64 : rs_rX86_SP_32;
Dave Allison69dfe512014-07-11 17:11:58 +0000168
169 // If we doing an implicit stack overflow check, perform the load immediately
170 // before the stack pointer is decremented and anything is saved.
171 if (!skip_overflow_check &&
172 cu_->compiler_driver->GetCompilerOptions().GetImplicitStackOverflowChecks()) {
173 // Implicit stack overflow check.
174 // test eax,[esp + -overflow]
175 int overflow = GetStackOverflowReservedBytes(isa);
Ian Rogersb28c1c02014-11-08 11:21:21 -0800176 NewLIR3(kX86Test32RM, rs_rAX.GetReg(), rs_rSP.GetReg(), -overflow);
Dave Allison69dfe512014-07-11 17:11:58 +0000177 MarkPossibleStackOverflowException();
178 }
179
180 /* Build frame, return address already on stack */
David Srbecky8c578312015-04-07 19:46:22 +0100181 OpRegImm(kOpSub, rs_rSP, frame_size_ - GetInstructionSetPointerSize(cu_->instruction_set));
Dave Allison69dfe512014-07-11 17:11:58 +0000182
Brian Carlstrom7940e442013-07-12 13:46:57 -0700183 /* Spill core callee saves */
184 SpillCoreRegs();
Serguei Katkovc3801912014-07-08 17:21:53 +0700185 SpillFPRegs();
Brian Carlstrom7940e442013-07-12 13:46:57 -0700186 if (!skip_overflow_check) {
Mathieu Chartier0d507d12014-03-19 10:17:28 -0700187 class StackOverflowSlowPath : public LIRSlowPath {
188 public:
189 StackOverflowSlowPath(Mir2Lir* m2l, LIR* branch, size_t sp_displace)
Vladimir Marko0b40ecf2015-03-20 12:08:03 +0000190 : LIRSlowPath(m2l, branch), sp_displace_(sp_displace) {
Mathieu Chartier0d507d12014-03-19 10:17:28 -0700191 }
192 void Compile() OVERRIDE {
193 m2l_->ResetRegPool();
194 m2l_->ResetDefTracking();
Mingyao Yang6ffcfa02014-04-25 11:06:00 -0700195 GenerateTargetLabel(kPseudoThrowTarget);
Ian Rogersb28c1c02014-11-08 11:21:21 -0800196 const RegStorage local_rs_rSP = cu_->target64 ? rs_rX86_SP_64 : rs_rX86_SP_32;
197 m2l_->OpRegImm(kOpAdd, local_rs_rSP, sp_displace_);
Mathieu Chartier0d507d12014-03-19 10:17:28 -0700198 m2l_->ClobberCallerSave();
Mathieu Chartier0d507d12014-03-19 10:17:28 -0700199 // Assumes codegen and target are in thumb2 mode.
Andreas Gampe98430592014-07-27 19:44:50 -0700200 m2l_->CallHelper(RegStorage::InvalidReg(), kQuickThrowStackOverflow,
201 false /* MarkSafepointPC */, false /* UseLink */);
Mathieu Chartier0d507d12014-03-19 10:17:28 -0700202 }
203
204 private:
205 const size_t sp_displace_;
206 };
Dave Allison69dfe512014-07-11 17:11:58 +0000207 if (!cu_->compiler_driver->GetCompilerOptions().GetImplicitStackOverflowChecks()) {
208 // TODO: for large frames we should do something like:
209 // spill ebp
210 // lea ebp, [esp + frame_size]
211 // cmp ebp, fs:[stack_end_]
212 // jcc stack_overflow_exception
213 // mov esp, ebp
214 // in case a signal comes in that's not using an alternate signal stack and the large frame
215 // may have moved us outside of the reserved area at the end of the stack.
216 // cmp rs_rX86_SP, fs:[stack_end_]; jcc throw_slowpath
217 if (cu_->target64) {
Ian Rogersb28c1c02014-11-08 11:21:21 -0800218 OpRegThreadMem(kOpCmp, rs_rX86_SP_64, Thread::StackEndOffset<8>());
Dave Allison69dfe512014-07-11 17:11:58 +0000219 } else {
Ian Rogersb28c1c02014-11-08 11:21:21 -0800220 OpRegThreadMem(kOpCmp, rs_rX86_SP_32, Thread::StackEndOffset<4>());
Dave Allison69dfe512014-07-11 17:11:58 +0000221 }
222 LIR* branch = OpCondBranch(kCondUlt, nullptr);
223 AddSlowPath(
Chao-ying Fue0ccdc02014-06-06 17:32:37 -0700224 new(arena_)StackOverflowSlowPath(this, branch,
225 frame_size_ -
226 GetInstructionSetPointerSize(cu_->instruction_set)));
Dave Allison69dfe512014-07-11 17:11:58 +0000227 }
Brian Carlstrom7940e442013-07-12 13:46:57 -0700228 }
229
230 FlushIns(ArgLocs, rl_method);
231
Vladimir Marko1961b602015-04-08 20:51:48 +0100232 // We can promote the PC of an anchor for PC-relative addressing to a register
233 // if it's used at least twice. Without investigating where we should lazily
234 // load the reference, we conveniently load it after flushing inputs.
235 if (pc_rel_base_reg_.Valid()) {
236 DCHECK(!cu_->target64);
237 setup_pc_rel_base_reg_ = OpLoadPc(pc_rel_base_reg_);
Mark Mendell67c39c42014-01-31 17:28:00 -0800238 }
239
Ian Rogersb28c1c02014-11-08 11:21:21 -0800240 FreeTemp(arg0);
241 FreeTemp(arg1);
242 FreeTemp(arg2);
Brian Carlstrom7940e442013-07-12 13:46:57 -0700243}
244
245void X86Mir2Lir::GenExitSequence() {
246 /*
247 * In the exit path, rX86_RET0/rX86_RET1 are live - make sure they aren't
248 * allocated by the register utilities as temps.
249 */
buzbee091cc402014-03-31 10:14:40 -0700250 LockTemp(rs_rX86_RET0);
251 LockTemp(rs_rX86_RET1);
Brian Carlstrom7940e442013-07-12 13:46:57 -0700252
Brian Carlstrom7940e442013-07-12 13:46:57 -0700253 UnSpillCoreRegs();
Serguei Katkovc3801912014-07-08 17:21:53 +0700254 UnSpillFPRegs();
Brian Carlstrom7940e442013-07-12 13:46:57 -0700255 /* Remove frame except for return address */
Ian Rogersb28c1c02014-11-08 11:21:21 -0800256 const RegStorage rs_rSP = cu_->target64 ? rs_rX86_SP_64 : rs_rX86_SP_32;
David Srbecky8c578312015-04-07 19:46:22 +0100257 int adjust = frame_size_ - GetInstructionSetPointerSize(cu_->instruction_set);
258 OpRegImm(kOpAdd, rs_rSP, adjust);
Brian Carlstrom7940e442013-07-12 13:46:57 -0700259 NewLIR0(kX86Ret);
260}
261
Razvan A Lupusoru3bc01742014-02-06 13:18:43 -0800262void X86Mir2Lir::GenSpecialExitSequence() {
263 NewLIR0(kX86Ret);
264}
265
Vladimir Marko6ce3eba2015-02-16 13:05:59 +0000266void X86Mir2Lir::GenSpecialEntryForSuspend() {
267 // Keep 16-byte stack alignment, there's already the return address, so
268 // - for 32-bit push EAX, i.e. ArtMethod*, ESI, EDI,
269 // - for 64-bit push RAX, i.e. ArtMethod*.
270 if (!cu_->target64) {
271 DCHECK(!IsTemp(rs_rSI));
272 DCHECK(!IsTemp(rs_rDI));
273 core_spill_mask_ =
Vladimir Markod7a5e552015-02-20 14:53:53 +0000274 (1u << rs_rDI.GetRegNum()) | (1u << rs_rSI.GetRegNum()) | (1u << rs_rRET.GetRegNum());
Vladimir Marko6ce3eba2015-02-16 13:05:59 +0000275 num_core_spills_ = 3u;
276 } else {
277 core_spill_mask_ = (1u << rs_rRET.GetRegNum());
278 num_core_spills_ = 1u;
279 }
280 fp_spill_mask_ = 0u;
281 num_fp_spills_ = 0u;
282 frame_size_ = 16u;
283 core_vmap_table_.clear();
284 fp_vmap_table_.clear();
285 if (!cu_->target64) {
286 NewLIR1(kX86Push32R, rs_rDI.GetReg());
287 NewLIR1(kX86Push32R, rs_rSI.GetReg());
288 }
289 NewLIR1(kX86Push32R, TargetReg(kArg0, kRef).GetReg()); // ArtMethod*
290}
291
292void X86Mir2Lir::GenSpecialExitForSuspend() {
293 // Pop the frame. (ArtMethod* no longer needed but restore it anyway.)
294 NewLIR1(kX86Pop32R, TargetReg(kArg0, kRef).GetReg()); // ArtMethod*
295 if (!cu_->target64) {
296 NewLIR1(kX86Pop32R, rs_rSI.GetReg());
297 NewLIR1(kX86Pop32R, rs_rDI.GetReg());
298 }
299}
300
Dave Allison69dfe512014-07-11 17:11:58 +0000301void X86Mir2Lir::GenImplicitNullCheck(RegStorage reg, int opt_flags) {
302 if (!(cu_->disable_opt & (1 << kNullCheckElimination)) && (opt_flags & MIR_IGNORE_NULL_CHECK)) {
303 return;
304 }
305 // Implicit null pointer check.
306 // test eax,[arg1+0]
307 NewLIR3(kX86Test32RM, rs_rAX.GetReg(), reg.GetReg(), 0);
308 MarkPossibleNullPointerException(opt_flags);
309}
310
Vladimir Markof4da6752014-08-01 19:04:18 +0100311/*
312 * Bit of a hack here - in the absence of a real scheduling pass,
313 * emit the next instruction in static & direct invoke sequences.
314 */
Vladimir Markodc56cc52015-03-27 18:18:36 +0000315int X86Mir2Lir::X86NextSDCallInsn(CompilationUnit* cu, CallInfo* info,
316 int state, const MethodReference& target_method,
317 uint32_t,
318 uintptr_t direct_code, uintptr_t direct_method,
319 InvokeType type) {
Ian Rogers6a3c1fc2014-10-31 00:33:20 -0700320 UNUSED(info, direct_code);
Vladimir Markodc56cc52015-03-27 18:18:36 +0000321 X86Mir2Lir* cg = static_cast<X86Mir2Lir*>(cu->cg.get());
Vladimir Markof4da6752014-08-01 19:04:18 +0100322 if (direct_method != 0) {
323 switch (state) {
324 case 0: // Get the current Method* [sets kArg0]
325 if (direct_method != static_cast<uintptr_t>(-1)) {
Mathieu Chartier921d6eb2015-03-13 16:32:44 -0700326 auto target_reg = cg->TargetReg(kArg0, kRef);
327 if (target_reg.Is64Bit()) {
328 cg->LoadConstantWide(target_reg, direct_method);
329 } else {
330 cg->LoadConstant(target_reg, direct_method);
331 }
Vladimir Markof4da6752014-08-01 19:04:18 +0100332 } else {
333 cg->LoadMethodAddress(target_method, type, kArg0);
334 }
335 break;
336 default:
337 return -1;
338 }
Vladimir Markodc56cc52015-03-27 18:18:36 +0000339 } else if (cg->CanUseOpPcRelDexCacheArrayLoad()) {
340 switch (state) {
341 case 0: {
342 CHECK_EQ(cu->dex_file, target_method.dex_file);
343 size_t offset = cg->dex_cache_arrays_layout_.MethodOffset(target_method.dex_method_index);
344 cg->OpPcRelDexCacheArrayLoad(cu->dex_file, offset, cg->TargetReg(kArg0, kRef));
345 break;
346 }
347 default:
348 return -1;
349 }
Vladimir Markof4da6752014-08-01 19:04:18 +0100350 } else {
351 RegStorage arg0_ref = cg->TargetReg(kArg0, kRef);
352 switch (state) {
353 case 0: // Get the current Method* [sets kArg0]
354 // TUNING: we can save a reg copy if Method* has been promoted.
355 cg->LoadCurrMethodDirect(arg0_ref);
356 break;
357 case 1: // Get method->dex_cache_resolved_methods_
358 cg->LoadRefDisp(arg0_ref,
359 mirror::ArtMethod::DexCacheResolvedMethodsOffset().Int32Value(),
360 arg0_ref,
361 kNotVolatile);
362 break;
363 case 2: // Grab target method*
364 CHECK_EQ(cu->dex_file, target_method.dex_file);
365 cg->LoadRefDisp(arg0_ref,
366 mirror::ObjectArray<mirror::Object>::OffsetOfElement(
367 target_method.dex_method_index).Int32Value(),
368 arg0_ref,
369 kNotVolatile);
370 break;
371 default:
372 return -1;
373 }
374 }
375 return state + 1;
376}
377
378NextCallInsn X86Mir2Lir::GetNextSDCallInsn() {
379 return X86NextSDCallInsn;
380}
381
Brian Carlstrom7940e442013-07-12 13:46:57 -0700382} // namespace art