diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-04-03 10:38:37 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-04-03 17:09:22 +0100 |
commit | 4a34a428c6a2588e0857ef6baf88f1b73ce65958 (patch) | |
tree | a9f025c17752a175c4e6a203c01e935cb438efb1 /compiler/optimizing/code_generator_arm.h | |
parent | 8549cf9d83688f7decbbea2a8de761ce29e95f3c (diff) | |
download | art-4a34a428c6a2588e0857ef6baf88f1b73ce65958.zip art-4a34a428c6a2588e0857ef6baf88f1b73ce65958.tar.gz art-4a34a428c6a2588e0857ef6baf88f1b73ce65958.tar.bz2 |
Support passing arguments to invoke-static* instructions.
- Stop using the frame pointer for accessing locals.
- Stop emulating a stack when doing code generation. Instead,
rely on dex register model, where instructions only reference
registers.
Change-Id: Id51bd7d33ac430cb87a53c9f4b0c864eeb1006f9
Diffstat (limited to 'compiler/optimizing/code_generator_arm.h')
-rw-r--r-- | compiler/optimizing/code_generator_arm.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/compiler/optimizing/code_generator_arm.h b/compiler/optimizing/code_generator_arm.h index 7a2835d..52d6b2e 100644 --- a/compiler/optimizing/code_generator_arm.h +++ b/compiler/optimizing/code_generator_arm.h @@ -43,12 +43,11 @@ class LocationsBuilderARM : public HGraphVisitor { DISALLOW_COPY_AND_ASSIGN(LocationsBuilderARM); }; +class CodeGeneratorARM; + class InstructionCodeGeneratorARM : public HGraphVisitor { public: - explicit InstructionCodeGeneratorARM(HGraph* graph, CodeGenerator* codegen) - : HGraphVisitor(graph), - assembler_(codegen->GetAssembler()), - codegen_(codegen) { } + InstructionCodeGeneratorARM(HGraph* graph, CodeGeneratorARM* codegen); #define DECLARE_VISIT_INSTRUCTION(name) \ virtual void Visit##name(H##name* instr); @@ -57,12 +56,12 @@ class InstructionCodeGeneratorARM : public HGraphVisitor { #undef DECLARE_VISIT_INSTRUCTION - Assembler* GetAssembler() const { return assembler_; } + ArmAssembler* GetAssembler() const { return assembler_; } void LoadCurrentMethod(Register reg); private: - Assembler* const assembler_; - CodeGenerator* const codegen_; + ArmAssembler* const assembler_; + CodeGeneratorARM* const codegen_; DISALLOW_COPY_AND_ASSIGN(InstructionCodeGeneratorARM); }; @@ -75,12 +74,10 @@ class CodeGeneratorARM : public CodeGenerator { instruction_visitor_(graph, this) { } virtual ~CodeGeneratorARM() { } - protected: virtual void GenerateFrameEntry() OVERRIDE; virtual void GenerateFrameExit() OVERRIDE; virtual void Bind(Label* label) OVERRIDE; - virtual void Move(HInstruction* instruction, Location location) OVERRIDE; - virtual void Push(HInstruction* instruction, Location location) OVERRIDE; + virtual void Move(HInstruction* instruction, Location location, HInstruction* move_for) OVERRIDE; virtual HGraphVisitor* GetLocationBuilder() OVERRIDE { return &location_builder_; @@ -90,16 +87,17 @@ class CodeGeneratorARM : public CodeGenerator { return &instruction_visitor_; } - virtual Assembler* GetAssembler() OVERRIDE { + virtual ArmAssembler* GetAssembler() OVERRIDE { return &assembler_; } + int32_t GetStackSlot(HLocal* local) const; + private: LocationsBuilderARM location_builder_; InstructionCodeGeneratorARM instruction_visitor_; ArmAssembler assembler_; - DISALLOW_COPY_AND_ASSIGN(CodeGeneratorARM); }; |