From ad8f15e0b13383b2eaa2486b230debeae7a55661 Mon Sep 17 00:00:00 2001 From: buzbee Date: Mon, 18 Jun 2012 14:49:45 -0700 Subject: Milestone: close Quick side channel communication This CL elminates side-channel communication between the Quick Compiler's Dex->MIR->LLVM-IR and LLVM-IR->LIR lowering stages by clearing key data structures between the two stages. The purpose if to flush out any hidden information transfer, and thus ensure that the GreenlandIR representation of the program is sufficient. Note that as of this change, we've lost all register promotion info so the Quick compiler will generate non-promoted code. A near-future CL will restore that info from the MethodInfo intrinsic. Change-Id: I797845f1fc029bc03aac3ec20f8cd81f917817ca --- src/compiler/codegen/GenInvoke.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/compiler/codegen/GenInvoke.cc') diff --git a/src/compiler/codegen/GenInvoke.cc b/src/compiler/codegen/GenInvoke.cc index bcc9067fd7..7c2cf1cba3 100644 --- a/src/compiler/codegen/GenInvoke.cc +++ b/src/compiler/codegen/GenInvoke.cc @@ -33,16 +33,18 @@ LIR* opCondBranch(CompilationUnit* cUnit, ConditionCode cc, LIR* target); * If there are any ins passed in registers that have not been promoted * to a callee-save register, flush them to the frame. Perform intial * assignment of promoted arguments. + * + * argLocs is an array of location records describing the incoming arguments + * with one location record per word of argument. */ -void flushIns(CompilationUnit* cUnit) +void flushIns(CompilationUnit* cUnit, RegLocation* argLocs, RegLocation rlMethod) { /* * Dummy up a RegLocation for the incoming Method* * It will attempt to keep rARG0 live (or copy it to home location * if promoted). */ - RegLocation rlSrc = cUnit->regLocation[cUnit->methodSReg]; - RegLocation rlMethod = cUnit->regLocation[cUnit->methodSReg]; + RegLocation rlSrc = rlMethod; rlSrc.location = kLocPhysReg; rlSrc.lowReg = rARG0; rlSrc.home = false; @@ -75,7 +77,7 @@ void flushIns(CompilationUnit* cUnit) if (i < numArgRegs) { // If arriving in register bool needFlush = true; - RegLocation* tLoc = &cUnit->regLocation[startVReg + i]; + RegLocation* tLoc = &argLocs[i]; if ((vMap->coreLocation == kLocPhysReg) && !tLoc->fp) { opRegCopy(cUnit, vMap->coreReg, argRegs[i]); needFlush = false; -- cgit v1.2.3-59-g8ed1b