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/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
9 | 9 |
10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1450 | 1450 |
1451 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg, | 1451 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg, |
1452 const Object& obj, | 1452 const Object& obj, |
1453 bool needs_number_check, | 1453 bool needs_number_check, |
1454 intptr_t token_pos) { | 1454 intptr_t token_pos) { |
1455 if (needs_number_check && | 1455 if (needs_number_check && |
1456 (obj.IsMint() || obj.IsDouble() || obj.IsBigint())) { | 1456 (obj.IsMint() || obj.IsDouble() || obj.IsBigint())) { |
1457 __ Push(reg); | 1457 __ Push(reg); |
1458 __ PushObject(obj); | 1458 __ PushObject(obj); |
1459 if (is_optimizing()) { | 1459 if (is_optimizing()) { |
1460 __ BranchLink(&StubCode::OptimizedIdenticalWithNumberCheckLabel()); | 1460 __ BranchLinkPatchable( |
| 1461 &StubCode::OptimizedIdenticalWithNumberCheckLabel()); |
1461 } else { | 1462 } else { |
1462 __ BranchLink(&StubCode::UnoptimizedIdenticalWithNumberCheckLabel()); | 1463 __ BranchLinkPatchable( |
| 1464 &StubCode::UnoptimizedIdenticalWithNumberCheckLabel()); |
1463 } | 1465 } |
1464 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, | 1466 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, |
1465 Isolate::kNoDeoptId, | 1467 Isolate::kNoDeoptId, |
1466 token_pos); | 1468 token_pos); |
1467 __ Drop(1); // Discard constant. | 1469 __ Drop(1); // Discard constant. |
1468 __ Pop(reg); // Restore 'reg'. | 1470 __ Pop(reg); // Restore 'reg'. |
1469 return; | 1471 return; |
1470 } | 1472 } |
1471 | 1473 |
1472 __ CompareObject(reg, obj); | 1474 __ CompareObject(reg, obj); |
1473 } | 1475 } |
1474 | 1476 |
1475 | 1477 |
1476 void FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, | 1478 void FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, |
1477 Register right, | 1479 Register right, |
1478 bool needs_number_check, | 1480 bool needs_number_check, |
1479 intptr_t token_pos) { | 1481 intptr_t token_pos) { |
1480 if (needs_number_check) { | 1482 if (needs_number_check) { |
1481 __ Push(left); | 1483 __ Push(left); |
1482 __ Push(right); | 1484 __ Push(right); |
1483 if (is_optimizing()) { | 1485 if (is_optimizing()) { |
1484 __ BranchLink(&StubCode::OptimizedIdenticalWithNumberCheckLabel()); | 1486 __ BranchLinkPatchable( |
| 1487 &StubCode::OptimizedIdenticalWithNumberCheckLabel()); |
1485 } else { | 1488 } else { |
1486 __ BranchLink(&StubCode::UnoptimizedIdenticalWithNumberCheckLabel()); | 1489 __ BranchLinkPatchable( |
| 1490 &StubCode::UnoptimizedIdenticalWithNumberCheckLabel()); |
1487 } | 1491 } |
1488 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, | 1492 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, |
1489 Isolate::kNoDeoptId, | 1493 Isolate::kNoDeoptId, |
1490 token_pos); | 1494 token_pos); |
1491 // Stub returns result in flags (result of a cmpl, we need ZF computed). | 1495 // Stub returns result in flags (result of a cmpl, we need ZF computed). |
1492 __ Pop(right); | 1496 __ Pop(right); |
1493 __ Pop(left); | 1497 __ Pop(left); |
1494 } else { | 1498 } else { |
1495 __ cmp(left, ShifterOperand(right)); | 1499 __ cmp(left, ShifterOperand(right)); |
1496 } | 1500 } |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1913 DRegister dreg = EvenDRegisterOf(reg); | 1917 DRegister dreg = EvenDRegisterOf(reg); |
1914 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); | 1918 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); |
1915 } | 1919 } |
1916 | 1920 |
1917 | 1921 |
1918 #undef __ | 1922 #undef __ |
1919 | 1923 |
1920 } // namespace dart | 1924 } // namespace dart |
1921 | 1925 |
1922 #endif // defined TARGET_ARCH_ARM | 1926 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |