summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/code_generator.cc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-04-03 16:49:25 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-04-03 16:49:25 +0000
commita7b2826fa469c626ff2c3ff26fd848c28bccc092 (patch)
treef53277bb95088b5b650cf982d0da666f1204517a /compiler/optimizing/code_generator.cc
parent5a4139fd33547d09c94d9650157e3a4e4c9eede4 (diff)
parent4a34a428c6a2588e0857ef6baf88f1b73ce65958 (diff)
downloadart-a7b2826fa469c626ff2c3ff26fd848c28bccc092.zip
art-a7b2826fa469c626ff2c3ff26fd848c28bccc092.tar.gz
art-a7b2826fa469c626ff2c3ff26fd848c28bccc092.tar.bz2
Merge "Support passing arguments to invoke-static* instructions."
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index 2207fd7..05e5d7b 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -30,6 +30,7 @@
namespace art {
void CodeGenerator::Compile(CodeAllocator* allocator) {
+ frame_size_ = GetGraph()->GetMaximumNumberOfOutVRegs() * kWordSize;
const GrowableArray<HBasicBlock*>* blocks = GetGraph()->GetBlocks();
DCHECK(blocks->Get(0) == GetGraph()->GetEntryBlock());
DCHECK(GoesToNextBlock(GetGraph()->GetEntryBlock(), blocks->Get(1)));
@@ -73,9 +74,6 @@ void CodeGenerator::CompileBlock(HBasicBlock* block) {
current->Accept(location_builder);
InitLocations(current);
current->Accept(instruction_visitor);
- if (current->GetLocations() != nullptr && current->GetLocations()->Out().IsValid()) {
- Push(current, current->GetLocations()->Out());
- }
}
}
@@ -85,7 +83,7 @@ void CodeGenerator::InitLocations(HInstruction* instruction) {
Location location = instruction->GetLocations()->InAt(i);
if (location.IsValid()) {
// Move the input to the desired location.
- Move(instruction->InputAt(i), location);
+ Move(instruction->InputAt(i), location, instruction);
}
}
}
@@ -207,11 +205,10 @@ void CodeGenerator::BuildMappingTable(std::vector<uint8_t>* data) const {
void CodeGenerator::BuildVMapTable(std::vector<uint8_t>* data) const {
Leb128EncodingVector vmap_encoder;
- size_t size = 1 + 1 /* marker */ + 0;
+ // We currently don't use callee-saved registers.
+ size_t size = 0 + 1 /* marker */ + 0;
vmap_encoder.Reserve(size + 1u); // All values are likely to be one byte in ULEB128 (<128).
vmap_encoder.PushBackUnsigned(size);
- // We're currently always saving the frame pointer, so set it in the table as a temporary.
- vmap_encoder.PushBackUnsigned(kVRegTempBaseReg + VmapTable::kEntryAdjustment);
vmap_encoder.PushBackUnsigned(VmapTable::kAdjustedFpMarker);
*data = vmap_encoder.GetData();