Reviewers: Kevin Millikin,
Description:
Add MarkAsCall to the LArithmeticD::MOD instruction, that calls a C
function, on
ia32 platform
Please review this at http://codereview.chromium.org/6596105/
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/ia32/lithium-ia32.cc
Index: src/ia32/lithium-ia32.cc
===================================================================
--- src/ia32/lithium-ia32.cc (revision 6982)
+++ src/ia32/lithium-ia32.cc (working copy)
@@ -870,10 +870,18 @@
ASSERT(instr->representation().IsDouble());
ASSERT(instr->left()->representation().IsDouble());
ASSERT(instr->right()->representation().IsDouble());
- LOperand* left = UseRegisterAtStart(instr->left());
- LOperand* right = UseRegisterAtStart(instr->right());
- LArithmeticD* result = new LArithmeticD(op, left, right);
- return DefineSameAsFirst(result);
+ if (op == Token::MOD) {
+ LOperand* left = UseFixedDouble(instr->left(), xmm2);
+ LOperand* right = UseFixedDouble(instr->right(), xmm1);
+ LArithmeticD* result = new LArithmeticD(op, left, right);
+ return MarkAsCall(DefineFixedDouble(result, xmm1), instr);
+
+ } else {
+ LOperand* left = UseRegisterAtStart(instr->left());
+ LOperand* right = UseRegisterAtStart(instr->right());
+ LArithmeticD* result = new LArithmeticD(op, left, right);
+ return DefineSameAsFirst(result);
+ }
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev