blob: 2364bc84ca14a623b9b354c71e4677f1382fe0d5 [file] [log] [blame]
Nicolas Geoffrayd4dd2552014-02-28 10:23:58 +00001/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "code_generator_arm.h"
18#include "utils/assembler.h"
19#include "utils/arm/assembler_arm.h"
20
Nicolas Geoffray8ccc3f52014-03-19 10:34:11 +000021#include "mirror/array.h"
22#include "mirror/art_method.h"
23
Nicolas Geoffray787c3072014-03-17 10:20:19 +000024#define __ reinterpret_cast<ArmAssembler*>(GetAssembler())->
Nicolas Geoffrayd4dd2552014-02-28 10:23:58 +000025
26namespace art {
27namespace arm {
28
Nicolas Geoffray4a34a422014-04-03 10:38:37 +010029static constexpr int kNumberOfPushedRegistersAtEntry = 1;
30static constexpr int kCurrentMethodStackOffset = 0;
31
32InstructionCodeGeneratorARM::InstructionCodeGeneratorARM(HGraph* graph, CodeGeneratorARM* codegen)
33 : HGraphVisitor(graph),
34 assembler_(codegen->GetAssembler()),
35 codegen_(codegen) {}
36
Nicolas Geoffrayd4dd2552014-02-28 10:23:58 +000037void CodeGeneratorARM::GenerateFrameEntry() {
Nicolas Geoffray8ccc3f52014-03-19 10:34:11 +000038 core_spill_mask_ |= (1 << LR);
Nicolas Geoffray4a34a422014-04-03 10:38:37 +010039 __ PushList((1 << LR));
Nicolas Geoffray8ccc3f52014-03-19 10:34:11 +000040
Nicolas Geoffrayf583e592014-04-07 13:20:42 +010041 // Add the current ART method to the frame size, the return PC, and the filler.
42 SetFrameSize(RoundUp((
43 GetGraph()->GetMaximumNumberOfOutVRegs() + GetGraph()->GetNumberOfVRegs() + 3) * kArmWordSize,
44 kStackAlignment));
45 // The return PC has already been pushed on the stack.
Nicolas Geoffray707c8092014-04-04 10:50:14 +010046 __ AddConstant(SP, -(GetFrameSize() - kNumberOfPushedRegistersAtEntry * kArmWordSize));
Nicolas Geoffray8ccc3f52014-03-19 10:34:11 +000047 __ str(R0, Address(SP, 0));
Nicolas Geoffrayd4dd2552014-02-28 10:23:58 +000048}
49
50void CodeGeneratorARM::GenerateFrameExit() {
Nicolas Geoffray707c8092014-04-04 10:50:14 +010051 __ AddConstant(SP, GetFrameSize() - kNumberOfPushedRegistersAtEntry * kArmWordSize);
Nicolas Geoffray4a34a422014-04-03 10:38:37 +010052 __ PopList((1 << PC));
Nicolas Geoffrayd4dd2552014-02-28 10:23:58 +000053}
54
55void CodeGeneratorARM::Bind(Label* label) {
56 __ Bind(label);
57}
58
Nicolas Geoffray4a34a422014-04-03 10:38:37 +010059int32_t CodeGeneratorARM::GetStackSlot(HLocal* local) const {
Nicolas Geoffrayf583e592014-04-07 13:20:42 +010060 uint16_t reg_number = local->GetRegNumber();
61 uint16_t number_of_vregs = GetGraph()->GetNumberOfVRegs();
62 uint16_t number_of_in_vregs = GetGraph()->GetNumberOfInVRegs();
63 if (reg_number >= number_of_vregs - number_of_in_vregs) {
64 // Local is a parameter of the method. It is stored in the caller's frame.
65 return GetFrameSize() + kArmWordSize // ART method
66 + (reg_number - number_of_vregs + number_of_in_vregs) * kArmWordSize;
67 } else {
68 // Local is a temporary in this method. It is stored in this method's frame.
69 return GetFrameSize() - (kNumberOfPushedRegistersAtEntry * kArmWordSize)
70 - kArmWordSize // filler.
71 - (number_of_vregs * kArmWordSize)
72 + (reg_number * kArmWordSize);
73 }
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +000074}
75
Nicolas Geoffray4a34a422014-04-03 10:38:37 +010076void CodeGeneratorARM::Move(HInstruction* instruction, Location location, HInstruction* move_for) {
77 if (instruction->AsIntConstant() != nullptr) {
78 __ LoadImmediate(location.reg<Register>(), instruction->AsIntConstant()->GetValue());
79 } else if (instruction->AsLoadLocal() != nullptr) {
80 __ LoadFromOffset(kLoadWord, location.reg<Register>(),
81 SP, GetStackSlot(instruction->AsLoadLocal()->GetLocal()));
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +000082 } else {
Nicolas Geoffray4a34a422014-04-03 10:38:37 +010083 // This can currently only happen when the instruction that requests the move
84 // is the next to be compiled.
85 DCHECK_EQ(instruction->GetNext(), move_for);
86 __ mov(location.reg<Register>(),
87 ShifterOperand(instruction->GetLocations()->Out().reg<Register>()));
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +000088 }
89}
90
91void LocationsBuilderARM::VisitGoto(HGoto* got) {
Nicolas Geoffray787c3072014-03-17 10:20:19 +000092 got->SetLocations(nullptr);
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +000093}
94
Nicolas Geoffray787c3072014-03-17 10:20:19 +000095void InstructionCodeGeneratorARM::VisitGoto(HGoto* got) {
Nicolas Geoffrayd4dd2552014-02-28 10:23:58 +000096 HBasicBlock* successor = got->GetSuccessor();
Nicolas Geoffray787c3072014-03-17 10:20:19 +000097 if (GetGraph()->GetExitBlock() == successor) {
98 codegen_->GenerateFrameExit();
99 } else if (!codegen_->GoesToNextBlock(got->GetBlock(), successor)) {
100 __ b(codegen_->GetLabelOf(successor));
Nicolas Geoffrayd4dd2552014-02-28 10:23:58 +0000101 }
102}
103
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000104void LocationsBuilderARM::VisitExit(HExit* exit) {
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000105 exit->SetLocations(nullptr);
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000106}
107
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000108void InstructionCodeGeneratorARM::VisitExit(HExit* exit) {
Nicolas Geoffrayd4dd2552014-02-28 10:23:58 +0000109 if (kIsDebugBuild) {
110 __ Comment("Unreachable");
111 __ bkpt(0);
112 }
113}
114
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000115void LocationsBuilderARM::VisitIf(HIf* if_instr) {
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000116 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(if_instr);
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000117 locations->SetInAt(0, Location(R0));
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000118 if_instr->SetLocations(locations);
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000119}
120
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000121void InstructionCodeGeneratorARM::VisitIf(HIf* if_instr) {
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000122 // TODO: Generate the input as a condition, instead of materializing in a register.
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000123 __ cmp(if_instr->GetLocations()->InAt(0).reg<Register>(), ShifterOperand(0));
124 __ b(codegen_->GetLabelOf(if_instr->IfFalseSuccessor()), EQ);
125 if (!codegen_->GoesToNextBlock(if_instr->GetBlock(), if_instr->IfTrueSuccessor())) {
126 __ b(codegen_->GetLabelOf(if_instr->IfTrueSuccessor()));
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000127 }
128}
129
130void LocationsBuilderARM::VisitEqual(HEqual* equal) {
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000131 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(equal);
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000132 locations->SetInAt(0, Location(R0));
133 locations->SetInAt(1, Location(R1));
134 locations->SetOut(Location(R0));
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000135 equal->SetLocations(locations);
Nicolas Geoffrayd4dd2552014-02-28 10:23:58 +0000136}
137
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000138void InstructionCodeGeneratorARM::VisitEqual(HEqual* equal) {
139 LocationSummary* locations = equal->GetLocations();
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000140 __ teq(locations->InAt(0).reg<Register>(),
141 ShifterOperand(locations->InAt(1).reg<Register>()));
142 __ mov(locations->Out().reg<Register>(), ShifterOperand(1), EQ);
143 __ mov(locations->Out().reg<Register>(), ShifterOperand(0), NE);
144}
145
146void LocationsBuilderARM::VisitLocal(HLocal* local) {
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000147 local->SetLocations(nullptr);
Nicolas Geoffray3ff386a2014-03-04 14:46:47 +0000148}
149
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000150void InstructionCodeGeneratorARM::VisitLocal(HLocal* local) {
151 DCHECK_EQ(local->GetBlock(), GetGraph()->GetEntryBlock());
Nicolas Geoffray707c8092014-04-04 10:50:14 +0100152 codegen_->SetFrameSize(codegen_->GetFrameSize() + kArmWordSize);
Nicolas Geoffray3ff386a2014-03-04 14:46:47 +0000153}
154
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000155void LocationsBuilderARM::VisitLoadLocal(HLoadLocal* load) {
Nicolas Geoffray4a34a422014-04-03 10:38:37 +0100156 load->SetLocations(nullptr);
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000157}
158
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000159void InstructionCodeGeneratorARM::VisitLoadLocal(HLoadLocal* load) {
Nicolas Geoffray4a34a422014-04-03 10:38:37 +0100160 // Nothing to do, this is driven by the code generator.
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000161}
162
163void LocationsBuilderARM::VisitStoreLocal(HStoreLocal* store) {
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000164 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(store);
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000165 locations->SetInAt(1, Location(R0));
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000166 store->SetLocations(locations);
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000167}
168
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000169void InstructionCodeGeneratorARM::VisitStoreLocal(HStoreLocal* store) {
170 LocationSummary* locations = store->GetLocations();
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000171 __ StoreToOffset(kStoreWord, locations->InAt(1).reg<Register>(),
Nicolas Geoffray4a34a422014-04-03 10:38:37 +0100172 SP, codegen_->GetStackSlot(store->GetLocal()));
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000173}
174
175void LocationsBuilderARM::VisitIntConstant(HIntConstant* constant) {
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000176 constant->SetLocations(nullptr);
Nicolas Geoffray3ff386a2014-03-04 14:46:47 +0000177}
178
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000179void InstructionCodeGeneratorARM::VisitIntConstant(HIntConstant* constant) {
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000180 // Will be generated at use site.
181}
182
183void LocationsBuilderARM::VisitReturnVoid(HReturnVoid* ret) {
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000184 ret->SetLocations(nullptr);
Nicolas Geoffray3ff386a2014-03-04 14:46:47 +0000185}
186
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000187void InstructionCodeGeneratorARM::VisitReturnVoid(HReturnVoid* ret) {
188 codegen_->GenerateFrameExit();
Nicolas Geoffrayd4dd2552014-02-28 10:23:58 +0000189}
190
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000191void LocationsBuilderARM::VisitReturn(HReturn* ret) {
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000192 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(ret);
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000193 locations->SetInAt(0, Location(R0));
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000194 ret->SetLocations(locations);
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000195}
196
Nicolas Geoffray787c3072014-03-17 10:20:19 +0000197void InstructionCodeGeneratorARM::VisitReturn(HReturn* ret) {
198 DCHECK_EQ(ret->GetLocations()->InAt(0).reg<Register>(), R0);
199 codegen_->GenerateFrameExit();
Nicolas Geoffraybab4ed72014-03-11 17:53:17 +0000200}
201
Nicolas Geoffray4a34a422014-04-03 10:38:37 +0100202static constexpr Register kParameterCoreRegisters[] = { R1, R2, R3 };
Nicolas Geoffray2e7038a2014-04-03 18:49:58 +0100203static constexpr size_t kParameterCoreRegistersLength = arraysize(kParameterCoreRegisters);
Nicolas Geoffray4a34a422014-04-03 10:38:37 +0100204
Nicolas Geoffrayf583e592014-04-07 13:20:42 +0100205class InvokeDexCallingConvention : public CallingConvention<Register> {
Nicolas Geoffray4a34a422014-04-03 10:38:37 +0100206 public:
Nicolas Geoffrayf583e592014-04-07 13:20:42 +0100207 InvokeDexCallingConvention()
Nicolas Geoffray4a34a422014-04-03 10:38:37 +0100208 : CallingConvention(kParameterCoreRegisters, kParameterCoreRegistersLength) {}
209
210 private:
Nicolas Geoffrayf583e592014-04-07 13:20:42 +0100211 DISALLOW_COPY_AND_ASSIGN(InvokeDexCallingConvention);
Nicolas Geoffray4a34a422014-04-03 10:38:37 +0100212};
213
214void LocationsBuilderARM::VisitPushArgument(HPushArgument* argument) {
215 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(argument);
Nicolas Geoffrayf583e592014-04-07 13:20:42 +0100216 InvokeDexCallingConvention calling_convention;
Nicolas Geoffray4a34a422014-04-03 10:38:37 +0100217 if (argument->GetArgumentIndex() < calling_convention.GetNumberOfRegisters()) {
218 Location location = Location(calling_convention.GetRegisterAt(argument->GetArgumentIndex()));
219 locations->SetInAt(0, location);
220 locations->SetOut(location);
221 } else {
222 locations->SetInAt(0, Location(R0));
223 }
224 argument->SetLocations(locations);
225}
226
227void InstructionCodeGeneratorARM::VisitPushArgument(HPushArgument* argument) {
228 uint8_t argument_index = argument->GetArgumentIndex();
Nicolas Geoffrayf583e592014-04-07 13:20:42 +0100229 InvokeDexCallingConvention calling_convention;
Nicolas Geoffray4a34a422014-04-03 10:38:37 +0100230 size_t parameter_registers = calling_convention.GetNumberOfRegisters();
231 LocationSummary* locations = argument->GetLocations();
232 if (argument_index >= parameter_registers) {
233 uint8_t offset = calling_convention.GetStackOffsetOf(argument_index);
234 __ StoreToOffset(kStoreWord, locations->InAt(0).reg<Register>(), SP, offset);
235 } else {
236 DCHECK_EQ(locations->Out().reg<Register>(), locations->InAt(0).reg<Register>());
237 }
238}
239
Nicolas Geoffray8ccc3f52014-03-19 10:34:11 +0000240void LocationsBuilderARM::VisitInvokeStatic(HInvokeStatic* invoke) {
241 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(invoke);
Nicolas Geoffray8ccc3f52014-03-19 10:34:11 +0000242 locations->AddTemp(Location(R0));
243 invoke->SetLocations(locations);
244}
245
246void InstructionCodeGeneratorARM::LoadCurrentMethod(Register reg) {
Nicolas Geoffray4a34a422014-04-03 10:38:37 +0100247 __ ldr(reg, Address(SP, kCurrentMethodStackOffset));
Nicolas Geoffray8ccc3f52014-03-19 10:34:11 +0000248}
249
250void InstructionCodeGeneratorARM::VisitInvokeStatic(HInvokeStatic* invoke) {
251 Register temp = invoke->GetLocations()->GetTemp(0).reg<Register>();
252 size_t index_in_cache = mirror::Array::DataOffset(sizeof(mirror::Object*)).Int32Value() +
Nicolas Geoffray707c8092014-04-04 10:50:14 +0100253 invoke->GetIndexInDexCache() * kArmWordSize;
Nicolas Geoffray8ccc3f52014-03-19 10:34:11 +0000254
255 // TODO: Implement all kinds of calls:
256 // 1) boot -> boot
257 // 2) app -> boot
258 // 3) app -> app
259 //
260 // Currently we implement the app -> app logic, which looks up in the resolve cache.
261
262 // temp = method;
263 LoadCurrentMethod(temp);
264 // temp = temp->dex_cache_resolved_methods_;
265 __ ldr(temp, Address(temp, mirror::ArtMethod::DexCacheResolvedMethodsOffset().Int32Value()));
266 // temp = temp[index_in_cache]
267 __ ldr(temp, Address(temp, index_in_cache));
268 // LR = temp[offset_of_quick_compiled_code]
269 __ ldr(LR, Address(temp,
270 mirror::ArtMethod::EntryPointFromQuickCompiledCodeOffset().Int32Value()));
271 // LR()
272 __ blx(LR);
273
274 codegen_->RecordPcInfo(invoke->GetDexPc());
275}
276
Nicolas Geoffrayd8ee7372014-03-28 15:43:40 +0000277void LocationsBuilderARM::VisitAdd(HAdd* add) {
278 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(add);
279 switch (add->GetResultType()) {
280 case Primitive::kPrimInt: {
281 locations->SetInAt(0, Location(R0));
282 locations->SetInAt(1, Location(R1));
283 locations->SetOut(Location(R0));
284 break;
285 }
286 default:
287 LOG(FATAL) << "Unimplemented";
288 }
289 add->SetLocations(locations);
290}
291
292void InstructionCodeGeneratorARM::VisitAdd(HAdd* add) {
293 LocationSummary* locations = add->GetLocations();
294 switch (add->GetResultType()) {
295 case Primitive::kPrimInt:
296 __ add(locations->Out().reg<Register>(),
297 locations->InAt(0).reg<Register>(),
298 ShifterOperand(locations->InAt(1).reg<Register>()));
299 break;
300 default:
301 LOG(FATAL) << "Unimplemented";
302 }
303}
304
Nicolas Geoffrayf583e592014-04-07 13:20:42 +0100305void LocationsBuilderARM::VisitSub(HSub* sub) {
306 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(sub);
307 switch (sub->GetResultType()) {
308 case Primitive::kPrimInt: {
309 locations->SetInAt(0, Location(R0));
310 locations->SetInAt(1, Location(R1));
311 locations->SetOut(Location(R0));
312 break;
313 }
314 default:
315 LOG(FATAL) << "Unimplemented";
316 }
317 sub->SetLocations(locations);
318}
319
320void InstructionCodeGeneratorARM::VisitSub(HSub* sub) {
321 LocationSummary* locations = sub->GetLocations();
322 switch (sub->GetResultType()) {
323 case Primitive::kPrimInt:
324 __ sub(locations->Out().reg<Register>(),
325 locations->InAt(0).reg<Register>(),
326 ShifterOperand(locations->InAt(1).reg<Register>()));
327 break;
328 default:
329 LOG(FATAL) << "Unimplemented";
330 }
331}
332
Nicolas Geoffray2e7038a2014-04-03 18:49:58 +0100333static constexpr Register kRuntimeParameterCoreRegisters[] = { R0, R1 };
334static constexpr size_t kRuntimeParameterCoreRegistersLength =
335 arraysize(kRuntimeParameterCoreRegisters);
336
337class InvokeRuntimeCallingConvention : public CallingConvention<Register> {
338 public:
339 InvokeRuntimeCallingConvention()
340 : CallingConvention(kRuntimeParameterCoreRegisters,
341 kRuntimeParameterCoreRegistersLength) {}
342
343 private:
344 DISALLOW_COPY_AND_ASSIGN(InvokeRuntimeCallingConvention);
345};
346
347void LocationsBuilderARM::VisitNewInstance(HNewInstance* instruction) {
348 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
349 locations->SetOut(Location(R0));
350 instruction->SetLocations(locations);
351}
352
353void InstructionCodeGeneratorARM::VisitNewInstance(HNewInstance* instruction) {
354 InvokeRuntimeCallingConvention calling_convention;
355 LoadCurrentMethod(calling_convention.GetRegisterAt(1));
356 __ LoadImmediate(calling_convention.GetRegisterAt(0), instruction->GetTypeIndex());
357
Nicolas Geoffray707c8092014-04-04 10:50:14 +0100358 int32_t offset = QUICK_ENTRYPOINT_OFFSET(kArmWordSize, pAllocObjectWithAccessCheck).Int32Value();
Nicolas Geoffray2e7038a2014-04-03 18:49:58 +0100359 __ ldr(LR, Address(TR, offset));
360 __ blx(LR);
361
362 codegen_->RecordPcInfo(instruction->GetDexPc());
363}
364
Nicolas Geoffrayf583e592014-04-07 13:20:42 +0100365void LocationsBuilderARM::VisitParameterValue(HParameterValue* instruction) {
366 LocationSummary* locations = new (GetGraph()->GetArena()) LocationSummary(instruction);
367 InvokeDexCallingConvention calling_convention;
368 uint32_t argument_index = instruction->GetIndex();
369 if (argument_index < calling_convention.GetNumberOfRegisters()) {
370 locations->SetOut(Location(calling_convention.GetRegisterAt(argument_index)));
371 } else {
372 locations->SetOut(Location(R0));
373 }
374 instruction->SetLocations(locations);
375}
376
377void InstructionCodeGeneratorARM::VisitParameterValue(HParameterValue* instruction) {
378 LocationSummary* locations = instruction->GetLocations();
379 InvokeDexCallingConvention calling_convention;
380 uint8_t argument_index = instruction->GetIndex();
381 if (argument_index >= calling_convention.GetNumberOfRegisters()) {
382 uint8_t offset = calling_convention.GetStackOffsetOf(argument_index);
383 __ ldr(locations->Out().reg<Register>(), Address(SP, offset + codegen_->GetFrameSize()));
384 }
385}
386
Nicolas Geoffrayd4dd2552014-02-28 10:23:58 +0000387} // namespace arm
388} // namespace art