diff options
| author | 2012-07-16 22:12:38 -0700 | |
|---|---|---|
| committer | 2012-07-17 15:42:22 -0700 | |
| commit | 85eee02c456cd54f9e4110e90ebed6b55906e1bf (patch) | |
| tree | 07a8b4f12618eeec2d0f41dd484b7c1a0d7d01fa /src/compiler/codegen/MethodBitcode.cc | |
| parent | ea905deb5e2b84ad7acbccfd03bbbf2e759bbf45 (diff) | |
Quick compiler: various bug fixes
o Use appropriate size immediate for placeholder Values.
o Turn unexpected MOVE_RESULT into a warning for x86 (still need to
implement this)
o Use the correct iput value to determine value type.
o I've identified a bug with SSA renaming that shows up in three methods
while doing a full build. Disable bitcode conversion for them until
the fix is in place.
Change-Id: I2762c913d83ef53b8b68dcde51fbe8463f209591
Diffstat (limited to 'src/compiler/codegen/MethodBitcode.cc')
| -rw-r--r-- | src/compiler/codegen/MethodBitcode.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/compiler/codegen/MethodBitcode.cc b/src/compiler/codegen/MethodBitcode.cc index b7c4331d7d..3ec4a1100e 100644 --- a/src/compiler/codegen/MethodBitcode.cc +++ b/src/compiler/codegen/MethodBitcode.cc @@ -1298,7 +1298,12 @@ bool convertMIRNode(CompilationUnit* cUnit, MIR* mir, BasicBlock* bb, case Instruction::MOVE_RESULT_WIDE: case Instruction::MOVE_RESULT: case Instruction::MOVE_RESULT_OBJECT: +#if defined(TARGET_ARM) CHECK(false) << "Unexpected MOVE_RESULT"; +#else + UNIMPLEMENTED(WARNING) << "need x86 move-result fusing"; +#endif + break; case Instruction::MONITOR_ENTER: @@ -1448,7 +1453,7 @@ bool convertMIRNode(CompilationUnit* cUnit, MIR* mir, BasicBlock* bb, } break; case Instruction::IPUT: - if (rlDest.fp) { + if (rlSrc[0].fp) { convertIput(cUnit, optFlags, greenland::IntrinsicHelper::HLIPutFloat, rlSrc[0], rlSrc[1], vC); } else { @@ -1477,7 +1482,7 @@ bool convertMIRNode(CompilationUnit* cUnit, MIR* mir, BasicBlock* bb, rlSrc[0], rlSrc[1], vC); break; case Instruction::IPUT_WIDE: - if (rlDest.fp) { + if (rlSrc[0].fp) { convertIput(cUnit, optFlags, greenland::IntrinsicHelper::HLIPutDouble, rlSrc[0], rlSrc[1], vC); } else { @@ -1918,11 +1923,13 @@ void oatMethodMIR2Bitcode(CompilationUnit* cUnit) arg_iter++; /* Skip path method */ for (int i = 0; i < cUnit->numSSARegs; i++) { llvm::Value* val; - if ((SRegToVReg(cUnit, i) < 0) || cUnit->regLocation[i].highWord) { + RegLocation rlTemp = cUnit->regLocation[i]; + if ((SRegToVReg(cUnit, i) < 0) || rlTemp.highWord) { oatInsertGrowableList(cUnit, &cUnit->llvmValues, 0); } else if ((i < cUnit->numRegs) || (i >= (cUnit->numRegs + cUnit->numIns))) { - llvm::Constant* immValue = cUnit->irb->GetJInt(0); + llvm::Constant* immValue = cUnit->regLocation[i].wide ? + cUnit->irb->GetJLong(0) : cUnit->irb->GetJInt(0); val = emitConst(cUnit, immValue, cUnit->regLocation[i]); val->setName(llvmSSAName(cUnit, i)); oatInsertGrowableList(cUnit, &cUnit->llvmValues, (intptr_t)val); |