OLD | NEW |
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 Loading... |
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 kCvtss2sd: |
| 451 __ cvtss2sd(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
| 452 break; |
| 453 case kCvtsd2ss: |
| 454 __ cvtsd2ss(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
| 455 break; |
450 case kSSEFloat64ToInt32: { | 456 case kSSEFloat64ToInt32: { |
451 RegisterOrOperand input = i.InputRegisterOrOperand(0); | 457 RegisterOrOperand input = i.InputRegisterOrOperand(0); |
452 if (input.type == kDoubleRegister) { | 458 if (input.type == kDoubleRegister) { |
453 __ cvttsd2si(i.OutputRegister(), input.double_reg); | 459 __ cvttsd2si(i.OutputRegister(), input.double_reg); |
454 } else { | 460 } else { |
455 __ cvttsd2si(i.OutputRegister(), input.operand); | 461 __ cvttsd2si(i.OutputRegister(), input.operand); |
456 } | 462 } |
457 break; | 463 break; |
458 } | 464 } |
459 case kSSEFloat64ToUint32: { | 465 case kSSEFloat64ToUint32: { |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 if (HasImmediateInput(instr, index)) { | 560 if (HasImmediateInput(instr, index)) { |
555 __ movq(operand, i.InputImmediate(index)); | 561 __ movq(operand, i.InputImmediate(index)); |
556 } else { | 562 } else { |
557 __ movq(operand, i.InputRegister(index)); | 563 __ movq(operand, i.InputRegister(index)); |
558 } | 564 } |
559 } | 565 } |
560 break; | 566 break; |
561 case kX64Movss: | 567 case kX64Movss: |
562 if (instr->HasOutput()) { | 568 if (instr->HasOutput()) { |
563 __ movss(i.OutputDoubleRegister(), i.MemoryOperand()); | 569 __ movss(i.OutputDoubleRegister(), i.MemoryOperand()); |
564 __ cvtss2sd(i.OutputDoubleRegister(), i.OutputDoubleRegister()); | |
565 } else { | 570 } else { |
566 int index = 0; | 571 int index = 0; |
567 Operand operand = i.MemoryOperand(&index); | 572 Operand operand = i.MemoryOperand(&index); |
568 __ cvtsd2ss(xmm0, i.InputDoubleRegister(index)); | 573 __ movss(operand, i.InputDoubleRegister(index)); |
569 __ movss(operand, xmm0); | |
570 } | 574 } |
571 break; | 575 break; |
572 case kX64Movsd: | 576 case kX64Movsd: |
573 if (instr->HasOutput()) { | 577 if (instr->HasOutput()) { |
574 __ movsd(i.OutputDoubleRegister(), i.MemoryOperand()); | 578 __ movsd(i.OutputDoubleRegister(), i.MemoryOperand()); |
575 } else { | 579 } else { |
576 int index = 0; | 580 int index = 0; |
577 Operand operand = i.MemoryOperand(&index); | 581 Operand operand = i.MemoryOperand(&index); |
578 __ movsd(operand, i.InputDoubleRegister(index)); | 582 __ movsd(operand, i.InputDoubleRegister(index)); |
579 } | 583 } |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 } | 1010 } |
1007 } | 1011 } |
1008 MarkLazyDeoptSite(); | 1012 MarkLazyDeoptSite(); |
1009 } | 1013 } |
1010 | 1014 |
1011 #undef __ | 1015 #undef __ |
1012 | 1016 |
1013 } // namespace internal | 1017 } // namespace internal |
1014 } // namespace compiler | 1018 } // namespace compiler |
1015 } // namespace v8 | 1019 } // namespace v8 |
OLD | NEW |