Fixes to x86 compilation.
- div-long and rem-long were calling the wrong helper methods.
- genCmpFP was grabbing new src and destination registers instead of
using the ones it was passed. Also, it wasn't writing its result back.
- gave mul-long its own assembly helper method to help it marshall its
sources properly.
- fixed assembly of shifts for longs.
- updated IntMath's testFloatCompare to exit on the first error.
Change-Id: Iacecf07d3c7135d865728c18551c7989e7e0276b
diff --git a/src/compiler/codegen/x86/FP/X86FP.cc b/src/compiler/codegen/x86/FP/X86FP.cc
index f45a099..f5a030b 100644
--- a/src/compiler/codegen/x86/FP/X86FP.cc
+++ b/src/compiler/codegen/x86/FP/X86FP.cc
@@ -190,21 +190,16 @@
int srcReg1;
int srcReg2;
if (single) {
- rlSrc1 = oatGetSrc(cUnit, mir, 0);
rlSrc1 = loadValue(cUnit, rlSrc1, kFPReg);
srcReg1 = rlSrc1.lowReg;
- rlSrc2 = oatGetSrc(cUnit, mir, 0);
- rlSrc2 = loadValue(cUnit, rlSrc1, kFPReg);
- srcReg2 = rlSrc1.lowReg;
+ rlSrc2 = loadValue(cUnit, rlSrc2, kFPReg);
+ srcReg2 = rlSrc2.lowReg;
} else {
- rlSrc1 = oatGetSrcWide(cUnit, mir, 0, 1);
rlSrc1 = loadValueWide(cUnit, rlSrc1, kFPReg);
srcReg1 = S2D(rlSrc1.lowReg, rlSrc1.highReg);
- rlSrc2 = oatGetSrcWide(cUnit, mir, 0, 1);
rlSrc2 = loadValueWide(cUnit, rlSrc2, kFPReg);
srcReg2 = S2D(rlSrc2.lowReg, rlSrc2.highReg);
}
- rlDest = oatGetDest(cUnit, mir, 0);
RegLocation rlResult = oatEvalLoc(cUnit, rlDest, kCoreReg, true);
loadConstantNoClobber(cUnit, rlResult.lowReg, unorderedGt ? 1 : 0);
if (single) {
@@ -221,6 +216,7 @@
if (unorderedGt) {
branch->target = newLIR0(cUnit, kPseudoTargetLabel);
}
+ storeValue(cUnit, rlDest, rlResult);
return false;
}