| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 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 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 ASSERT(!obj.IsMint() && !obj.IsDouble() && !obj.IsBigint()); | 1382 ASSERT(!obj.IsMint() && !obj.IsDouble() && !obj.IsBigint()); |
| 1383 __ Push(reg); | 1383 __ Push(reg); |
| 1384 __ PushObject(obj); | 1384 __ PushObject(obj); |
| 1385 if (is_optimizing()) { | 1385 if (is_optimizing()) { |
| 1386 __ BranchLinkPatchable( | 1386 __ BranchLinkPatchable( |
| 1387 *StubCode::OptimizedIdenticalWithNumberCheck_entry()); | 1387 *StubCode::OptimizedIdenticalWithNumberCheck_entry()); |
| 1388 } else { | 1388 } else { |
| 1389 __ BranchLinkPatchable( | 1389 __ BranchLinkPatchable( |
| 1390 *StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); | 1390 *StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); |
| 1391 } | 1391 } |
| 1392 if (token_pos != Scanner::kNoSourcePos) { | 1392 if (token_pos >= 0) { |
| 1393 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, | 1393 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, |
| 1394 Thread::kNoDeoptId, | 1394 Thread::kNoDeoptId, |
| 1395 token_pos); | 1395 token_pos); |
| 1396 } | 1396 } |
| 1397 // Stub returns result in flags (result of a cmp, we need Z computed). | 1397 // Stub returns result in flags (result of a cmp, we need Z computed). |
| 1398 __ Drop(1); // Discard constant. | 1398 __ Drop(1); // Discard constant. |
| 1399 __ Pop(reg); // Restore 'reg'. | 1399 __ Pop(reg); // Restore 'reg'. |
| 1400 } else { | 1400 } else { |
| 1401 __ CompareObject(reg, obj); | 1401 __ CompareObject(reg, obj); |
| 1402 } | 1402 } |
| 1403 return EQ; | 1403 return EQ; |
| 1404 } | 1404 } |
| 1405 | 1405 |
| 1406 | 1406 |
| 1407 Condition FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, | 1407 Condition FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, |
| 1408 Register right, | 1408 Register right, |
| 1409 bool needs_number_check, | 1409 bool needs_number_check, |
| 1410 intptr_t token_pos) { | 1410 intptr_t token_pos) { |
| 1411 if (needs_number_check) { | 1411 if (needs_number_check) { |
| 1412 __ Push(left); | 1412 __ Push(left); |
| 1413 __ Push(right); | 1413 __ Push(right); |
| 1414 if (is_optimizing()) { | 1414 if (is_optimizing()) { |
| 1415 __ BranchLinkPatchable( | 1415 __ BranchLinkPatchable( |
| 1416 *StubCode::OptimizedIdenticalWithNumberCheck_entry()); | 1416 *StubCode::OptimizedIdenticalWithNumberCheck_entry()); |
| 1417 } else { | 1417 } else { |
| 1418 __ BranchLinkPatchable( | 1418 __ BranchLinkPatchable( |
| 1419 *StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); | 1419 *StubCode::UnoptimizedIdenticalWithNumberCheck_entry()); |
| 1420 } | 1420 } |
| 1421 if (token_pos != Scanner::kNoSourcePos) { | 1421 if (token_pos >= 0) { |
| 1422 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, | 1422 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, |
| 1423 Thread::kNoDeoptId, | 1423 Thread::kNoDeoptId, |
| 1424 token_pos); | 1424 token_pos); |
| 1425 } | 1425 } |
| 1426 // Stub returns result in flags (result of a cmp, we need Z computed). | 1426 // Stub returns result in flags (result of a cmp, we need Z computed). |
| 1427 __ Pop(right); | 1427 __ Pop(right); |
| 1428 __ Pop(left); | 1428 __ Pop(left); |
| 1429 } else { | 1429 } else { |
| 1430 __ CompareRegisters(left, right); | 1430 __ CompareRegisters(left, right); |
| 1431 } | 1431 } |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1871 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1871 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
| 1872 __ PopDouble(reg); | 1872 __ PopDouble(reg); |
| 1873 } | 1873 } |
| 1874 | 1874 |
| 1875 | 1875 |
| 1876 #undef __ | 1876 #undef __ |
| 1877 | 1877 |
| 1878 } // namespace dart | 1878 } // namespace dart |
| 1879 | 1879 |
| 1880 #endif // defined TARGET_ARCH_ARM64 | 1880 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |