| 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/scopes.h" | 10 #include "src/scopes.h" |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 __ addq(rsp, Immediate(kDoubleSize)); | 741 __ addq(rsp, Immediate(kDoubleSize)); |
| 742 break; | 742 break; |
| 743 } | 743 } |
| 744 case kSSEFloat64Sqrt: | 744 case kSSEFloat64Sqrt: |
| 745 if (instr->InputAt(0)->IsDoubleRegister()) { | 745 if (instr->InputAt(0)->IsDoubleRegister()) { |
| 746 __ sqrtsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 746 __ sqrtsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
| 747 } else { | 747 } else { |
| 748 __ sqrtsd(i.OutputDoubleRegister(), i.InputOperand(0)); | 748 __ sqrtsd(i.OutputDoubleRegister(), i.InputOperand(0)); |
| 749 } | 749 } |
| 750 break; | 750 break; |
| 751 case kSSEFloat64Floor: { | 751 case kSSEFloat64Round: { |
| 752 CpuFeatureScope sse_scope(masm(), SSE4_1); | 752 CpuFeatureScope sse_scope(masm(), SSE4_1); |
| 753 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 753 RoundingMode const mode = |
| 754 v8::internal::Assembler::kRoundDown); | 754 static_cast<RoundingMode>(MiscField::decode(instr->opcode())); |
| 755 break; | 755 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), mode); |
| 756 } | |
| 757 case kSSEFloat64Ceil: { | |
| 758 CpuFeatureScope sse_scope(masm(), SSE4_1); | |
| 759 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | |
| 760 v8::internal::Assembler::kRoundUp); | |
| 761 break; | |
| 762 } | |
| 763 case kSSEFloat64RoundTruncate: { | |
| 764 CpuFeatureScope sse_scope(masm(), SSE4_1); | |
| 765 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | |
| 766 v8::internal::Assembler::kRoundToZero); | |
| 767 break; | 756 break; |
| 768 } | 757 } |
| 769 case kSSECvtss2sd: | 758 case kSSECvtss2sd: |
| 770 if (instr->InputAt(0)->IsDoubleRegister()) { | 759 if (instr->InputAt(0)->IsDoubleRegister()) { |
| 771 __ cvtss2sd(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 760 __ cvtss2sd(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
| 772 } else { | 761 } else { |
| 773 __ cvtss2sd(i.OutputDoubleRegister(), i.InputOperand(0)); | 762 __ cvtss2sd(i.OutputDoubleRegister(), i.InputOperand(0)); |
| 774 } | 763 } |
| 775 break; | 764 break; |
| 776 case kSSECvtsd2ss: | 765 case kSSECvtsd2ss: |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1492 } | 1481 } |
| 1493 } | 1482 } |
| 1494 MarkLazyDeoptSite(); | 1483 MarkLazyDeoptSite(); |
| 1495 } | 1484 } |
| 1496 | 1485 |
| 1497 #undef __ | 1486 #undef __ |
| 1498 | 1487 |
| 1499 } // namespace internal | 1488 } // namespace internal |
| 1500 } // namespace compiler | 1489 } // namespace compiler |
| 1501 } // namespace v8 | 1490 } // namespace v8 |
| OLD | NEW |