summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/GenCommon.cc
diff options
context:
space:
mode:
author jeffhao <jeffhao@google.com> 2012-10-22 18:16:22 -0700
committer jeffhao <jeffhao@google.com> 2012-10-22 18:16:22 -0700
commit30a3317577d84feafa859b3e39d1545a995f0b7c (patch)
treeb102c00c0e2fa5601b0a7021522121d087569964 /src/compiler/codegen/GenCommon.cc
parent63af6361337cc9b5c75ae55405b45d770c5a3b08 (diff)
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
Diffstat (limited to 'src/compiler/codegen/GenCommon.cc')
-rw-r--r--src/compiler/codegen/GenCommon.cc22
1 files changed, 15 insertions, 7 deletions
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) {