From 30a3317577d84feafa859b3e39d1545a995f0b7c Mon Sep 17 00:00:00 2001 From: jeffhao Date: Mon, 22 Oct 2012 18:16:22 -0700 Subject: More MIPS fixes. Many run-test tests pass. Run-test tests 001-043 work, including 003-omnibus-opcodes. 044 is proxy, which is still broken. Changes made: - Fixed argument marshalling of FP values for calls to helper functions in the compiler. - Fixed CheckCast compilation's mistaken use of rARG0 instead of rRET0. - Fixed conversion calls to marshall FP arguments properly. - Created named values for FP args, though they differ in MIPS only. - Fixed assembly to always use T9 to hold code pointer to jump to. - Fixed proxy offset values. Change-Id: If121db322683a307e5a1016210f4f73283aa817c --- src/compiler/codegen/GenCommon.cc | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'src/compiler/codegen/GenCommon.cc') diff --git a/src/compiler/codegen/GenCommon.cc b/src/compiler/codegen/GenCommon.cc index 21f824dfd6..730527115e 100644 --- a/src/compiler/codegen/GenCommon.cc +++ b/src/compiler/codegen/GenCommon.cc @@ -216,18 +216,26 @@ void callRuntimeHelperRegLocationRegLocation(CompilationUnit* cUnit, int helperO int rTgt = loadHelper(cUnit, helperOffset); #endif if (arg0.wide == 0) { - loadValueDirectFixed(cUnit, arg0, rARG0); + loadValueDirectFixed(cUnit, arg0, arg0.fp ? rFARG0 : rARG0); if (arg1.wide == 0) { +#if defined(TARGET_MIPS) + loadValueDirectFixed(cUnit, arg1, arg1.fp ? rFARG2 : rARG1); +#else loadValueDirectFixed(cUnit, arg1, rARG1); +#endif } else { +#if defined(TARGET_MIPS) + loadValueDirectWideFixed(cUnit, arg1, arg1.fp ? rFARG2 : rARG1, arg1.fp ? rFARG3 : rARG2); +#else loadValueDirectWideFixed(cUnit, arg1, rARG1, rARG2); +#endif } } else { - loadValueDirectWideFixed(cUnit, arg0, rARG0, rARG1); + loadValueDirectWideFixed(cUnit, arg0, arg0.fp ? rFARG0 : rARG0, arg0.fp ? rFARG1 : rARG1); if (arg1.wide == 0) { - loadValueDirectFixed(cUnit, arg1, rARG2); + loadValueDirectFixed(cUnit, arg1, arg1.fp ? rFARG2 : rARG2); } else { - loadValueDirectWideFixed(cUnit, arg1, rARG2, rARG3); + loadValueDirectWideFixed(cUnit, arg1, arg1.fp ? rFARG2 : rARG2, arg1.fp ? rFARG3 : rARG3); } } oatClobberCalleeSave(cUnit); @@ -1400,7 +1408,7 @@ void genCheckCast(CompilationUnit* cUnit, uint32_t type_idx, RegLocation rlSrc) // InitializeTypeFromCode(idx, method) callRuntimeHelperImmReg(cUnit, ENTRYPOINT_OFFSET(pInitializeTypeFromCode), type_idx, rARG1, true); - opRegCopy(cUnit, classReg, rARG0); // Align usage with fast path + opRegCopy(cUnit, classReg, rRET0); // Align usage with fast path // Rejoin code paths LIR* hopTarget = newLIR0(cUnit, kPseudoTargetLabel); hopBranch->target = (LIR*)hopTarget; @@ -2363,9 +2371,9 @@ bool genConversionCall(CompilationUnit* cUnit, int funcOffset, */ oatFlushAllRegs(cUnit); /* Send everything to home location */ if (rlSrc.wide) { - loadValueDirectWideFixed(cUnit, rlSrc, rARG0, rARG1); + loadValueDirectWideFixed(cUnit, rlSrc, rlSrc.fp ? rFARG0 : rARG0, rlSrc.fp ? rFARG1 : rARG1); } else { - loadValueDirectFixed(cUnit, rlSrc, rARG0); + loadValueDirectFixed(cUnit, rlSrc, rlSrc.fp ? rFARG0 : rARG0); } callRuntimeHelperRegLocation(cUnit, funcOffset, rlSrc, false); if (rlDest.wide) { -- cgit v1.2.3-59-g8ed1b