Revert "mod does not rely on a fixed register anymore, the arguments are passed via the stack."
Due to buildbot failures. BUG= R=danno@chromium.org Review URL: https://chromiumcodereview.appspot.com/22474007 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
707fdd4c6a
commit
56ca64e98c
@ -809,11 +809,10 @@ LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op,
|
|||||||
ASSERT(instr->representation().IsDouble());
|
ASSERT(instr->representation().IsDouble());
|
||||||
ASSERT(instr->left()->representation().IsDouble());
|
ASSERT(instr->left()->representation().IsDouble());
|
||||||
ASSERT(instr->right()->representation().IsDouble());
|
ASSERT(instr->right()->representation().IsDouble());
|
||||||
|
ASSERT(op != Token::MOD);
|
||||||
LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand());
|
LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand());
|
||||||
LOperand* right = UseRegisterAtStart(instr->BetterRightOperand());
|
LOperand* right = UseRegisterAtStart(instr->BetterRightOperand());
|
||||||
LArithmeticD* result = new(zone()) LArithmeticD(op, left, right);
|
LArithmeticD* result = new(zone()) LArithmeticD(op, left, right);
|
||||||
// We call a C function for double modulo. It can't trigger a GC.
|
|
||||||
if (op == Token::MOD) return MarkAsCall(DefineAsRegister(result), instr);
|
|
||||||
return DefineSameAsFirst(result);
|
return DefineSameAsFirst(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1564,7 +1563,13 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) {
|
|||||||
return DoArithmeticT(Token::MOD, instr);
|
return DoArithmeticT(Token::MOD, instr);
|
||||||
} else {
|
} else {
|
||||||
ASSERT(instr->representation().IsDouble());
|
ASSERT(instr->representation().IsDouble());
|
||||||
return DoArithmeticD(Token::MOD, instr);
|
// We call a C function for double modulo. It can't trigger a GC. We need
|
||||||
|
// to use fixed result register for the call.
|
||||||
|
// TODO(fschneider): Allow any register as input registers.
|
||||||
|
LArithmeticD* mod = new(zone()) LArithmeticD(Token::MOD,
|
||||||
|
UseFixedDouble(left, xmm2),
|
||||||
|
UseFixedDouble(right, xmm1));
|
||||||
|
return MarkAsCall(DefineFixedDouble(mod, xmm1), instr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user