| 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/ia32/assembler-ia32.h" | 10 #include "src/ia32/assembler-ia32.h" |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 // Move output to stack and clean up. | 483 // Move output to stack and clean up. |
| 484 __ fstp(1); | 484 __ fstp(1); |
| 485 __ fstp_d(Operand(esp, 0)); | 485 __ fstp_d(Operand(esp, 0)); |
| 486 __ movsd(i.OutputDoubleRegister(), Operand(esp, 0)); | 486 __ movsd(i.OutputDoubleRegister(), Operand(esp, 0)); |
| 487 __ add(esp, Immediate(kDoubleSize)); | 487 __ add(esp, Immediate(kDoubleSize)); |
| 488 break; | 488 break; |
| 489 } | 489 } |
| 490 case kSSEFloat64Sqrt: | 490 case kSSEFloat64Sqrt: |
| 491 __ sqrtsd(i.OutputDoubleRegister(), i.InputOperand(0)); | 491 __ sqrtsd(i.OutputDoubleRegister(), i.InputOperand(0)); |
| 492 break; | 492 break; |
| 493 case kSSEFloat64Floor: { | 493 case kSSEFloat64Round: { |
| 494 CpuFeatureScope sse_scope(masm(), SSE4_1); | 494 CpuFeatureScope sse_scope(masm(), SSE4_1); |
| 495 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 495 RoundingMode const mode = |
| 496 v8::internal::Assembler::kRoundDown); | 496 static_cast<RoundingMode>(MiscField::decode(instr->opcode())); |
| 497 break; | 497 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), mode); |
| 498 } | |
| 499 case kSSEFloat64Ceil: { | |
| 500 CpuFeatureScope sse_scope(masm(), SSE4_1); | |
| 501 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | |
| 502 v8::internal::Assembler::kRoundUp); | |
| 503 break; | |
| 504 } | |
| 505 case kSSEFloat64RoundTruncate: { | |
| 506 CpuFeatureScope sse_scope(masm(), SSE4_1); | |
| 507 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | |
| 508 v8::internal::Assembler::kRoundToZero); | |
| 509 break; | 498 break; |
| 510 } | 499 } |
| 511 case kSSECvtss2sd: | 500 case kSSECvtss2sd: |
| 512 __ cvtss2sd(i.OutputDoubleRegister(), i.InputOperand(0)); | 501 __ cvtss2sd(i.OutputDoubleRegister(), i.InputOperand(0)); |
| 513 break; | 502 break; |
| 514 case kSSECvtsd2ss: | 503 case kSSECvtsd2ss: |
| 515 __ cvtsd2ss(i.OutputDoubleRegister(), i.InputOperand(0)); | 504 __ cvtsd2ss(i.OutputDoubleRegister(), i.InputOperand(0)); |
| 516 break; | 505 break; |
| 517 case kSSEFloat64ToInt32: | 506 case kSSEFloat64ToInt32: |
| 518 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0)); | 507 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0)); |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1320 } | 1309 } |
| 1321 } | 1310 } |
| 1322 MarkLazyDeoptSite(); | 1311 MarkLazyDeoptSite(); |
| 1323 } | 1312 } |
| 1324 | 1313 |
| 1325 #undef __ | 1314 #undef __ |
| 1326 | 1315 |
| 1327 } // namespace compiler | 1316 } // namespace compiler |
| 1328 } // namespace internal | 1317 } // namespace internal |
| 1329 } // namespace v8 | 1318 } // namespace v8 |
| OLD | NEW |