• Home
  • Raw
  • Download

Lines Matching refs:cUnit

46 extern void dvmCompilerResetRegPool(CompilationUnit *cUnit)  in dvmCompilerResetRegPool()  argument
49 for (i=0; i < cUnit->regPool->numCoreTemps; i++) { in dvmCompilerResetRegPool()
50 cUnit->regPool->coreTemps[i].inUse = false; in dvmCompilerResetRegPool()
52 for (i=0; i < cUnit->regPool->numFPTemps; i++) { in dvmCompilerResetRegPool()
53 cUnit->regPool->FPTemps[i].inUse = false; in dvmCompilerResetRegPool()
83 static RegisterInfo *getRegInfo(CompilationUnit *cUnit, int reg) in getRegInfo() argument
85 int numTemps = cUnit->regPool->numCoreTemps; in getRegInfo()
86 RegisterInfo *p = cUnit->regPool->coreTemps; in getRegInfo()
93 p = cUnit->regPool->FPTemps; in getRegInfo()
94 numTemps = cUnit->regPool->numFPTemps; in getRegInfo()
101 dvmCompilerAbort(cUnit); in getRegInfo()
105 void dvmCompilerFlushRegWide(CompilationUnit *cUnit, int reg1, int reg2) in dvmCompilerFlushRegWide() argument
107 RegisterInfo *info1 = getRegInfo(cUnit, reg1); in dvmCompilerFlushRegWide()
108 RegisterInfo *info2 = getRegInfo(cUnit, reg2); in dvmCompilerFlushRegWide()
115 if (dvmCompilerS2VReg(cUnit, info2->sReg) < in dvmCompilerFlushRegWide()
116 dvmCompilerS2VReg(cUnit, info1->sReg)) in dvmCompilerFlushRegWide()
118 dvmCompilerFlushRegWideImpl(cUnit, rFP, in dvmCompilerFlushRegWide()
119 dvmCompilerS2VReg(cUnit, info1->sReg) << 2, in dvmCompilerFlushRegWide()
124 void dvmCompilerFlushReg(CompilationUnit *cUnit, int reg) in dvmCompilerFlushReg() argument
126 RegisterInfo *info = getRegInfo(cUnit, reg); in dvmCompilerFlushReg()
129 dvmCompilerFlushRegImpl(cUnit, rFP, in dvmCompilerFlushReg()
130 dvmCompilerS2VReg(cUnit, info->sReg) << 2, in dvmCompilerFlushReg()
136 static bool clobberRegBody(CompilationUnit *cUnit, RegisterInfo *p, in clobberRegBody() argument
144 dvmCompilerFlushRegWide(cUnit, p[i].reg, p[i].partner); in clobberRegBody()
146 dvmCompilerFlushReg(cUnit, p[i].reg); in clobberRegBody()
156 clobberRegBody(cUnit, p, numTemps, p[i].partner); in clobberRegBody()
165 void dvmCompilerClobber(CompilationUnit *cUnit, int reg) in dvmCompilerClobber() argument
167 if (!clobberRegBody(cUnit, cUnit->regPool->coreTemps, in dvmCompilerClobber()
168 cUnit->regPool->numCoreTemps, reg)) { in dvmCompilerClobber()
169 clobberRegBody(cUnit, cUnit->regPool->FPTemps, in dvmCompilerClobber()
170 cUnit->regPool->numFPTemps, reg); in dvmCompilerClobber()
187 extern void dvmCompilerClobberSReg(CompilationUnit *cUnit, int sReg) in dvmCompilerClobberSReg() argument
189 clobberSRegBody(cUnit->regPool->coreTemps, cUnit->regPool->numCoreTemps, in dvmCompilerClobberSReg()
191 clobberSRegBody(cUnit->regPool->FPTemps, cUnit->regPool->numFPTemps, in dvmCompilerClobberSReg()
195 static int allocTempBody(CompilationUnit *cUnit, RegisterInfo *p, int numTemps, in allocTempBody() argument
204 dvmCompilerClobber(cUnit, p[next].reg); in allocTempBody()
217 dvmCompilerClobber(cUnit, p[next].reg); in allocTempBody()
227 dvmCompilerAbort(cUnit); in allocTempBody()
233 extern int dvmCompilerAllocTempDouble(CompilationUnit *cUnit) in dvmCompilerAllocTempDouble() argument
235 RegisterInfo *p = cUnit->regPool->FPTemps; in dvmCompilerAllocTempDouble()
236 int numTemps = cUnit->regPool->numFPTemps; in dvmCompilerAllocTempDouble()
237 int next = cUnit->regPool->nextFPTemp; in dvmCompilerAllocTempDouble()
248 dvmCompilerClobber(cUnit, p[next].reg); in dvmCompilerAllocTempDouble()
249 dvmCompilerClobber(cUnit, p[next+1].reg); in dvmCompilerAllocTempDouble()
254 cUnit->regPool->nextFPTemp += 2; in dvmCompilerAllocTempDouble()
259 next = cUnit->regPool->nextFPTemp; in dvmCompilerAllocTempDouble()
264 dvmCompilerClobber(cUnit, p[next].reg); in dvmCompilerAllocTempDouble()
265 dvmCompilerClobber(cUnit, p[next+1].reg); in dvmCompilerAllocTempDouble()
270 cUnit->regPool->nextFPTemp += 2; in dvmCompilerAllocTempDouble()
276 dvmCompilerAbort(cUnit); in dvmCompilerAllocTempDouble()
281 extern int dvmCompilerAllocFreeTemp(CompilationUnit *cUnit) in dvmCompilerAllocFreeTemp() argument
283 return allocTempBody(cUnit, cUnit->regPool->coreTemps, in dvmCompilerAllocFreeTemp()
284 cUnit->regPool->numCoreTemps, in dvmCompilerAllocFreeTemp()
285 &cUnit->regPool->nextCoreTemp, true); in dvmCompilerAllocFreeTemp()
288 extern int dvmCompilerAllocTemp(CompilationUnit *cUnit) in dvmCompilerAllocTemp() argument
290 return allocTempBody(cUnit, cUnit->regPool->coreTemps, in dvmCompilerAllocTemp()
291 cUnit->regPool->numCoreTemps, in dvmCompilerAllocTemp()
292 &cUnit->regPool->nextCoreTemp, true); in dvmCompilerAllocTemp()
295 extern int dvmCompilerAllocTempFloat(CompilationUnit *cUnit) in dvmCompilerAllocTempFloat() argument
297 return allocTempBody(cUnit, cUnit->regPool->FPTemps, in dvmCompilerAllocTempFloat()
298 cUnit->regPool->numFPTemps, in dvmCompilerAllocTempFloat()
299 &cUnit->regPool->nextFPTemp, true); in dvmCompilerAllocTempFloat()
316 static RegisterInfo *allocLive(CompilationUnit *cUnit, int sReg, in allocLive() argument
322 res = allocLiveBody(cUnit->regPool->FPTemps, in allocLive()
323 cUnit->regPool->numFPTemps, sReg); in allocLive()
328 res = allocLiveBody(cUnit->regPool->coreTemps, in allocLive()
329 cUnit->regPool->numCoreTemps, sReg); in allocLive()
332 res = allocLiveBody(cUnit->regPool->FPTemps, in allocLive()
333 cUnit->regPool->numFPTemps, sReg); in allocLive()
337 dvmCompilerAbort(cUnit); in allocLive()
342 extern void dvmCompilerFreeTemp(CompilationUnit *cUnit, int reg) in dvmCompilerFreeTemp() argument
344 RegisterInfo *p = cUnit->regPool->coreTemps; in dvmCompilerFreeTemp()
345 int numTemps = cUnit->regPool->numCoreTemps; in dvmCompilerFreeTemp()
354 p = cUnit->regPool->FPTemps; in dvmCompilerFreeTemp()
355 numTemps = cUnit->regPool->numFPTemps; in dvmCompilerFreeTemp()
364 dvmCompilerAbort(cUnit); in dvmCompilerFreeTemp()
367 extern RegisterInfo *dvmCompilerIsLive(CompilationUnit *cUnit, int reg) in dvmCompilerIsLive() argument
369 RegisterInfo *p = cUnit->regPool->coreTemps; in dvmCompilerIsLive()
370 int numTemps = cUnit->regPool->numCoreTemps; in dvmCompilerIsLive()
377 p = cUnit->regPool->FPTemps; in dvmCompilerIsLive()
378 numTemps = cUnit->regPool->numFPTemps; in dvmCompilerIsLive()
387 extern RegisterInfo *dvmCompilerIsTemp(CompilationUnit *cUnit, int reg) in dvmCompilerIsTemp() argument
389 RegisterInfo *p = cUnit->regPool->coreTemps; in dvmCompilerIsTemp()
390 int numTemps = cUnit->regPool->numCoreTemps; in dvmCompilerIsTemp()
397 p = cUnit->regPool->FPTemps; in dvmCompilerIsTemp()
398 numTemps = cUnit->regPool->numFPTemps; in dvmCompilerIsTemp()
412 extern void dvmCompilerLockTemp(CompilationUnit *cUnit, int reg) in dvmCompilerLockTemp() argument
414 RegisterInfo *p = cUnit->regPool->coreTemps; in dvmCompilerLockTemp()
415 int numTemps = cUnit->regPool->numCoreTemps; in dvmCompilerLockTemp()
424 p = cUnit->regPool->FPTemps; in dvmCompilerLockTemp()
425 numTemps = cUnit->regPool->numFPTemps; in dvmCompilerLockTemp()
434 dvmCompilerAbort(cUnit); in dvmCompilerLockTemp()
437 extern void dvmCompilerResetDef(CompilationUnit *cUnit, int reg) in dvmCompilerResetDef() argument
439 RegisterInfo *p = getRegInfo(cUnit, reg); in dvmCompilerResetDef()
444 static void nullifyRange(CompilationUnit *cUnit, LIR *start, LIR *finish, in nullifyRange() argument
463 extern void dvmCompilerMarkDef(CompilationUnit *cUnit, RegLocation rl, in dvmCompilerMarkDef() argument
469 RegisterInfo *p = getRegInfo(cUnit, rl.lowReg); in dvmCompilerMarkDef()
479 extern void dvmCompilerMarkDefWide(CompilationUnit *cUnit, RegLocation rl, in dvmCompilerMarkDefWide() argument
485 RegisterInfo *p = getRegInfo(cUnit, rl.lowReg); in dvmCompilerMarkDefWide()
486 dvmCompilerResetDef(cUnit, rl.highReg); // Only track low of pair in dvmCompilerMarkDefWide()
491 extern RegLocation dvmCompilerWideToNarrow(CompilationUnit *cUnit, in dvmCompilerWideToNarrow() argument
496 RegisterInfo *infoLo = getRegInfo(cUnit, rl.lowReg); in dvmCompilerWideToNarrow()
497 RegisterInfo *infoHi = getRegInfo(cUnit, rl.highReg); in dvmCompilerWideToNarrow()
499 dumpRegPool(cUnit->regPool->coreTemps, in dvmCompilerWideToNarrow()
500 cUnit->regPool->numCoreTemps); in dvmCompilerWideToNarrow()
504 dumpRegPool(cUnit->regPool->coreTemps, in dvmCompilerWideToNarrow()
505 cUnit->regPool->numCoreTemps); in dvmCompilerWideToNarrow()
523 extern void dvmCompilerResetDefLoc(CompilationUnit *cUnit, RegLocation rl) in dvmCompilerResetDefLoc() argument
527 RegisterInfo *p = getRegInfo(cUnit, rl.lowReg); in dvmCompilerResetDefLoc()
529 nullifyRange(cUnit, p->defStart, p->defEnd, in dvmCompilerResetDefLoc()
532 dvmCompilerResetDef(cUnit, rl.lowReg); in dvmCompilerResetDefLoc()
535 extern void dvmCompilerResetDefLocWide(CompilationUnit *cUnit, RegLocation rl) in dvmCompilerResetDefLocWide() argument
539 RegisterInfo *p = getRegInfo(cUnit, rl.lowReg); in dvmCompilerResetDefLocWide()
541 nullifyRange(cUnit, p->defStart, p->defEnd, in dvmCompilerResetDefLocWide()
544 dvmCompilerResetDef(cUnit, rl.lowReg); in dvmCompilerResetDefLocWide()
545 dvmCompilerResetDef(cUnit, rl.highReg); in dvmCompilerResetDefLocWide()
548 extern void dvmCompilerResetDefTracking(CompilationUnit *cUnit) in dvmCompilerResetDefTracking() argument
551 for (i=0; i< cUnit->regPool->numCoreTemps; i++) { in dvmCompilerResetDefTracking()
552 dvmCompilerResetDef(cUnit, cUnit->regPool->coreTemps[i].reg); in dvmCompilerResetDefTracking()
554 for (i=0; i< cUnit->regPool->numFPTemps; i++) { in dvmCompilerResetDefTracking()
555 dvmCompilerResetDef(cUnit, cUnit->regPool->FPTemps[i].reg); in dvmCompilerResetDefTracking()
559 extern void dvmCompilerClobberAllRegs(CompilationUnit *cUnit) in dvmCompilerClobberAllRegs() argument
562 for (i=0; i< cUnit->regPool->numCoreTemps; i++) { in dvmCompilerClobberAllRegs()
563 dvmCompilerClobber(cUnit, cUnit->regPool->coreTemps[i].reg); in dvmCompilerClobberAllRegs()
565 for (i=0; i< cUnit->regPool->numFPTemps; i++) { in dvmCompilerClobberAllRegs()
566 dvmCompilerClobber(cUnit, cUnit->regPool->FPTemps[i].reg); in dvmCompilerClobberAllRegs()
571 extern void dvmCompilerLockAllTemps(CompilationUnit *cUnit) in dvmCompilerLockAllTemps() argument
574 for (i=0; i< cUnit->regPool->numCoreTemps; i++) { in dvmCompilerLockAllTemps()
575 dvmCompilerLockTemp(cUnit, cUnit->regPool->coreTemps[i].reg); in dvmCompilerLockAllTemps()
580 static void flushAllRegsBody(CompilationUnit *cUnit, RegisterInfo *info, in flushAllRegsBody() argument
587 dvmCompilerFlushRegWide(cUnit, info[i].reg, info[i].partner); in flushAllRegsBody()
589 dvmCompilerFlushReg(cUnit, info[i].reg); in flushAllRegsBody()
595 extern void dvmCompilerFlushAllRegs(CompilationUnit *cUnit) in dvmCompilerFlushAllRegs() argument
597 flushAllRegsBody(cUnit, cUnit->regPool->coreTemps, in dvmCompilerFlushAllRegs()
598 cUnit->regPool->numCoreTemps); in dvmCompilerFlushAllRegs()
599 flushAllRegsBody(cUnit, cUnit->regPool->FPTemps, in dvmCompilerFlushAllRegs()
600 cUnit->regPool->numFPTemps); in dvmCompilerFlushAllRegs()
601 dvmCompilerClobberAllRegs(cUnit); in dvmCompilerFlushAllRegs()
617 extern void dvmCompilerMarkLive(CompilationUnit *cUnit, int reg, int sReg) in dvmCompilerMarkLive() argument
619 RegisterInfo *info = getRegInfo(cUnit, reg); in dvmCompilerMarkLive()
623 dvmCompilerClobberSReg(cUnit, sReg); in dvmCompilerMarkLive()
632 extern void dvmCompilerMarkPair(CompilationUnit *cUnit, int lowReg, int highReg) in dvmCompilerMarkPair() argument
634 RegisterInfo *infoLo = getRegInfo(cUnit, lowReg); in dvmCompilerMarkPair()
635 RegisterInfo *infoHi = getRegInfo(cUnit, highReg); in dvmCompilerMarkPair()
641 extern void dvmCompilerMarkClean(CompilationUnit *cUnit, int reg) in dvmCompilerMarkClean() argument
643 RegisterInfo *info = getRegInfo(cUnit, reg); in dvmCompilerMarkClean()
647 extern void dvmCompilerMarkDirty(CompilationUnit *cUnit, int reg) in dvmCompilerMarkDirty() argument
649 RegisterInfo *info = getRegInfo(cUnit, reg); in dvmCompilerMarkDirty()
653 extern void dvmCompilerMarkInUse(CompilationUnit *cUnit, int reg) in dvmCompilerMarkInUse() argument
655 RegisterInfo *info = getRegInfo(cUnit, reg); in dvmCompilerMarkInUse()
659 static void copyRegInfo(CompilationUnit *cUnit, int newReg, int oldReg) in copyRegInfo() argument
661 RegisterInfo *newInfo = getRegInfo(cUnit, newReg); in copyRegInfo()
662 RegisterInfo *oldInfo = getRegInfo(cUnit, oldReg); in copyRegInfo()
676 extern RegLocation dvmCompilerUpdateLoc(CompilationUnit *cUnit, RegLocation loc) in dvmCompilerUpdateLoc() argument
680 RegisterInfo *infoLo = allocLive(cUnit, loc.sRegLow, kAnyReg); in dvmCompilerUpdateLoc()
683 dvmCompilerClobber(cUnit, infoLo->reg); in dvmCompilerUpdateLoc()
684 dvmCompilerClobber(cUnit, infoLo->partner); in dvmCompilerUpdateLoc()
696 extern RegLocation dvmCompilerUpdateLocWide(CompilationUnit *cUnit, in dvmCompilerUpdateLocWide() argument
702 RegisterInfo *infoLo = allocLive(cUnit, loc.sRegLow, kAnyReg); in dvmCompilerUpdateLocWide()
703 RegisterInfo *infoHi = allocLive(cUnit, in dvmCompilerUpdateLocWide()
726 dvmCompilerMarkPair(cUnit, loc.lowReg, loc.highReg); in dvmCompilerUpdateLocWide()
732 dvmCompilerClobber(cUnit, infoLo->reg); in dvmCompilerUpdateLocWide()
734 dvmCompilerClobber(cUnit, infoLo->partner); in dvmCompilerUpdateLocWide()
737 dvmCompilerClobber(cUnit, infoHi->reg); in dvmCompilerUpdateLocWide()
739 dvmCompilerClobber(cUnit, infoHi->partner); in dvmCompilerUpdateLocWide()
746 static RegLocation evalLocWide(CompilationUnit *cUnit, RegLocation loc, in evalLocWide() argument
754 loc = dvmCompilerUpdateLocWide(cUnit, loc); in evalLocWide()
762 newRegs = dvmCompilerAllocTypedTempPair(cUnit, loc.fp, regClass); in evalLocWide()
765 dvmCompilerRegCopyWide(cUnit, lowReg, highReg, loc.lowReg, in evalLocWide()
767 copyRegInfo(cUnit, lowReg, loc.lowReg); in evalLocWide()
768 copyRegInfo(cUnit, highReg, loc.highReg); in evalLocWide()
769 dvmCompilerClobber(cUnit, loc.lowReg); in evalLocWide()
770 dvmCompilerClobber(cUnit, loc.highReg); in evalLocWide()
773 dvmCompilerMarkPair(cUnit, loc.lowReg, loc.highReg); in evalLocWide()
783 newRegs = dvmCompilerAllocTypedTempPair(cUnit, loc.fp, regClass); in evalLocWide()
787 dvmCompilerMarkPair(cUnit, loc.lowReg, loc.highReg); in evalLocWide()
790 dvmCompilerMarkLive(cUnit, loc.lowReg, loc.sRegLow); in evalLocWide()
791 dvmCompilerMarkLive(cUnit, loc.highReg, dvmCompilerSRegHi(loc.sRegLow)); in evalLocWide()
797 extern RegLocation dvmCompilerEvalLoc(CompilationUnit *cUnit, RegLocation loc, in dvmCompilerEvalLoc() argument
802 return evalLocWide(cUnit, loc, regClass, update); in dvmCompilerEvalLoc()
803 loc = dvmCompilerUpdateLoc(cUnit, loc); in dvmCompilerEvalLoc()
808 newReg = dvmCompilerAllocTypedTemp(cUnit, loc.fp, regClass); in dvmCompilerEvalLoc()
809 dvmCompilerRegCopy(cUnit, newReg, loc.lowReg); in dvmCompilerEvalLoc()
810 copyRegInfo(cUnit, newReg, loc.lowReg); in dvmCompilerEvalLoc()
811 dvmCompilerClobber(cUnit, loc.lowReg); in dvmCompilerEvalLoc()
819 newReg = dvmCompilerAllocTypedTemp(cUnit, loc.fp, regClass); in dvmCompilerEvalLoc()
824 dvmCompilerMarkLive(cUnit, loc.lowReg, loc.sRegLow); in dvmCompilerEvalLoc()
836 extern RegLocation dvmCompilerGetSrc(CompilationUnit *cUnit, MIR *mir, int num) in dvmCompilerGetSrc() argument
838 RegLocation loc = cUnit->regLocation[ in dvmCompilerGetSrc()
839 SREG(cUnit, dvmCompilerSSASrc(mir, num))]; in dvmCompilerGetSrc()
840 loc.fp = cUnit->regLocation[dvmCompilerSSASrc(mir, num)].fp; in dvmCompilerGetSrc()
846 extern RegLocation dvmCompilerGetDest(CompilationUnit *cUnit, MIR *mir, in dvmCompilerGetDest() argument
849 RegLocation loc = cUnit->regLocation[SREG(cUnit, getDestSSAName(mir, num))]; in dvmCompilerGetDest()
850 loc.fp = cUnit->regLocation[getDestSSAName(mir, num)].fp; in dvmCompilerGetDest()
855 static RegLocation getLocWide(CompilationUnit *cUnit, MIR *mir, in getLocWide() argument
862 lowLoc = dvmCompilerGetSrc(cUnit, mir, low); in getLocWide()
863 highLoc = dvmCompilerGetSrc(cUnit, mir, high); in getLocWide()
865 lowLoc = dvmCompilerGetDest(cUnit, mir, low); in getLocWide()
866 highLoc = dvmCompilerGetDest(cUnit, mir, high); in getLocWide()
879 extern RegLocation dvmCompilerGetDestWide(CompilationUnit *cUnit, MIR *mir, in dvmCompilerGetDestWide() argument
882 return getLocWide(cUnit, mir, low, high, false); in dvmCompilerGetDestWide()
885 extern RegLocation dvmCompilerGetSrcWide(CompilationUnit *cUnit, MIR *mir, in dvmCompilerGetSrcWide() argument
888 return getLocWide(cUnit, mir, low, high, true); in dvmCompilerGetSrcWide()
892 extern void dvmCompilerKillNullCheckedLoc(CompilationUnit *cUnit, in dvmCompilerKillNullCheckedLoc() argument
897 dvmClearBit(cUnit->regPool->nullCheckedRegs, loc.sRegLow); in dvmCompilerKillNullCheckedLoc()
900 dvmClearBit(cUnit->regPool->nullCheckedRegs, in dvmCompilerKillNullCheckedLoc()