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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 __ addq(rsp, Immediate(kDoubleSize)); | 400 __ addq(rsp, Immediate(kDoubleSize)); |
401 break; | 401 break; |
402 } | 402 } |
403 case kSSEFloat64Sqrt: | 403 case kSSEFloat64Sqrt: |
404 if (instr->InputAt(0)->IsDoubleRegister()) { | 404 if (instr->InputAt(0)->IsDoubleRegister()) { |
405 __ sqrtsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 405 __ sqrtsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
406 } else { | 406 } else { |
407 __ sqrtsd(i.OutputDoubleRegister(), i.InputOperand(0)); | 407 __ sqrtsd(i.OutputDoubleRegister(), i.InputOperand(0)); |
408 } | 408 } |
409 break; | 409 break; |
| 410 case kSSEFloat64Floor: { |
| 411 CpuFeatureScope sse_scope(masm(), SSE4_1); |
| 412 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
| 413 v8::internal::Assembler::kRoundDown); |
| 414 break; |
| 415 } |
| 416 case kSSEFloat64Ceil: { |
| 417 CpuFeatureScope sse_scope(masm(), SSE4_1); |
| 418 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
| 419 v8::internal::Assembler::kRoundUp); |
| 420 break; |
| 421 } |
| 422 case kSSEFloat64RoundTruncate: { |
| 423 CpuFeatureScope sse_scope(masm(), SSE4_1); |
| 424 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
| 425 v8::internal::Assembler::kRoundToZero); |
| 426 break; |
| 427 } |
410 case kSSECvtss2sd: | 428 case kSSECvtss2sd: |
411 if (instr->InputAt(0)->IsDoubleRegister()) { | 429 if (instr->InputAt(0)->IsDoubleRegister()) { |
412 __ cvtss2sd(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 430 __ cvtss2sd(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
413 } else { | 431 } else { |
414 __ cvtss2sd(i.OutputDoubleRegister(), i.InputOperand(0)); | 432 __ cvtss2sd(i.OutputDoubleRegister(), i.InputOperand(0)); |
415 } | 433 } |
416 break; | 434 break; |
417 case kSSECvtsd2ss: | 435 case kSSECvtsd2ss: |
418 if (instr->InputAt(0)->IsDoubleRegister()) { | 436 if (instr->InputAt(0)->IsDoubleRegister()) { |
419 __ cvtsd2ss(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 437 __ cvtsd2ss(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 } | 1020 } |
1003 } | 1021 } |
1004 MarkLazyDeoptSite(); | 1022 MarkLazyDeoptSite(); |
1005 } | 1023 } |
1006 | 1024 |
1007 #undef __ | 1025 #undef __ |
1008 | 1026 |
1009 } // namespace internal | 1027 } // namespace internal |
1010 } // namespace compiler | 1028 } // namespace compiler |
1011 } // namespace v8 | 1029 } // namespace v8 |
OLD | NEW |