Lines Matching defs:cUnit

40 static void genMethodInflateAndPunt(CompilationUnit *cUnit, MIR *mir,
58 dvmCompilerFlushAllRegs(cUnit);
61 opRegRegImm(cUnit, kOpAdd, oldStackSave, r5FP,
62 cUnit->method->registersSize * 4);
64 opRegRegImm(cUnit, kOpAdd, oldFP, oldStackSave, sizeof(StackSaveArea));
66 opRegRegImm(cUnit, kOpSub, newStackSave, r5FP, sizeof(StackSaveArea));
68 loadWordDisp(cUnit, r13sp, 0, savedPC);
69 loadConstant(cUnit, currentPC, (int) (cUnit->method->insns + mir->offset));
70 loadConstant(cUnit, method, (int) cUnit->method);
71 loadConstant(cUnit, pDvmDex, (int) cUnit->method->clazz->pDvmDex);
74 storeWordDisp(cUnit, newStackSave, offsetof(StackSaveArea, prevSave),
78 storeWordDisp(cUnit, newStackSave, offsetof(StackSaveArea, prevFrame),
81 storeWordDisp(cUnit, newStackSave, offsetof(StackSaveArea, savedPc),
84 loadConstant(cUnit, returnAddr, 0);
85 storeWordDisp(cUnit, newStackSave, offsetof(StackSaveArea, returnAddr),
88 storeWordDisp(cUnit, newStackSave, offsetof(StackSaveArea, method), method);
90 storeWordDisp(cUnit, r6SELF, offsetof(InterpSaveState, method), method);
92 storeWordDisp(cUnit, r6SELF, offsetof(Thread, interpSave.curFrame), r5FP);
94 storeWordDisp(cUnit, r6SELF, offsetof(InterpSaveState, methodClassDex),
97 opRegImm(cUnit, kOpAdd, r13sp, 16);
98 genPuntToInterp(cUnit, mir->offset);
108 static bool handleMethodFmt10t_Fmt20t_Fmt30t(CompilationUnit *cUnit, MIR *mir,
115 genSuspendPoll(cUnit, mir);
119 genUnconditionalBranch(cUnit, &labelList[bb->taken->id]);
123 static bool handleMethodFmt10x(CompilationUnit *cUnit, MIR *mir)
130 return handleFmt10x(cUnit, mir);
134 static bool handleMethodFmt11n_Fmt31i(CompilationUnit *cUnit, MIR *mir)
136 return handleFmt11n_Fmt31i(cUnit, mir);
139 static bool handleMethodFmt11x(CompilationUnit *cUnit, MIR *mir, BasicBlock *bb,
145 genMethodInflateAndPunt(cUnit, mir, bb);
148 return handleFmt11x(cUnit, mir);
152 static bool handleMethodFmt12x(CompilationUnit *cUnit, MIR *mir)
154 return handleFmt12x(cUnit, mir);
157 static bool handleMethodFmt20bc(CompilationUnit *cUnit, MIR *mir)
159 return handleFmt20bc(cUnit, mir);
162 static bool handleMethodFmt21c_Fmt31c(CompilationUnit *cUnit, MIR *mir)
164 return handleFmt21c_Fmt31c(cUnit, mir);
167 static bool handleMethodFmt21h(CompilationUnit *cUnit, MIR *mir)
169 return handleFmt21h(cUnit, mir);
172 static bool handleMethodFmt21s(CompilationUnit *cUnit, MIR *mir)
174 return handleFmt21s(cUnit, mir);
177 static bool handleMethodFmt21t(CompilationUnit *cUnit, MIR *mir, BasicBlock *bb,
180 return handleFmt21t(cUnit, mir, bb, labelList);
183 static bool handleMethodFmt22b_Fmt22s(CompilationUnit *cUnit, MIR *mir)
185 return handleFmt22b_Fmt22s(cUnit, mir);
188 static bool handleMethodFmt22c(CompilationUnit *cUnit, MIR *mir)
190 return handleFmt22c(cUnit, mir);
193 static bool handleMethodFmt22cs(CompilationUnit *cUnit, MIR *mir)
195 return handleFmt22cs(cUnit, mir);
198 static bool handleMethodFmt22t(CompilationUnit *cUnit, MIR *mir, BasicBlock *bb,
201 return handleFmt22t(cUnit, mir, bb, labelList);
204 static bool handleMethodFmt22x_Fmt32x(CompilationUnit *cUnit, MIR *mir)
206 return handleFmt22x_Fmt32x(cUnit, mir);
209 static bool handleMethodFmt23x(CompilationUnit *cUnit, MIR *mir)
211 return handleFmt23x(cUnit, mir);
214 static bool handleMethodFmt31t(CompilationUnit *cUnit, MIR *mir)
216 return handleFmt31t(cUnit, mir);
219 static bool handleMethodFmt35c_3rc(CompilationUnit *cUnit, MIR *mir,
222 return handleFmt35c_3rc(cUnit, mir, bb, labelList);
225 static bool handleMethodFmt35ms_3rms(CompilationUnit *cUnit, MIR *mir,
228 return handleFmt35ms_3rms(cUnit, mir, bb, labelList);
231 static bool handleMethodExecuteInline(CompilationUnit *cUnit, MIR *mir)
233 return handleExecuteInline(cUnit, mir);
236 static bool handleMethodFmt51l(CompilationUnit *cUnit, MIR *mir)
238 return handleFmt51l(cUnit, mir);
242 static bool methodBlockCodeGen(CompilationUnit *cUnit, BasicBlock *bb)
245 ArmLIR *labelList = (ArmLIR *) cUnit->blockLabelList;
248 cUnit->curBlock = bb;
253 dvmCompilerAppendLIR(cUnit, (LIR *) &labelList[blockId]);
255 dvmCompilerClobberAllRegs(cUnit);
256 dvmCompilerResetNullCheck(cUnit);
262 opImm(cUnit, kOpPush, (1 << r0 | 1 << r1 | 1 << r5FP | 1 << r14lr));
263 opRegImm(cUnit, kOpSub, r5FP,
264 sizeof(StackSaveArea) + cUnit->method->registersSize * 4);
268 opRegImm(cUnit, kOpAdd, r13sp, 8);
269 opImm(cUnit, kOpPop, (1 << r5FP | 1 << r15pc));
274 dvmCompilerResetRegPool(cUnit);
276 dvmCompilerClobberAllRegs(cUnit);
280 dvmCompilerResetDefTracking(cUnit);
293 if (headLIR == NULL || cUnit->printMe == true) {
295 newLIR2(cUnit, kArmPseudoDalvikByteCodeBoundary,
308 if (cUnit->printMe && mir->ssaRep) {
309 char *ssaString = dvmCompilerGetSSAString(cUnit, mir->ssaRep);
310 newLIR1(cUnit, kArmPseudoSSARep, (int) ssaString);
318 notHandled = handleMethodFmt10t_Fmt20t_Fmt30t(cUnit, mir, bb,
322 notHandled = handleMethodFmt10x(cUnit, mir);
326 notHandled = handleMethodFmt11n_Fmt31i(cUnit, mir);
329 notHandled = handleMethodFmt11x(cUnit, mir, bb, labelList);
332 notHandled = handleMethodFmt12x(cUnit, mir);
335 notHandled = handleMethodFmt20bc(cUnit, mir);
339 notHandled = handleMethodFmt21c_Fmt31c(cUnit, mir);
342 notHandled = handleMethodFmt21h(cUnit, mir);
345 notHandled = handleMethodFmt21s(cUnit, mir);
348 notHandled = handleMethodFmt21t(cUnit, mir, bb, labelList);
352 notHandled = handleMethodFmt22b_Fmt22s(cUnit, mir);
355 notHandled = handleMethodFmt22c(cUnit, mir);
358 notHandled = handleMethodFmt22cs(cUnit, mir);
361 notHandled = handleMethodFmt22t(cUnit, mir, bb, labelList);
365 notHandled = handleMethodFmt22x_Fmt32x(cUnit, mir);
368 notHandled = handleMethodFmt23x(cUnit, mir);
371 notHandled = handleMethodFmt31t(cUnit, mir);
375 notHandled = handleMethodFmt35c_3rc(cUnit, mir, bb, labelList);
379 notHandled = handleMethodFmt35ms_3rms(cUnit, mir, bb,
384 notHandled = handleMethodExecuteInline(cUnit, mir);
387 notHandled = handleMethodFmt51l(cUnit, mir);
404 dvmCompilerAbort(cUnit);
414 dvmCompilerApplyLocalOptimizations(cUnit, (LIR *) headLIR,
415 cUnit->lastLIRInsn);
421 genUnconditionalBranch(cUnit,
428 void dvmCompilerMethodMIR2LIR(CompilationUnit *cUnit)
431 if (strcmp(cUnit->method->name, "add")) return;
434 cUnit->blockLabelList =
435 (void *) dvmCompilerNew(sizeof(ArmLIR) * cUnit->numBlocks, true);
437 dvmCompilerDataFlowAnalysisDispatcher(cUnit, methodBlockCodeGen,
441 dvmCompilerApplyGlobalOptimizations(cUnit);
444 cUnit->printMe = true;
447 selfVerificationBranchInsertPass(cUnit);
453 void dvmCompilerMethodMIR2LIR(CompilationUnit *cUnit) {