OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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" |
11 #include "vm/ast_printer.h" | 11 #include "vm/ast_printer.h" |
12 #include "vm/il_printer.h" | 12 #include "vm/il_printer.h" |
13 #include "vm/locations.h" | 13 #include "vm/locations.h" |
14 #include "vm/object_store.h" | 14 #include "vm/object_store.h" |
15 #include "vm/parser.h" | 15 #include "vm/parser.h" |
16 #include "vm/stub_code.h" | 16 #include "vm/stub_code.h" |
17 #include "vm/symbols.h" | 17 #include "vm/symbols.h" |
18 | 18 |
19 namespace dart { | 19 namespace dart { |
20 | 20 |
21 DECLARE_FLAG(bool, print_ast); | 21 DECLARE_FLAG(bool, print_ast); |
22 DECLARE_FLAG(bool, print_scopes); | 22 DECLARE_FLAG(bool, print_scopes); |
23 DECLARE_FLAG(bool, reject_named_argument_as_positional); | 23 DECLARE_FLAG(bool, reject_named_argument_as_positional); |
24 DECLARE_FLAG(bool, trace_functions); | 24 DECLARE_FLAG(bool, trace_functions); |
25 DECLARE_FLAG(bool, use_sse41); | |
26 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization."); | 25 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization."); |
27 DEFINE_FLAG(bool, unbox_mints, true, "Optimize 64-bit integer arithmetic."); | 26 DEFINE_FLAG(bool, unbox_mints, true, "Optimize 64-bit integer arithmetic."); |
28 | 27 |
29 | 28 |
30 bool FlowGraphCompiler::SupportsUnboxedMints() { | 29 bool FlowGraphCompiler::SupportsUnboxedMints() { |
31 // Support unboxed mints when SSE 4.1 is available. | 30 // Support unboxed mints when SSE 4.1 is available. |
32 return FLAG_unbox_mints | 31 return FLAG_unbox_mints && CPUFeatures::sse4_1_supported(); |
33 && CPUFeatures::sse4_1_supported() | |
34 && FLAG_use_sse41; | |
35 } | 32 } |
36 | 33 |
37 | 34 |
38 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, | 35 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, |
39 intptr_t stub_ix) { | 36 intptr_t stub_ix) { |
40 // Calls do not need stubs, they share a deoptimization trampoline. | 37 // Calls do not need stubs, they share a deoptimization trampoline. |
41 ASSERT(reason() != kDeoptAtCall); | 38 ASSERT(reason() != kDeoptAtCall); |
42 Assembler* assem = compiler->assembler(); | 39 Assembler* assem = compiler->assembler(); |
43 #define __ assem-> | 40 #define __ assem-> |
44 __ Comment("Deopt stub for id %"Pd"", deopt_id()); | 41 __ Comment("Deopt stub for id %"Pd"", deopt_id()); |
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1384 __ popl(ECX); | 1381 __ popl(ECX); |
1385 __ popl(EAX); | 1382 __ popl(EAX); |
1386 } | 1383 } |
1387 | 1384 |
1388 | 1385 |
1389 #undef __ | 1386 #undef __ |
1390 | 1387 |
1391 } // namespace dart | 1388 } // namespace dart |
1392 | 1389 |
1393 #endif // defined TARGET_ARCH_IA32 | 1390 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |