Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: runtime/vm/flow_graph_compiler_arm.cc

Issue 120723003: Refactors CPU feature detection. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "vm/compiler.h" 11 #include "vm/compiler.h"
12 #include "vm/cpu.h"
12 #include "vm/dart_entry.h" 13 #include "vm/dart_entry.h"
13 #include "vm/deopt_instructions.h" 14 #include "vm/deopt_instructions.h"
14 #include "vm/il_printer.h" 15 #include "vm/il_printer.h"
15 #include "vm/locations.h" 16 #include "vm/locations.h"
16 #include "vm/object_store.h" 17 #include "vm/object_store.h"
17 #include "vm/parser.h" 18 #include "vm/parser.h"
18 #include "vm/stack_frame.h" 19 #include "vm/stack_frame.h"
19 #include "vm/stub_code.h" 20 #include "vm/stub_code.h"
20 #include "vm/symbols.h" 21 #include "vm/symbols.h"
21 22
(...skipping 15 matching lines...) Expand all
37 } 38 }
38 } 39 }
39 40
40 41
41 bool FlowGraphCompiler::SupportsUnboxedMints() { 42 bool FlowGraphCompiler::SupportsUnboxedMints() {
42 return false; 43 return false;
43 } 44 }
44 45
45 46
46 bool FlowGraphCompiler::SupportsUnboxedFloat32x4() { 47 bool FlowGraphCompiler::SupportsUnboxedFloat32x4() {
47 return CPUFeatures::neon_supported() && FLAG_enable_simd_inline; 48 return TargetCPUFeatures::neon_supported() && FLAG_enable_simd_inline;
48 } 49 }
49 50
50 51
51 bool FlowGraphCompiler::SupportsSinCos() { 52 bool FlowGraphCompiler::SupportsSinCos() {
52 return false; 53 return false;
53 } 54 }
54 55
55 56
56 RawDeoptInfo* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler, 57 RawDeoptInfo* CompilerDeoptInfo::CreateDeoptInfo(FlowGraphCompiler* compiler,
57 DeoptInfoBuilder* builder, 58 DeoptInfoBuilder* builder,
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 __ Drop(6); 712 __ Drop(6);
712 __ Pop(R0); 713 __ Pop(R0);
713 714
714 __ Bind(&is_assignable); 715 __ Bind(&is_assignable);
715 // Restore instantiator (R2) and its type arguments (R1). 716 // Restore instantiator (R2) and its type arguments (R1).
716 __ PopList((1 << R1) | (1 << R2)); 717 __ PopList((1 << R1) | (1 << R2));
717 } 718 }
718 719
719 720
720 void FlowGraphCompiler::EmitInstructionEpilogue(Instruction* instr) { 721 void FlowGraphCompiler::EmitInstructionEpilogue(Instruction* instr) {
721 if (is_optimizing()) return; 722 if (is_optimizing()) {
723 return;
724 }
722 Definition* defn = instr->AsDefinition(); 725 Definition* defn = instr->AsDefinition();
723 if ((defn != NULL) && defn->is_used()) { 726 if ((defn != NULL) && defn->is_used()) {
724 __ Push(defn->locs()->out().reg()); 727 __ Push(defn->locs()->out().reg());
725 } 728 }
726 } 729 }
727 730
728 731
729 // Input parameters: 732 // Input parameters:
730 // R4: arguments descriptor array. 733 // R4: arguments descriptor array.
731 void FlowGraphCompiler::CopyParameters() { 734 void FlowGraphCompiler::CopyParameters() {
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after
1820 DRegister dreg = EvenDRegisterOf(reg); 1823 DRegister dreg = EvenDRegisterOf(reg);
1821 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1824 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1822 } 1825 }
1823 1826
1824 1827
1825 #undef __ 1828 #undef __
1826 1829
1827 } // namespace dart 1830 } // namespace dart
1828 1831
1829 #endif // defined TARGET_ARCH_ARM 1832 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698