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

Side by Side Diff: runtime/vm/cpu_arm.h

Issue 467103005: Fixes to support ARMv5 lego mindstorm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/cpu_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef VM_CPU_ARM_H_ 5 #ifndef VM_CPU_ARM_H_
6 #define VM_CPU_ARM_H_ 6 #define VM_CPU_ARM_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/simulator.h" 9 #include "vm/simulator.h"
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 return neon_supported_; 46 return neon_supported_;
47 } 47 }
48 static bool hardfp_supported() { 48 static bool hardfp_supported() {
49 DEBUG_ASSERT(initialized_); 49 DEBUG_ASSERT(initialized_);
50 return hardfp_supported_; 50 return hardfp_supported_;
51 } 51 }
52 static ARMVersion arm_version() { 52 static ARMVersion arm_version() {
53 DEBUG_ASSERT(initialized_); 53 DEBUG_ASSERT(initialized_);
54 return arm_version_; 54 return arm_version_;
55 } 55 }
56 static intptr_t store_pc_read_offset() {
57 DEBUG_ASSERT(initialized_);
58 return store_pc_read_offset_;
59 }
56 60
57 #if !defined(HOST_ARCH_ARM) 61 #if !defined(HOST_ARCH_ARM)
58 static void set_integer_division_supported(bool supported) { 62 static void set_integer_division_supported(bool supported) {
59 DEBUG_ASSERT(initialized_); 63 DEBUG_ASSERT(initialized_);
60 integer_division_supported_ = supported; 64 integer_division_supported_ = supported;
61 } 65 }
62 static void set_vfp_supported(bool supported) { 66 static void set_vfp_supported(bool supported) {
63 DEBUG_ASSERT(initialized_); 67 DEBUG_ASSERT(initialized_);
64 vfp_supported_ = supported; 68 vfp_supported_ = supported;
65 } 69 }
66 static void set_neon_supported(bool supported) { 70 static void set_neon_supported(bool supported) {
67 DEBUG_ASSERT(initialized_); 71 DEBUG_ASSERT(initialized_);
68 neon_supported_ = supported; 72 neon_supported_ = supported;
69 } 73 }
70 static void set_arm_version(ARMVersion version) { 74 static void set_arm_version(ARMVersion version) {
71 DEBUG_ASSERT(initialized_); 75 DEBUG_ASSERT(initialized_);
72 arm_version_ = version; 76 arm_version_ = version;
73 } 77 }
74 #endif // !defined(HOST_ARCH_ARM) 78 #endif // !defined(HOST_ARCH_ARM)
75 79
76 private: 80 private:
77 static const char* hardware_; 81 static const char* hardware_;
78 static bool integer_division_supported_; 82 static bool integer_division_supported_;
79 static bool vfp_supported_; 83 static bool vfp_supported_;
80 static bool neon_supported_; 84 static bool neon_supported_;
81 static bool hardfp_supported_; 85 static bool hardfp_supported_;
82 static ARMVersion arm_version_; 86 static ARMVersion arm_version_;
87 static intptr_t store_pc_read_offset_;
83 #if defined(DEBUG) 88 #if defined(DEBUG)
84 static bool initialized_; 89 static bool initialized_;
85 #endif 90 #endif
86 }; 91 };
87 92
88 class TargetCPUFeatures : public AllStatic { 93 class TargetCPUFeatures : public AllStatic {
89 public: 94 public:
90 static void InitOnce() { 95 static void InitOnce() {
91 HostCPUFeatures::InitOnce(); 96 HostCPUFeatures::InitOnce();
92 } 97 }
93 static void Cleanup() { 98 static void Cleanup() {
94 HostCPUFeatures::Cleanup(); 99 HostCPUFeatures::Cleanup();
95 } 100 }
96 static bool double_truncate_round_supported() { 101 static bool double_truncate_round_supported() {
97 return false; 102 return false;
98 } 103 }
99 static bool integer_division_supported() { 104 static bool integer_division_supported() {
100 return HostCPUFeatures::integer_division_supported(); 105 return HostCPUFeatures::integer_division_supported();
101 } 106 }
102 static bool vfp_supported() { 107 static bool vfp_supported() {
103 return HostCPUFeatures::vfp_supported(); 108 return HostCPUFeatures::vfp_supported();
104 } 109 }
110 static bool can_divide() {
111 return integer_division_supported() || vfp_supported();
112 }
105 static bool neon_supported() { 113 static bool neon_supported() {
106 return HostCPUFeatures::neon_supported(); 114 return HostCPUFeatures::neon_supported();
107 } 115 }
108 static bool hardfp_supported() { 116 static bool hardfp_supported() {
109 return HostCPUFeatures::hardfp_supported(); 117 return HostCPUFeatures::hardfp_supported();
110 } 118 }
111 static const char* hardware() { 119 static const char* hardware() {
112 return HostCPUFeatures::hardware(); 120 return HostCPUFeatures::hardware();
113 } 121 }
114 static ARMVersion arm_version() { 122 static ARMVersion arm_version() {
115 return HostCPUFeatures::arm_version(); 123 return HostCPUFeatures::arm_version();
116 } 124 }
125 static intptr_t store_pc_read_offset() {
126 return HostCPUFeatures::store_pc_read_offset();
127 }
117 }; 128 };
118 129
119 } // namespace dart 130 } // namespace dart
120 131
121 #endif // VM_CPU_ARM_H_ 132 #endif // VM_CPU_ARM_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/cpu_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698