| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 return DoArithmeticT(op, instr); | 753 return DoArithmeticT(op, instr); |
| 754 } | 754 } |
| 755 } | 755 } |
| 756 | 756 |
| 757 | 757 |
| 758 LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, | 758 LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, |
| 759 HArithmeticBinaryOperation* instr) { | 759 HArithmeticBinaryOperation* instr) { |
| 760 ASSERT(instr->representation().IsDouble()); | 760 ASSERT(instr->representation().IsDouble()); |
| 761 ASSERT(instr->left()->representation().IsDouble()); | 761 ASSERT(instr->left()->representation().IsDouble()); |
| 762 ASSERT(instr->right()->representation().IsDouble()); | 762 ASSERT(instr->right()->representation().IsDouble()); |
| 763 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); | |
| 764 LOperand* right = NULL; | |
| 765 if (op == Token::MOD) { | 763 if (op == Token::MOD) { |
| 766 right = UseFixedDouble(instr->BetterRightOperand(), xmm1); | 764 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); |
| 765 LOperand* right = UseFixedDouble(instr->BetterRightOperand(), xmm1); |
| 767 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); | 766 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); |
| 768 return MarkAsCall(DefineSameAsFirst(result), instr); | 767 return MarkAsCall(DefineSameAsFirst(result), instr); |
| 768 } else { |
| 769 LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand()); |
| 770 LOperand* right = UseRegisterAtStart(instr->BetterRightOperand()); |
| 771 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); |
| 772 return DefineSameAsFirst(result); |
| 769 } | 773 } |
| 770 right = UseRegisterAtStart(instr->BetterRightOperand()); | |
| 771 LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); | |
| 772 return DefineSameAsFirst(result); | |
| 773 } | 774 } |
| 774 | 775 |
| 775 | 776 |
| 776 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, | 777 LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op, |
| 777 HBinaryOperation* instr) { | 778 HBinaryOperation* instr) { |
| 778 HValue* left = instr->left(); | 779 HValue* left = instr->left(); |
| 779 HValue* right = instr->right(); | 780 HValue* right = instr->right(); |
| 780 ASSERT(left->representation().IsTagged()); | 781 ASSERT(left->representation().IsTagged()); |
| 781 ASSERT(right->representation().IsTagged()); | 782 ASSERT(right->representation().IsTagged()); |
| 782 LOperand* left_operand = UseFixed(left, rdx); | 783 LOperand* left_operand = UseFixed(left, rdx); |
| (...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2524 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2525 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2525 LOperand* object = UseRegister(instr->object()); | 2526 LOperand* object = UseRegister(instr->object()); |
| 2526 LOperand* index = UseTempRegister(instr->index()); | 2527 LOperand* index = UseTempRegister(instr->index()); |
| 2527 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2528 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2528 } | 2529 } |
| 2529 | 2530 |
| 2530 | 2531 |
| 2531 } } // namespace v8::internal | 2532 } } // namespace v8::internal |
| 2532 | 2533 |
| 2533 #endif // V8_TARGET_ARCH_X64 | 2534 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |