From aa9b7c48069699e2aabedc6c0f62cb131fee0c73 Mon Sep 17 00:00:00 2001 From: Roland Levillain Date: Tue, 17 Feb 2015 15:40:09 +0000 Subject: Have the opt. compiler set the size of "empty" frames to zero. This is to mimic Quick's behavior and honor stack frame alignment constraints after changes introduced by Change-Id I0fdb31e8c631e99091b818874a558c9aa04b1628. This issue use to make oatdump crash on oat files produced by the optimized compiler (e.g. out/host/linux-x86/framework/x86_64/core-optimizing.oat). Change-Id: I8ba52601edb0a0993eaf8923eba55aafdce5043e --- compiler/optimizing/code_generator.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'compiler/optimizing/code_generator.h') diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index 6c78f10500..0310877f18 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -238,6 +238,13 @@ class CodeGenerator { void AllocateLocations(HInstruction* instruction); + // Tells whether the stack frame of the compiled method is + // considered "empty", that is either actually having a size of zero, + // or just containing the saved return address register. + bool HasEmptyFrame() const { + return GetFrameSize() == (CallPushesPC() ? GetWordSize() : 0); + } + protected: CodeGenerator(HGraph* graph, size_t number_of_core_registers, @@ -312,10 +319,6 @@ class CodeGenerator { return instruction_set == kX86 || instruction_set == kX86_64; } - bool HasEmptyFrame() const { - return GetFrameSize() == (CallPushesPC() ? GetWordSize() : 0); - } - // Arm64 has its own type for a label, so we need to templatize this method // to share the logic. template -- cgit v1.2.3-59-g8ed1b