| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 14 matching lines...) Expand all Loading... |
| 25 DECLARE_FLAG(bool, print_ast); | 25 DECLARE_FLAG(bool, print_ast); |
| 26 DECLARE_FLAG(bool, print_scopes); | 26 DECLARE_FLAG(bool, print_scopes); |
| 27 DECLARE_FLAG(bool, enable_type_checks); | 27 DECLARE_FLAG(bool, enable_type_checks); |
| 28 DECLARE_FLAG(bool, eliminate_type_checks); | 28 DECLARE_FLAG(bool, eliminate_type_checks); |
| 29 | 29 |
| 30 | 30 |
| 31 FlowGraphCompiler::~FlowGraphCompiler() { | 31 FlowGraphCompiler::~FlowGraphCompiler() { |
| 32 // BlockInfos are zone-allocated, so their destructors are not called. | 32 // BlockInfos are zone-allocated, so their destructors are not called. |
| 33 // Verify the labels explicitly here. | 33 // Verify the labels explicitly here. |
| 34 for (int i = 0; i < block_info_.length(); ++i) { | 34 for (int i = 0; i < block_info_.length(); ++i) { |
| 35 ASSERT(!block_info_[i]->label.IsLinked()); | 35 ASSERT(!block_info_[i]->jump_label()->IsLinked()); |
| 36 ASSERT(!block_info_[i]->label.HasNear()); | 36 ASSERT(!block_info_[i]->jump_label()->HasNear()); |
| 37 } | 37 } |
| 38 } | 38 } |
| 39 | 39 |
| 40 | 40 |
| 41 bool FlowGraphCompiler::SupportsUnboxedMints() { | 41 bool FlowGraphCompiler::SupportsUnboxedMints() { |
| 42 // Support unboxed mints when SSE 4.1 is available. | 42 // Support unboxed mints when SSE 4.1 is available. |
| 43 return FLAG_unbox_mints && CPUFeatures::sse4_1_supported(); | 43 return FLAG_unbox_mints && CPUFeatures::sse4_1_supported(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 | 46 |
| (...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 | 1430 |
| 1431 | 1431 |
| 1432 void FlowGraphCompiler::EmitDoubleCompareBranch(Condition true_condition, | 1432 void FlowGraphCompiler::EmitDoubleCompareBranch(Condition true_condition, |
| 1433 FpuRegister left, | 1433 FpuRegister left, |
| 1434 FpuRegister right, | 1434 FpuRegister right, |
| 1435 BranchInstr* branch) { | 1435 BranchInstr* branch) { |
| 1436 ASSERT(branch != NULL); | 1436 ASSERT(branch != NULL); |
| 1437 assembler()->comisd(left, right); | 1437 assembler()->comisd(left, right); |
| 1438 BlockEntryInstr* nan_result = (true_condition == NOT_EQUAL) ? | 1438 BlockEntryInstr* nan_result = (true_condition == NOT_EQUAL) ? |
| 1439 branch->true_successor() : branch->false_successor(); | 1439 branch->true_successor() : branch->false_successor(); |
| 1440 assembler()->j(PARITY_EVEN, GetBlockLabel(nan_result)); | 1440 assembler()->j(PARITY_EVEN, GetJumpLabel(nan_result)); |
| 1441 branch->EmitBranchOnCondition(this, true_condition); | 1441 branch->EmitBranchOnCondition(this, true_condition); |
| 1442 } | 1442 } |
| 1443 | 1443 |
| 1444 | 1444 |
| 1445 | 1445 |
| 1446 void FlowGraphCompiler::EmitDoubleCompareBool(Condition true_condition, | 1446 void FlowGraphCompiler::EmitDoubleCompareBool(Condition true_condition, |
| 1447 FpuRegister left, | 1447 FpuRegister left, |
| 1448 FpuRegister right, | 1448 FpuRegister right, |
| 1449 Register result) { | 1449 Register result) { |
| 1450 assembler()->comisd(left, right); | 1450 assembler()->comisd(left, right); |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1721 __ popl(ECX); | 1721 __ popl(ECX); |
| 1722 __ popl(EAX); | 1722 __ popl(EAX); |
| 1723 } | 1723 } |
| 1724 | 1724 |
| 1725 | 1725 |
| 1726 #undef __ | 1726 #undef __ |
| 1727 | 1727 |
| 1728 } // namespace dart | 1728 } // namespace dart |
| 1729 | 1729 |
| 1730 #endif // defined TARGET_ARCH_IA32 | 1730 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |