| 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 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 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1185 | 1185 |
| 1186 | 1186 |
| 1187 void Intrinsifier::Double_div(Assembler* assembler) { | 1187 void Intrinsifier::Double_div(Assembler* assembler) { |
| 1188 return DoubleArithmeticOperations(assembler, Token::kDIV); | 1188 return DoubleArithmeticOperations(assembler, Token::kDIV); |
| 1189 } | 1189 } |
| 1190 | 1190 |
| 1191 | 1191 |
| 1192 // Left is double right is integer (Bigint, Mint or Smi) | 1192 // Left is double right is integer (Bigint, Mint or Smi) |
| 1193 void Intrinsifier::Double_mulFromInteger(Assembler* assembler) { | 1193 void Intrinsifier::Double_mulFromInteger(Assembler* assembler) { |
| 1194 Label fall_through; | 1194 Label fall_through; |
| 1195 // Only Smi-s allowed. | 1195 // Only smis allowed. |
| 1196 __ ldr(R0, Address(SP, 0 * kWordSize)); | 1196 __ ldr(R0, Address(SP, 0 * kWordSize)); |
| 1197 __ tst(R0, ShifterOperand(kSmiTagMask)); | 1197 __ tst(R0, ShifterOperand(kSmiTagMask)); |
| 1198 __ b(&fall_through, NE); | 1198 __ b(&fall_through, NE); |
| 1199 // Is Smi. | 1199 // Is Smi. |
| 1200 __ SmiUntag(R0); | 1200 __ SmiUntag(R0); |
| 1201 __ vmovsr(S0, R0); | 1201 __ vmovsr(S0, R0); |
| 1202 __ vcvtdi(D1, S0); | 1202 __ vcvtdi(D1, S0); |
| 1203 __ ldr(R0, Address(SP, 1 * kWordSize)); | 1203 __ ldr(R0, Address(SP, 1 * kWordSize)); |
| 1204 __ LoadDFromOffset(D0, R0, Double::value_offset() - kHeapObjectTag); | 1204 __ LoadDFromOffset(D0, R0, Double::value_offset() - kHeapObjectTag); |
| 1205 __ vmuld(D0, D0, D1); | 1205 __ vmuld(D0, D0, D1); |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1646 | 1646 |
| 1647 __ Bind(&ok); | 1647 __ Bind(&ok); |
| 1648 __ Ret(); | 1648 __ Ret(); |
| 1649 | 1649 |
| 1650 __ Bind(&fall_through); | 1650 __ Bind(&fall_through); |
| 1651 } | 1651 } |
| 1652 | 1652 |
| 1653 } // namespace dart | 1653 } // namespace dart |
| 1654 | 1654 |
| 1655 #endif // defined TARGET_ARCH_ARM | 1655 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |