From 3ea4ec5629613013ad9b0d7a69abdb94491ac46f Mon Sep 17 00:00:00 2001 From: buzbee Date: Mon, 22 Aug 2011 17:37:19 -0700 Subject: Misc fixes, new compiler unit tests Fixed disassembly logging, miscellaneous codegen bugs and added a set of unit tests (most of which fail because array allocation isn't quite there yet in the codegen). Failing tests conditionally compiled out for now. Change-Id: I39c148f9a7686fac21c844a7a7f5ec86d4e0e1c5 --- src/compiler/codegen/arm/MethodCodegenDriver.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/compiler/codegen/arm/MethodCodegenDriver.cc') diff --git a/src/compiler/codegen/arm/MethodCodegenDriver.cc b/src/compiler/codegen/arm/MethodCodegenDriver.cc index b8dcdb2c67..fd1b8a7ac8 100644 --- a/src/compiler/codegen/arm/MethodCodegenDriver.cc +++ b/src/compiler/codegen/arm/MethodCodegenDriver.cc @@ -28,15 +28,16 @@ static void genNewArray(CompilationUnit* cUnit, MIR* mir, RegLocation rlDest, Class* classPtr = cUnit->method->GetDeclaringClass()->GetDexCache()-> GetResolvedClass(mir->dalvikInsn.vC); if (classPtr == NULL) { - LOG(FATAL) << "Unexpected null passPtr"; + LOG(FATAL) << "Unexpected null classPtr"; } else { loadValueDirectFixed(cUnit, rlSrc, r1); /* get Len */ loadConstant(cUnit, r0, (int)classPtr); } - // FIXME: need this to throw errNegativeArraySize + UNIMPLEMENTED(WARNING) << "Support for throwing errNegativeArraySize"; genRegImmCheck(cUnit, kArmCondMi, r1, 0, mir->offset, NULL); loadWordDisp(cUnit, rSELF, OFFSETOF_MEMBER(Thread, pArtAllocArrayByClass), rLR); + UNIMPLEMENTED(WARNING) << "Need NoThrow wrapper"; newLIR1(cUnit, kThumbBlxR, rLR); // (arrayClass, length, allocFlags) storeValue(cUnit, rlDest, retLoc); } @@ -63,7 +64,7 @@ static void genFilledNewArray(CompilationUnit* cUnit, MIR* mir, bool isRange) Class* classPtr = cUnit->method->GetDeclaringClass()->GetDexCache()-> GetResolvedClass(typeIndex); if (classPtr == NULL) { - LOG(FATAL) << "Unexpected null passPtr"; + LOG(FATAL) << "Unexpected null classPtr"; } else { loadConstant(cUnit, r0, (int)classPtr); loadConstant(cUnit, r1, elems); @@ -897,7 +898,7 @@ static bool compileDalvikInstruction(CompilationUnit* cUnit, MIR* mir, rlResult = oatEvalLoc(cUnit, rlDest, kAnyReg, true); loadConstantValueWide(cUnit, rlResult.lowReg, rlResult.highReg, 0, mir->dalvikInsn.vB); - storeValue(cUnit, rlDest, rlResult); + storeValueWide(cUnit, rlDest, rlResult); break; case OP_CONST_WIDE_HIGH16: -- cgit v1.2.3-59-g8ed1b