Lines Matching full:cunit
17 static bool genArithOpFloat(CompilationUnit *cUnit, MIR *mir,
48 return genArithOpFloatPortable(cUnit, mir, rlDest, rlSrc1,
54 rlSrc1 = loadValue(cUnit, rlSrc1, kFPReg);
55 rlSrc2 = loadValue(cUnit, rlSrc2, kFPReg);
56 rlResult = dvmCompilerEvalLoc(cUnit, rlDest, kFPReg, true);
57 newLIR3(cUnit, (ArmOpcode)op, rlResult.lowReg, rlSrc1.lowReg,
59 storeValue(cUnit, rlDest, rlResult);
63 static bool genArithOpDouble(CompilationUnit *cUnit, MIR *mir,
90 return genArithOpDoublePortable(cUnit, mir, rlDest, rlSrc1,
97 rlSrc1 = loadValueWide(cUnit, rlSrc1, kFPReg);
99 rlSrc2 = loadValueWide(cUnit, rlSrc2, kFPReg);
101 rlResult = dvmCompilerEvalLoc(cUnit, rlDest, kFPReg, true);
104 newLIR3(cUnit, (ArmOpcode)op, S2D(rlResult.lowReg, rlResult.highReg),
107 storeValueWide(cUnit, rlDest, rlResult);
111 static bool genConversion(CompilationUnit *cUnit, MIR *mir)
157 return genConversionPortable(cUnit, mir);
162 rlSrc = dvmCompilerGetSrcWide(cUnit, mir, 0, 1);
163 rlSrc = loadValueWide(cUnit, rlSrc, kFPReg);
166 rlSrc = dvmCompilerGetSrc(cUnit, mir, 0);
167 rlSrc = loadValue(cUnit, rlSrc, kFPReg);
171 rlDest = dvmCompilerGetDestWide(cUnit, mir, 0, 1);
172 rlResult = dvmCompilerEvalLoc(cUnit, rlDest, kFPReg, true);
173 newLIR2(cUnit, (ArmOpcode)op, S2D(rlResult.lowReg, rlResult.highReg),
175 storeValueWide(cUnit, rlDest, rlResult);
177 rlDest = dvmCompilerGetDest(cUnit, mir, 0);
178 rlResult = dvmCompilerEvalLoc(cUnit, rlDest, kFPReg, true);
179 newLIR2(cUnit, (ArmOpcode)op, rlResult.lowReg, srcReg);
180 storeValue(cUnit, rlDest, rlResult);
185 static bool genInlineSqrt(CompilationUnit *cUnit, MIR *mir)
188 RegLocation rlSrc = dvmCompilerGetSrcWide(cUnit, mir, 0, 1);
189 RegLocation rlDest = inlinedTargetWide(cUnit, mir, true);
190 rlSrc = loadValueWide(cUnit, rlSrc, kFPReg);
191 RegLocation rlResult = dvmCompilerEvalLoc(cUnit, rlDest, kFPReg, true);
192 newLIR2(cUnit, kThumb2Vsqrtd, S2D(rlResult.lowReg, rlResult.highReg),
194 newLIR2(cUnit, kThumb2Vcmpd, S2D(rlResult.lowReg, rlResult.highReg),
196 newLIR0(cUnit, kThumb2Fmstat);
197 branch = newLIR2(cUnit, kThumbBCond, 0, kArmCondEq);
198 dvmCompilerClobberCallRegs(cUnit);
199 LOAD_FUNC_ADDR(cUnit, r2, (int) (double (*)(double)) sqrt);
200 newLIR3(cUnit, kThumb2Fmrrd, r0, r1, S2D(rlSrc.lowReg, rlSrc.highReg));
201 newLIR1(cUnit, kThumbBlxR, r2);
202 newLIR3(cUnit, kThumb2Fmdrr, S2D(rlResult.lowReg, rlResult.highReg),
204 ArmLIR *label = newLIR0(cUnit, kArmPseudoTargetLabel);
207 storeValueWide(cUnit, rlDest, rlResult);
211 static bool genCmpFP(CompilationUnit *cUnit, MIR *mir, RegLocation rlDest,
239 rlSrc1 = loadValueWide(cUnit, rlSrc1, kFPReg);
240 rlSrc2 = loadValueWide(cUnit, rlSrc2, kFPReg);
241 dvmCompilerClobberSReg(cUnit, rlDest.sRegLow);
242 rlResult = dvmCompilerEvalLoc(cUnit, rlDest, kCoreReg, true);
243 loadConstant(cUnit, rlResult.lowReg, defaultResult);
244 newLIR2(cUnit, kThumb2Vcmpd, S2D(rlSrc1.lowReg, r1Src2.highReg),
247 rlSrc1 = loadValue(cUnit, rlSrc1, kFPReg);
248 rlSrc2 = loadValue(cUnit, rlSrc2, kFPReg);
249 dvmCompilerClobberSReg(cUnit, rlDest.sRegLow);
250 rlResult = dvmCompilerEvalLoc(cUnit, rlDest, kCoreReg, true);
251 loadConstant(cUnit, rlResult.lowReg, defaultResult);
252 newLIR2(cUnit, kThumb2Vcmps, rlSrc1.lowReg, rlSrc2.lowReg);
255 newLIR0(cUnit, kThumb2Fmstat);
257 genIT(cUnit, (defaultResult == -1) ? kArmCondGt : kArmCondMi, "");
258 newLIR2(cUnit, kThumb2MovImmShift, rlResult.lowReg,
260 genBarrier(cUnit);
262 genIT(cUnit, kArmCondEq, "");
263 loadConstant(cUnit, rlResult.lowReg, 0);
264 genBarrier(cUnit);
266 storeValue(cUnit, rlDest, rlResult);