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" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/cpuinfo.h" | 10 #include "vm/cpuinfo.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 arm_version_ = ARMv5TE; | 94 arm_version_ = ARMv5TE; |
95 // On ARMv5, the PC read offset in an STR or STM instruction is either 8 or | 95 // On ARMv5, the PC read offset in an STR or STM instruction is either 8 or |
96 // 12 bytes depending on the implementation. On the Mindstorm EV3 it is 12 | 96 // 12 bytes depending on the implementation. On the Mindstorm EV3 it is 12 |
97 // bytes. | 97 // bytes. |
98 store_pc_read_offset_ = 12; | 98 store_pc_read_offset_ = 12; |
99 } else if (CpuInfo::FieldContains(kCpuInfoProcessor, "Feroceon 88FR131") || | 99 } else if (CpuInfo::FieldContains(kCpuInfoProcessor, "Feroceon 88FR131") || |
100 CpuInfo::FieldContains(kCpuInfoModel, "Feroceon 88FR131")) { | 100 CpuInfo::FieldContains(kCpuInfoModel, "Feroceon 88FR131")) { |
101 // This is for the DGBox. For the time-being, assume it is similar to the | 101 // This is for the DGBox. For the time-being, assume it is similar to the |
102 // Lego Mindstorm. | 102 // Lego Mindstorm. |
103 arm_version_ = ARMv5TE; | 103 arm_version_ = ARMv5TE; |
104 // TODO(zra): Verify with DGLogik that this is correct. | |
105 store_pc_read_offset_ = 12; | 104 store_pc_read_offset_ = 12; |
106 } else if (CpuInfo::FieldContains(kCpuInfoProcessor, "ARMv6") || | 105 } else if (CpuInfo::FieldContains(kCpuInfoProcessor, "ARMv6") || |
107 CpuInfo::FieldContains(kCpuInfoModel, "ARMv6")) { | 106 CpuInfo::FieldContains(kCpuInfoModel, "ARMv6")) { |
108 // Raspberry Pi, etc. | 107 // Raspberry Pi, etc. |
109 arm_version_ = ARMv6; | 108 arm_version_ = ARMv6; |
110 } else { | 109 } else { |
111 ASSERT(CpuInfo::FieldContains(kCpuInfoProcessor, "ARMv7") || | 110 ASSERT(CpuInfo::FieldContains(kCpuInfoProcessor, "ARMv7") || |
112 CpuInfo::FieldContains(kCpuInfoModel, "ARMv7")); | 111 CpuInfo::FieldContains(kCpuInfoModel, "ARMv7")); |
113 arm_version_ = ARMv7; | 112 arm_version_ = ARMv7; |
114 } | 113 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 ASSERT(hardware_ != NULL); | 187 ASSERT(hardware_ != NULL); |
189 free(const_cast<char*>(hardware_)); | 188 free(const_cast<char*>(hardware_)); |
190 hardware_ = NULL; | 189 hardware_ = NULL; |
191 CpuInfo::Cleanup(); | 190 CpuInfo::Cleanup(); |
192 } | 191 } |
193 #endif // defined(HOST_ARCH_ARM) | 192 #endif // defined(HOST_ARCH_ARM) |
194 | 193 |
195 } // namespace dart | 194 } // namespace dart |
196 | 195 |
197 #endif // defined TARGET_ARCH_ARM | 196 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |