Commit 56ca64e9 authored by verwaest@chromium.org's avatar verwaest@chromium.org

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
parent 707fdd4c
...@@ -809,11 +809,10 @@ LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, ...@@ -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) { ...@@ -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);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment