Lines Matching full:cunit
910 static void installLiteralPools(CompilationUnit *cUnit)
912 int *dataPtr = (int *) ((char *) cUnit->baseAddr + cUnit->dataOffset);
914 *dataPtr++ = cUnit->numClassPointers;
915 ArmLIR *dataLIR = (ArmLIR *) cUnit->classPointerList;
924 dataLIR = (ArmLIR *) cUnit->literalList;
937 static AssemblerStatus assembleInstructions(CompilationUnit *cUnit,
940 short *bufferAddr = (short *) cUnit->codeBuffer;
943 for (lir = (ArmLIR *) cUnit->firstLIRInsn; lir; lir = NEXT_LIR(lir)) {
968 dvmCompilerAbort(cUnit);
971 if (cUnit->printMe) {
974 dvmCompilerCodegenDump(cUnit);
978 if (cUnit->printMe) {
981 dvmCompilerCodegenDump(cUnit);
1014 if (cUnit->printMe) {
1017 dvmCompilerCodegenDump(cUnit);
1030 if (cUnit->printMe) {
1033 dvmCompilerCodegenDump(cUnit);
1045 dvmCompilerAbort(cUnit);
1187 static int assignLiteralOffset(CompilationUnit *cUnit, int offset)
1191 offset = assignLiteralOffsetCommon(cUnit->classPointerList, offset);
1192 offset = assignLiteralOffsetCommon(cUnit->literalList, offset);
1330 static void matchSignatureBreakpoint(const CompilationUnit *cUnit,
1334 u4 *ptr = (u4 *) cUnit->codeBuffer;
1346 int descSize = getTraceDescriptionSize(cUnit->traceDesc);
1349 memcpy(newCopy, cUnit->traceDesc, descSize);
1363 void dvmCompilerAssembleLIR(CompilationUnit *cUnit, JitTranslationInfo *info)
1369 int descSize = (cUnit->jitMode == kJitMethod) ?
1370 0 : getTraceDescriptionSize(cUnit->traceDesc);
1373 info->instructionSet = cUnit->instructionSet;
1376 for (armLIR = (ArmLIR *) cUnit->firstLIRInsn;
1400 if (cUnit->jitMode != kJitMethod) {
1406 chainingCellGap = (offset - cUnit->chainingCellBottom->offset) >> 2;
1409 chainCellOffsetLIR = (ArmLIR *) cUnit->chainCellOffsetLIR;
1427 cUnit->dataOffset = offset;
1433 offset = assignLiteralOffset(cUnit, offset);
1435 cUnit->totalSize = offset;
1437 if (gDvmJit.codeCacheByteUsed + cUnit->totalSize > gDvmJit.codeCacheSize) {
1444 cUnit->codeBuffer = (unsigned char *)dvmCompilerNew(chainCellOffset, true);
1445 if (cUnit->codeBuffer == NULL) {
1455 cUnit->assemblerStatus = assembleInstructions(cUnit,
1458 switch(cUnit->assemblerStatus) {
1462 if (cUnit->assemblerRetries < MAX_ASSEMBLER_RETRIES) {
1463 if (cUnit->jitMode != kJitMethod) {
1470 cUnit->assemblerRetries = 0;
1471 cUnit->assemblerStatus = kRetryHalve;
1476 ALOGE("Unexpected assembler status: %d", cUnit->assemblerStatus);
1483 matchSignatureBreakpoint(cUnit, chainCellOffset/4);
1506 cUnit->baseAddr = (char *) gDvmJit.codeCache + gDvmJit.codeCacheByteUsed;
1509 UNPROTECT_CODE_CACHE(cUnit->baseAddr, offset);
1512 memcpy((char*)cUnit->baseAddr, cUnit->codeBuffer, chainCellOffset);
1515 if (cUnit->jitMode != kJitMethod) {
1518 chainCellCounts.u.count[i] = cUnit->numChainingCells[i];
1524 memcpy((char*)cUnit->baseAddr + chainCellOffset, &chainCellCounts,
1528 memcpy((char*) cUnit->baseAddr + chainCellOffset +
1530 cUnit->traceDesc, descSize);
1534 installLiteralPools(cUnit);
1537 dvmCompilerCacheFlush((long)cUnit->baseAddr,
1538 (long)((char *) cUnit->baseAddr + offset), 0);
1541 PROTECT_CODE_CACHE(cUnit->baseAddr, offset);
1547 info->codeAddress = (char*)cUnit->baseAddr + cUnit->headerSize;
1552 info->profileCodeSize = cUnit->profileCodeSize;
2274 void dvmJitInstallClassObjectPointers(CompilationUnit *cUnit, char *codeAddress)
2276 char *base = codeAddress - cUnit->headerSize -
2277 (cUnit->instructionSet == DALVIK_JIT_ARM ? 0 : 1);