| 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 "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 | 1331 |
| 1332 | 1332 |
| 1333 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg, | 1333 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg, |
| 1334 const Object& obj, | 1334 const Object& obj, |
| 1335 bool needs_number_check, | 1335 bool needs_number_check, |
| 1336 intptr_t token_pos) { | 1336 intptr_t token_pos) { |
| 1337 if (needs_number_check && | 1337 if (needs_number_check && |
| 1338 (obj.IsMint() || obj.IsDouble() || obj.IsBigint())) { | 1338 (obj.IsMint() || obj.IsDouble() || obj.IsBigint())) { |
| 1339 __ Push(reg); | 1339 __ Push(reg); |
| 1340 __ PushObject(obj); | 1340 __ PushObject(obj); |
| 1341 __ BranchLink(&StubCode::IdenticalWithNumberCheckLabel()); | 1341 if (is_optimizing()) { |
| 1342 __ BranchLink(&StubCode::OptimizedIdenticalWithNumberCheckLabel()); |
| 1343 } else { |
| 1344 __ BranchLink(&StubCode::UnoptimizedIdenticalWithNumberCheckLabel()); |
| 1345 } |
| 1342 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, | 1346 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, |
| 1343 Isolate::kNoDeoptId, | 1347 Isolate::kNoDeoptId, |
| 1344 token_pos); | 1348 token_pos); |
| 1345 __ Drop(1); // Discard constant. | 1349 __ Drop(1); // Discard constant. |
| 1346 __ Pop(reg); // Restore 'reg'. | 1350 __ Pop(reg); // Restore 'reg'. |
| 1347 return; | 1351 return; |
| 1348 } | 1352 } |
| 1349 | 1353 |
| 1350 __ CompareObject(reg, obj); | 1354 __ CompareObject(reg, obj); |
| 1351 } | 1355 } |
| 1352 | 1356 |
| 1353 | 1357 |
| 1354 void FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, | 1358 void FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, |
| 1355 Register right, | 1359 Register right, |
| 1356 bool needs_number_check, | 1360 bool needs_number_check, |
| 1357 intptr_t token_pos) { | 1361 intptr_t token_pos) { |
| 1358 if (needs_number_check) { | 1362 if (needs_number_check) { |
| 1359 __ Push(left); | 1363 __ Push(left); |
| 1360 __ Push(right); | 1364 __ Push(right); |
| 1361 __ BranchLink(&StubCode::IdenticalWithNumberCheckLabel()); | 1365 if (is_optimizing()) { |
| 1366 __ BranchLink(&StubCode::OptimizedIdenticalWithNumberCheckLabel()); |
| 1367 } else { |
| 1368 __ BranchLink(&StubCode::UnoptimizedIdenticalWithNumberCheckLabel()); |
| 1369 } |
| 1362 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, | 1370 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, |
| 1363 Isolate::kNoDeoptId, | 1371 Isolate::kNoDeoptId, |
| 1364 token_pos); | 1372 token_pos); |
| 1365 // Stub returns result in flags (result of a cmpl, we need ZF computed). | 1373 // Stub returns result in flags (result of a cmpl, we need ZF computed). |
| 1366 __ Pop(right); | 1374 __ Pop(right); |
| 1367 __ Pop(left); | 1375 __ Pop(left); |
| 1368 } else { | 1376 } else { |
| 1369 __ cmp(left, ShifterOperand(right)); | 1377 __ cmp(left, ShifterOperand(right)); |
| 1370 } | 1378 } |
| 1371 } | 1379 } |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1746 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1754 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
| 1747 __ vldrd(reg, Address(SP, kDoubleSize, Address::PostIndex)); | 1755 __ vldrd(reg, Address(SP, kDoubleSize, Address::PostIndex)); |
| 1748 } | 1756 } |
| 1749 | 1757 |
| 1750 | 1758 |
| 1751 #undef __ | 1759 #undef __ |
| 1752 | 1760 |
| 1753 } // namespace dart | 1761 } // namespace dart |
| 1754 | 1762 |
| 1755 #endif // defined TARGET_ARCH_ARM | 1763 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |