| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
| 9 | 9 |
| 10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
| (...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 } | 1117 } |
| 1118 | 1118 |
| 1119 | 1119 |
| 1120 void Intrinsifier::Double_div(Assembler* assembler) { | 1120 void Intrinsifier::Double_div(Assembler* assembler) { |
| 1121 return DoubleArithmeticOperations(assembler, Token::kDIV); | 1121 return DoubleArithmeticOperations(assembler, Token::kDIV); |
| 1122 } | 1122 } |
| 1123 | 1123 |
| 1124 | 1124 |
| 1125 void Intrinsifier::Double_mulFromInteger(Assembler* assembler) { | 1125 void Intrinsifier::Double_mulFromInteger(Assembler* assembler) { |
| 1126 Label fall_through; | 1126 Label fall_through; |
| 1127 // Only Smi-s allowed. | 1127 // Only smis allowed. |
| 1128 __ movq(RAX, Address(RSP, + 1 * kWordSize)); | 1128 __ movq(RAX, Address(RSP, + 1 * kWordSize)); |
| 1129 __ testq(RAX, Immediate(kSmiTagMask)); | 1129 __ testq(RAX, Immediate(kSmiTagMask)); |
| 1130 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); | 1130 __ j(NOT_ZERO, &fall_through, Assembler::kNearJump); |
| 1131 // Is Smi. | 1131 // Is Smi. |
| 1132 __ SmiUntag(RAX); | 1132 __ SmiUntag(RAX); |
| 1133 __ cvtsi2sd(XMM1, RAX); | 1133 __ cvtsi2sd(XMM1, RAX); |
| 1134 __ movq(RAX, Address(RSP, + 2 * kWordSize)); | 1134 __ movq(RAX, Address(RSP, + 2 * kWordSize)); |
| 1135 __ movsd(XMM0, FieldAddress(RAX, Double::value_offset())); | 1135 __ movsd(XMM0, FieldAddress(RAX, Double::value_offset())); |
| 1136 __ mulsd(XMM0, XMM1); | 1136 __ mulsd(XMM0, XMM1); |
| 1137 const Class& double_class = Class::Handle( | 1137 const Class& double_class = Class::Handle( |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1633 | 1633 |
| 1634 __ Bind(&fall_through); | 1634 __ Bind(&fall_through); |
| 1635 } | 1635 } |
| 1636 | 1636 |
| 1637 | 1637 |
| 1638 #undef __ | 1638 #undef __ |
| 1639 | 1639 |
| 1640 } // namespace dart | 1640 } // namespace dart |
| 1641 | 1641 |
| 1642 #endif // defined TARGET_ARCH_X64 | 1642 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |