Home | History | Annotate | Download | only in mips

Lines Matching full:divisor

976   int32_t divisor = instr->divisor();
986 int32_t mask = divisor < 0 ? -(divisor + 1) : (divisor - 1);
1010 int32_t divisor = instr->divisor();
1014 if (divisor == 0) {
1019 __ TruncatingDiv(result, dividend, Abs(divisor));
1020 __ Mul(result, result, Operand(Abs(divisor)));
1079 int32_t divisor = instr->divisor();
1081 DCHECK(divisor == kMinInt || base::bits::IsPowerOfTwo32(Abs(divisor)));
1086 if (hdiv->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) {
1091 if (hdiv->CheckFlag(HValue::kCanOverflow) && divisor == -1) {
1096 divisor != 1 && divisor != -1) {
1097 int32_t mask = divisor < 0 ? -(divisor + 1) : (divisor - 1);
1102 if (divisor == -1) { // Nice shortcut, not needed for correctness.
1106 uint16_t shift = WhichPowerOf2Abs(divisor);
1118 if (divisor < 0) __ Subu(result, zero_reg, result);
1124 int32_t divisor = instr->divisor();
1128 if (divisor == 0) {
1135 if (hdiv->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) {
1140 __ TruncatingDiv(result, dividend, Abs(divisor));
1141 if (divisor < 0) __ Subu(result, zero_reg, result);
1144 __ Mul(scratch0(), result, Operand(divisor));
1156 Register divisor = ToRegister(instr->divisor());
1162 __ Div(remainder, result, dividend, divisor);
1166 DeoptimizeIf(eq, instr, Deoptimizer::kDivisionByZero, divisor,
1174 DeoptimizeIf(lt, instr, Deoptimizer::kMinusZero, divisor,
1184 DeoptimizeIf(eq, instr, Deoptimizer::kOverflow, divisor, Operand(-1));
1210 int32_t divisor = instr->divisor();
1214 // If the divisor is 1, return the dividend.
1215 if (divisor == 1) {
1220 // If the divisor is positive, things are easy: There can be no deopts and we
1222 uint16_t shift = WhichPowerOf2Abs(divisor);
1223 if (divisor > 1) {
1228 // If the divisor is negative, we have to negate and handle edge cases.
1241 if (divisor == -1) {
1257 __ li(result, Operand(kMinInt / divisor));
1267 int32_t divisor = instr->divisor();
1271 if (divisor == 0) {
1278 if (hdiv->CheckFlag(HValue::kBailoutOnMinusZero) && divisor < 0) {
1285 if ((divisor > 0 && !hdiv->CheckFlag(HValue::kLeftCanBeNegative)) ||
1286 (divisor < 0 && !hdiv->CheckFlag(HValue::kLeftCanBePositive))) {
1287 __ TruncatingDiv(result, dividend, Abs(divisor));
1288 if (divisor < 0) __ Subu(result, zero_reg, result);
1297 __ Branch(&needs_adjustment, divisor > 0 ? lt : gt,
1299 __ TruncatingDiv(result, dividend, Abs(divisor));
1300 if (divisor < 0) __ Subu(result, zero_reg, result);
1303 __ Addu(temp, dividend, Operand(divisor > 0 ? 1 : -1));
1304 __ TruncatingDiv(result, temp, Abs(divisor));
1305 if (divisor < 0) __ Subu(result, zero_reg, result);
1315 Register divisor = ToRegister(instr->divisor());
1320 __ Div(remainder, result, dividend, divisor);
1324 DeoptimizeIf(eq, instr, Deoptimizer::kDivisionByZero, divisor,
1332 DeoptimizeIf(lt, instr, Deoptimizer::kMinusZero, divisor,
1342 DeoptimizeIf(eq, instr, Deoptimizer::kOverflow, divisor, Operand(-1));
1349 __ Xor(remainder, remainder, Operand(divisor));