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

Side by Side Diff: src/compiler/x64/code-generator-x64.cc

Issue 595963002: Extend JSBuiltinReducer to cover Math.sqrt as well. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment by Benedikt. Created 6 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/compiler/simplified-lowering.cc ('k') | src/compiler/x64/instruction-codes-x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties-inl.h" 10 #include "src/compiler/node-properties-inl.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 __ popfq(); 440 __ popfq();
441 } 441 }
442 __ j(parity_even, &mod_loop); 442 __ j(parity_even, &mod_loop);
443 // Move output to stack and clean up. 443 // Move output to stack and clean up.
444 __ fstp(1); 444 __ fstp(1);
445 __ fstp_d(Operand(rsp, 0)); 445 __ fstp_d(Operand(rsp, 0));
446 __ movsd(i.OutputDoubleRegister(), Operand(rsp, 0)); 446 __ movsd(i.OutputDoubleRegister(), Operand(rsp, 0));
447 __ addq(rsp, Immediate(kDoubleSize)); 447 __ addq(rsp, Immediate(kDoubleSize));
448 break; 448 break;
449 } 449 }
450 case kSSEFloat64Sqrt: {
451 RegisterOrOperand input = i.InputRegisterOrOperand(0);
452 if (input.type == kDoubleRegister) {
453 __ sqrtsd(i.OutputDoubleRegister(), input.double_reg);
454 } else {
455 __ sqrtsd(i.OutputDoubleRegister(), input.operand);
456 }
457 break;
458 }
450 case kSSEFloat64ToInt32: { 459 case kSSEFloat64ToInt32: {
451 RegisterOrOperand input = i.InputRegisterOrOperand(0); 460 RegisterOrOperand input = i.InputRegisterOrOperand(0);
452 if (input.type == kDoubleRegister) { 461 if (input.type == kDoubleRegister) {
453 __ cvttsd2si(i.OutputRegister(), input.double_reg); 462 __ cvttsd2si(i.OutputRegister(), input.double_reg);
454 } else { 463 } else {
455 __ cvttsd2si(i.OutputRegister(), input.operand); 464 __ cvttsd2si(i.OutputRegister(), input.operand);
456 } 465 }
457 break; 466 break;
458 } 467 }
459 case kSSEFloat64ToUint32: { 468 case kSSEFloat64ToUint32: {
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 } 1015 }
1007 } 1016 }
1008 MarkLazyDeoptSite(); 1017 MarkLazyDeoptSite();
1009 } 1018 }
1010 1019
1011 #undef __ 1020 #undef __
1012 1021
1013 } // namespace internal 1022 } // namespace internal
1014 } // namespace compiler 1023 } // namespace compiler
1015 } // namespace v8 1024 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/x64/instruction-codes-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698