Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: src/x64/lithium-x64.cc

Issue 23800005: Refactoring only: Make it clear that MOD is special. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698