summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/code_generator_x86.h
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-10-16 11:12:52 +0100
committerNicolas Geoffray <ngeoffray@google.com>2014-10-16 15:17:44 +0100
commit92a73aef279be78e3c2b04db1713076183933436 (patch)
treee73b214fb7d740588f5d065b2e4ff3eb8c527e34 /compiler/optimizing/code_generator_x86.h
parent5c5efc253507eb43265997c9afcd778f72b6cef4 (diff)
downloadart-92a73aef279be78e3c2b04db1713076183933436.tar.gz
art-92a73aef279be78e3c2b04db1713076183933436.tar.bz2
art-92a73aef279be78e3c2b04db1713076183933436.zip
Don't use assembler classes in code_generator.h.
The arm64 backend uses its own assembler and does not share the same classes as the other backends. To avoid conflicts or unnecessary mappings, just don't use those classes in the shared part of the code generator. Change-Id: I9e5fa40c1021d2e83a4ef14c52cd1ccd03f2f73d
Diffstat (limited to 'compiler/optimizing/code_generator_x86.h')
-rw-r--r--compiler/optimizing/code_generator_x86.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/compiler/optimizing/code_generator_x86.h b/compiler/optimizing/code_generator_x86.h
index a1a72a2bd7..aa5fee00e0 100644
--- a/compiler/optimizing/code_generator_x86.h
+++ b/compiler/optimizing/code_generator_x86.h
@@ -142,7 +142,7 @@ class CodeGeneratorX86 : public CodeGenerator {
virtual void GenerateFrameEntry() OVERRIDE;
virtual void GenerateFrameExit() OVERRIDE;
- virtual void Bind(Label* label) OVERRIDE;
+ virtual void Bind(HBasicBlock* block) OVERRIDE;
virtual void Move(HInstruction* instruction, Location location, HInstruction* move_for) OVERRIDE;
virtual void SaveCoreRegister(Location stack_location, uint32_t reg_id) OVERRIDE;
virtual void RestoreCoreRegister(Location stack_location, uint32_t reg_id) OVERRIDE;
@@ -189,7 +189,17 @@ class CodeGeneratorX86 : public CodeGenerator {
// Emit a write barrier.
void MarkGCCard(Register temp, Register card, Register object, Register value);
+ Label* GetLabelOf(HBasicBlock* block) const {
+ return block_labels_.GetRawStorage() + block->GetBlockId();
+ }
+
+ virtual void Initialize() OVERRIDE {
+ block_labels_.SetSize(GetGraph()->GetBlocks().Size());
+ }
+
private:
+ // Labels for each block that will be compiled.
+ GrowableArray<Label> block_labels_;
LocationsBuilderX86 location_builder_;
InstructionCodeGeneratorX86 instruction_visitor_;
ParallelMoveResolverX86 move_resolver_;