| 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 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1299 const Class& double_class = Class::Handle( | 1299 const Class& double_class = Class::Handle( |
| 1300 Isolate::Current()->object_store()->double_class()); | 1300 Isolate::Current()->object_store()->double_class()); |
| 1301 __ TryAllocate(double_class, &fall_through, R0, R1); // Result register. | 1301 __ TryAllocate(double_class, &fall_through, R0, R1); // Result register. |
| 1302 __ StoreDToOffset(D0, R0, Double::value_offset() - kHeapObjectTag); | 1302 __ StoreDToOffset(D0, R0, Double::value_offset() - kHeapObjectTag); |
| 1303 __ Ret(); | 1303 __ Ret(); |
| 1304 __ Bind(&fall_through); | 1304 __ Bind(&fall_through); |
| 1305 } | 1305 } |
| 1306 } | 1306 } |
| 1307 | 1307 |
| 1308 | 1308 |
| 1309 void Intrinsifier::Double_fromInteger(Assembler* assembler) { | 1309 void Intrinsifier::DoubleFromInteger(Assembler* assembler) { |
| 1310 if (TargetCPUFeatures::vfp_supported()) { | 1310 if (TargetCPUFeatures::vfp_supported()) { |
| 1311 Label fall_through; | 1311 Label fall_through; |
| 1312 | 1312 |
| 1313 __ ldr(R0, Address(SP, 0 * kWordSize)); | 1313 __ ldr(R0, Address(SP, 0 * kWordSize)); |
| 1314 __ tst(R0, Operand(kSmiTagMask)); | 1314 __ tst(R0, Operand(kSmiTagMask)); |
| 1315 __ b(&fall_through, NE); | 1315 __ b(&fall_through, NE); |
| 1316 // Is Smi. | 1316 // Is Smi. |
| 1317 __ SmiUntag(R0); | 1317 __ SmiUntag(R0); |
| 1318 __ vmovsr(S0, R0); | 1318 __ vmovsr(S0, R0); |
| 1319 __ vcvtdi(D0, S0); | 1319 __ vcvtdi(D0, S0); |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1514 ASSERT(kSmiTagShift == 1); | 1514 ASSERT(kSmiTagShift == 1); |
| 1515 __ AddImmediate(R0, TwoByteString::data_offset() - kHeapObjectTag); | 1515 __ AddImmediate(R0, TwoByteString::data_offset() - kHeapObjectTag); |
| 1516 __ ldrh(R0, Address(R0, R1)); | 1516 __ ldrh(R0, Address(R0, R1)); |
| 1517 __ SmiTag(R0); | 1517 __ SmiTag(R0); |
| 1518 __ Ret(); | 1518 __ Ret(); |
| 1519 | 1519 |
| 1520 __ Bind(&fall_through); | 1520 __ Bind(&fall_through); |
| 1521 } | 1521 } |
| 1522 | 1522 |
| 1523 | 1523 |
| 1524 void Intrinsifier::StringBase_charAt(Assembler* assembler) { | 1524 void Intrinsifier::StringBaseCharAt(Assembler* assembler) { |
| 1525 Label fall_through, try_two_byte_string; | 1525 Label fall_through, try_two_byte_string; |
| 1526 | 1526 |
| 1527 __ ldr(R1, Address(SP, 0 * kWordSize)); // Index. | 1527 __ ldr(R1, Address(SP, 0 * kWordSize)); // Index. |
| 1528 __ ldr(R0, Address(SP, 1 * kWordSize)); // String. | 1528 __ ldr(R0, Address(SP, 1 * kWordSize)); // String. |
| 1529 __ tst(R1, Operand(kSmiTagMask)); | 1529 __ tst(R1, Operand(kSmiTagMask)); |
| 1530 __ b(&fall_through, NE); // Index is not a Smi. | 1530 __ b(&fall_through, NE); // Index is not a Smi. |
| 1531 // Range check. | 1531 // Range check. |
| 1532 __ ldr(R2, FieldAddress(R0, String::length_offset())); | 1532 __ ldr(R2, FieldAddress(R0, String::length_offset())); |
| 1533 __ cmp(R1, Operand(R2)); | 1533 __ cmp(R1, Operand(R2)); |
| 1534 __ b(&fall_through, CS); // Runtime throws exception. | 1534 __ b(&fall_through, CS); // Runtime throws exception. |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1902 Isolate* isolate = Isolate::Current(); | 1902 Isolate* isolate = Isolate::Current(); |
| 1903 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate)); | 1903 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate)); |
| 1904 // Set return value to Isolate::current_tag_. | 1904 // Set return value to Isolate::current_tag_. |
| 1905 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); | 1905 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); |
| 1906 __ Ret(); | 1906 __ Ret(); |
| 1907 } | 1907 } |
| 1908 | 1908 |
| 1909 } // namespace dart | 1909 } // namespace dart |
| 1910 | 1910 |
| 1911 #endif // defined TARGET_ARCH_ARM | 1911 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |