Revision: 17937
Author: [email protected]
Date: Wed Nov 20 17:02:12 2013 UTC
Log: MIPS: Remove the first_right_arg hack for HMod.
Port r17919 (23e9644)
Original commit message:
Generate a proper subgraph in BuildBinaryOperation instead.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/78663002
Patch from Balazs Kilvady <[email protected]>.
http://code.google.com/p/v8/source/detail?r=17937
Modified:
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/mips/lithium-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue Nov 19
22:23:41 2013 UTC
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Wed Nov 20
17:02:12 2013 UTC
@@ -1091,35 +1091,6 @@
__ bind(&left_is_not_negative);
__ And(result_reg, left_reg, divisor - 1);
__ bind(&done);
-
- } else if (hmod->fixed_right_arg().has_value) {
- const Register left_reg = ToRegister(instr->left());
- const Register result_reg = ToRegister(instr->result());
- const Register right_reg = ToRegister(instr->right());
-
- int32_t divisor = hmod->fixed_right_arg().value;
- ASSERT(IsPowerOf2(divisor));
-
- // Check if our assumption of a fixed right operand still holds.
- DeoptimizeIf(ne, instr->environment(), right_reg, Operand(divisor));
-
- Label left_is_not_negative, done;
- if (left->CanBeNegative()) {
- __ Branch(left_reg.is(result_reg) ? PROTECT : USE_DELAY_SLOT,
- &left_is_not_negative, ge, left_reg, Operand(zero_reg));
- __ subu(result_reg, zero_reg, left_reg);
- __ And(result_reg, result_reg, divisor - 1);
- if (hmod->CheckFlag(HValue::kBailoutOnMinusZero)) {
- DeoptimizeIf(eq, instr->environment(), result_reg,
Operand(zero_reg));
- }
- __ Branch(USE_DELAY_SLOT, &done);
- __ subu(result_reg, zero_reg, result_reg);
- }
-
- __ bind(&left_is_not_negative);
- __ And(result_reg, left_reg, divisor - 1);
- __ bind(&done);
-
} else {
const Register scratch = scratch0();
const Register left_reg = ToRegister(instr->left());
=======================================
--- /branches/bleeding_edge/src/mips/lithium-mips.cc Tue Nov 19 22:23:41
2013 UTC
+++ /branches/bleeding_edge/src/mips/lithium-mips.cc Wed Nov 20 17:02:12
2013 UTC
@@ -1460,10 +1460,6 @@
instr->CheckFlag(HValue::kBailoutOnMinusZero))
? AssignEnvironment(result)
: result;
- } else if (instr->fixed_right_arg().has_value) {
- LModI* mod = new(zone()) LModI(UseRegisterAtStart(left),
- UseRegisterAtStart(right));
- return AssignEnvironment(DefineAsRegister(mod));
} else {
LModI* mod = new(zone()) LModI(UseRegister(left),
UseRegister(right),
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.