summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/RallocUtil.cc
diff options
context:
space:
mode:
author buzbee <buzbee@google.com> 2012-03-11 11:19:28 -0700
committer buzbee <buzbee@google.com> 2012-03-11 11:19:28 -0700
commitefccc565091b3409ed1372615b4ea4e2f6c39323 (patch)
treec0987fb6051a0c4abe2129dc3564c51274fab7e1 /src/compiler/codegen/RallocUtil.cc
parent904667a58fa38437d1be6907beb3fb76d1982e0b (diff)
Frame layout change
This CL slightly changes the frame layout to remove an old unnecessary slot, allow for the inclusion of compiler-generated temps and unifies all variable offset calculation into a single function shared by the compilers and the runtime system. o Update the GetVRegOffset function in stack.cc to understand the new layout. o Remove compiler-private offset calculation code and route everything through the shared GetVRegOffset in thread.cc. o Remove "filler word" that existed immediately after the last Dalvik local. This was there to address an initial concern that I had about a single argument register being reused later as a long. Now convinced that it won't happen. o Extend the old "padding" region to include compiler-created temps that can appear to the rest of the rest of the system as Dalvik registers. The new temps will have Dalvik register numbers of -2 and lower. o Treat Method* for the current method as a special Dalvik register denoted by reg number -1. Change-Id: I5b5f3aef9c6a01d3a647ced6ec06981ed228c785
Diffstat (limited to 'src/compiler/codegen/RallocUtil.cc')
-rw-r--r--src/compiler/codegen/RallocUtil.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/codegen/RallocUtil.cc b/src/compiler/codegen/RallocUtil.cc
index cfda72196c..b5ebf65da0 100644
--- a/src/compiler/codegen/RallocUtil.cc
+++ b/src/compiler/codegen/RallocUtil.cc
@@ -1217,8 +1217,8 @@ extern void oatDoPromotion(CompilationUnit* cUnit)
/* Returns sp-relative offset in bytes for a VReg */
extern int oatVRegOffset(CompilationUnit* cUnit, int vReg)
{
- return (vReg < cUnit->numRegs) ? cUnit->regsOffset + (vReg << 2) :
- cUnit->insOffset + ((vReg - cUnit->numRegs) << 2);
+ return Frame::GetVRegOffset(cUnit->code_item, cUnit->coreSpillMask,
+ cUnit->fpSpillMask, cUnit->frameSize, vReg);
}
/* Returns sp-relative offset in bytes for a SReg */