Home | History | Annotate | Download | only in mips

Lines Matching full:cunit

409 static void installLiteralPools(CompilationUnit *cUnit)
411 int *dataPtr = (int *) ((char *) cUnit->baseAddr + cUnit->dataOffset);
413 *dataPtr++ = cUnit->numClassPointers;
414 MipsLIR *dataLIR = (MipsLIR *) cUnit->classPointerList;
423 dataLIR = (MipsLIR *) cUnit->literalList;
436 static AssemblerStatus assembleInstructions(CompilationUnit *cUnit,
439 int *bufferAddr = (int *) cUnit->codeBuffer;
442 for (lir = (MipsLIR *) cUnit->firstLIRInsn; lir; lir = NEXT_LIR(lir)) {
568 static int assignLiteralOffset(CompilationUnit *cUnit, int offset)
572 offset = assignLiteralOffsetCommon(cUnit->classPointerList, offset);
573 offset = assignLiteralOffsetCommon(cUnit->literalList, offset);
710 static void matchSignatureBreakpoint(const CompilationUnit *cUnit,
714 u4 *ptr = (u4 *) cUnit->codeBuffer;
726 int descSize = getTraceDescriptionSize(cUnit->traceDesc);
729 memcpy(newCopy, cUnit->traceDesc, descSize);
743 void dvmCompilerAssembleLIR(CompilationUnit *cUnit, JitTranslationInfo *info)
749 int descSize = (cUnit->jitMode == kJitMethod) ?
750 0 : getTraceDescriptionSize(cUnit->traceDesc);
753 info->instructionSet = cUnit->instructionSet;
756 for (mipsLIR = (MipsLIR *) cUnit->firstLIRInsn;
773 if (cUnit->jitMode != kJitMethod) {
779 chainingCellGap = (offset - cUnit->chainingCellBottom->offset) >> 2;
782 chainCellOffsetLIR = (MipsLIR *) cUnit->chainCellOffsetLIR;
800 cUnit->dataOffset = offset;
806 offset = assignLiteralOffset(cUnit, offset);
808 cUnit->totalSize = offset;
810 if (gDvmJit.codeCacheByteUsed + cUnit->totalSize > gDvmJit.codeCacheSize) {
817 cUnit->codeBuffer = (unsigned char *)dvmCompilerNew(chainCellOffset, true);
818 if (cUnit->codeBuffer == NULL) {
828 cUnit->assemblerStatus = assembleInstructions(cUnit,
831 switch(cUnit->assemblerStatus) {
835 if (cUnit->assemblerRetries < MAX_ASSEMBLER_RETRIES) {
836 if (cUnit->jitMode != kJitMethod) {
843 cUnit->assemblerRetries = 0;
844 cUnit->assemblerStatus = kRetryHalve;
849 ALOGE("Unexpected assembler status: %d", cUnit->assemblerStatus);
856 matchSignatureBreakpoint(cUnit, chainCellOffset/4);
879 cUnit->baseAddr = (char *) gDvmJit.codeCache + gDvmJit.codeCacheByteUsed;
882 UNPROTECT_CODE_CACHE(cUnit->baseAddr, offset);
885 memcpy((char*)cUnit->baseAddr, cUnit->codeBuffer, chainCellOffset);
888 if (cUnit->jitMode != kJitMethod) {
891 chainCellCounts.u.count[i] = cUnit->numChainingCells[i];
897 memcpy((char*)cUnit->baseAddr + chainCellOffset, &chainCellCounts,
901 memcpy((char*) cUnit->baseAddr + chainCellOffset +
903 cUnit->traceDesc, descSize);
907 installLiteralPools(cUnit);
910 dvmCompilerCacheFlush((long)cUnit->baseAddr,
911 (long)((char *) cUnit->baseAddr + offset), 0);
915 PROTECT_CODE_CACHE(cUnit->baseAddr, offset);
921 info->codeAddress = (char*)cUnit->baseAddr + cUnit->headerSize;
923 info->profileCodeSize = cUnit->profileCodeSize;
1639 void dvmJitInstallClassObjectPointers(CompilationUnit *cUnit, char *codeAddress)
1641 char *base = codeAddress - cUnit->headerSize;