From f29a4244bbc278843237f0ae242de077e093b580 Mon Sep 17 00:00:00 2001 From: Dmitry Petrochenko Date: Mon, 5 May 2014 20:28:47 +0700 Subject: x86_64: Fix frame size calculation for 64-bit Calculate frame size in the same way as calculated in patch "64bit changes to the stack walker for the Quick ABI" Change-Id: I8c2458f5973536a84f3fd6ad56167b5cfafa9ab4 Signed-off-by: Dmitry Petrochenko --- compiler/dex/quick/codegen_util.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'compiler/dex/quick/codegen_util.cc') diff --git a/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc index 396195450a..9f84e098d9 100644 --- a/compiler/dex/quick/codegen_util.cc +++ b/compiler/dex/quick/codegen_util.cc @@ -1050,10 +1050,11 @@ size_t Mir2Lir::GetNumBytesForCompilerTempSpillRegion() { int Mir2Lir::ComputeFrameSize() { /* Figure out the frame size */ static const uint32_t kAlignMask = kStackAlignment - 1; - uint32_t size = ((num_core_spills_ + num_fp_spills_ + - 1 /* filler word */ + cu_->num_regs + cu_->num_outs) - * sizeof(uint32_t)) + - GetNumBytesForCompilerTempSpillRegion(); + uint32_t size = num_core_spills_ * GetBytesPerGprSpillLocation(cu_->instruction_set) + + num_fp_spills_ * GetBytesPerFprSpillLocation(cu_->instruction_set) + + sizeof(uint32_t) // Filler. + + (cu_->num_regs + cu_->num_outs) * sizeof(uint32_t) + + GetNumBytesForCompilerTempSpillRegion(); /* Align and set */ return (size + kAlignMask) & ~(kAlignMask); } -- cgit v1.2.3-59-g8ed1b