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

Side by Side Diff: src/arm/assembler-arm.cc

Issue 340373002: [Arm]: Simplify compile-time Arm feature detection. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | « build/toolchain.gypi ('k') | src/flag-definitions.h » ('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) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 if (FLAG_enable_32dregs && cpu.has_vfp3_d32()) supported_ |= 1u << VFP32DREGS; 123 if (FLAG_enable_32dregs && cpu.has_vfp3_d32()) supported_ |= 1u << VFP32DREGS;
124 #endif 124 #endif
125 125
126 ASSERT(!IsSupported(VFP3) || IsSupported(ARMv7)); 126 ASSERT(!IsSupported(VFP3) || IsSupported(ARMv7));
127 } 127 }
128 128
129 129
130 void CpuFeatures::PrintTarget() { 130 void CpuFeatures::PrintTarget() {
131 const char* arm_arch = NULL; 131 const char* arm_arch = NULL;
132 const char* arm_test = ""; 132 const char* arm_target_type = "";
133 const char* arm_no_probe = "";
133 const char* arm_fpu = ""; 134 const char* arm_fpu = "";
134 const char* arm_thumb = ""; 135 const char* arm_thumb = "";
135 const char* arm_float_abi = NULL; 136 const char* arm_float_abi = NULL;
136 137
138 #if !defined __arm__
139 arm_target_type = " simulator";
140 #endif
141
142 #if defined ARM_TEST_NO_FEATURE_PROBE
143 arm_no_probe = " noprobe";
144 #endif
145
137 #if defined CAN_USE_ARMV7_INSTRUCTIONS 146 #if defined CAN_USE_ARMV7_INSTRUCTIONS
138 arm_arch = "arm v7"; 147 arm_arch = "arm v7";
139 #else 148 #else
140 arm_arch = "arm v6"; 149 arm_arch = "arm v6";
141 #endif 150 #endif
142 151
143 #ifdef __arm__ 152 #if defined CAN_USE_NEON
144
145 # ifdef ARM_TEST
146 arm_test = " test";
147 # endif
148 # if defined __ARM_NEON__
149 arm_fpu = " neon"; 153 arm_fpu = " neon";
150 # elif defined CAN_USE_VFP3_INSTRUCTIONS 154 #elif defined CAN_USE_VFP3_INSTRUCTIONS
151 arm_fpu = " vfp3";
152 # else
153 arm_fpu = " vfp2";
154 # endif
155 # if (defined __thumb__) || (defined __thumb2__)
156 arm_thumb = " thumb";
157 # endif
158 arm_float_abi = OS::ArmUsingHardFloat() ? "hard" : "softfp";
159
160 #else // __arm__
161
162 arm_test = " simulator";
163 # if defined CAN_USE_VFP3_INSTRUCTIONS
164 # if defined CAN_USE_VFP32DREGS 155 # if defined CAN_USE_VFP32DREGS
165 arm_fpu = " vfp3"; 156 arm_fpu = " vfp3";
166 # else 157 # else
167 arm_fpu = " vfp3-d16"; 158 arm_fpu = " vfp3-d16";
168 # endif 159 # endif
169 # else 160 #else
170 arm_fpu = " vfp2"; 161 arm_fpu = " vfp2";
171 # endif 162 #endif
172 # if USE_EABI_HARDFLOAT == 1 163
164 #ifdef __arm__
165 arm_float_abi = OS::ArmUsingHardFloat() ? "hard" : "softfp";
166 #elif USE_EABI_HARDFLOAT
173 arm_float_abi = "hard"; 167 arm_float_abi = "hard";
174 # else 168 #else
175 arm_float_abi = "softfp"; 169 arm_float_abi = "softfp";
176 # endif 170 #endif
177 171
178 #endif // __arm__ 172 #if defined __arm__ && (defined __thumb__) || (defined __thumb2__)
173 arm_thumb = " thumb";
174 #endif
179 175
180 printf("target%s %s%s%s %s\n", 176 printf("target%s%s %s%s%s %s\n",
181 arm_test, arm_arch, arm_fpu, arm_thumb, arm_float_abi); 177 arm_target_type, arm_no_probe, arm_arch, arm_fpu, arm_thumb,
178 arm_float_abi);
182 } 179 }
183 180
184 181
185 void CpuFeatures::PrintFeatures() { 182 void CpuFeatures::PrintFeatures() {
186 printf( 183 printf(
187 "ARMv7=%d VFP3=%d VFP32DREGS=%d NEON=%d SUDIV=%d UNALIGNED_ACCESSES=%d " 184 "ARMv7=%d VFP3=%d VFP32DREGS=%d NEON=%d SUDIV=%d UNALIGNED_ACCESSES=%d "
188 "MOVW_MOVT_IMMEDIATE_LOADS=%d", 185 "MOVW_MOVT_IMMEDIATE_LOADS=%d",
189 CpuFeatures::IsSupported(ARMv7), 186 CpuFeatures::IsSupported(ARMv7),
190 CpuFeatures::IsSupported(VFP3), 187 CpuFeatures::IsSupported(VFP3),
191 CpuFeatures::IsSupported(VFP32DREGS), 188 CpuFeatures::IsSupported(VFP32DREGS),
(...skipping 3472 matching lines...) Expand 10 before | Expand all | Expand 10 after
3664 ASSERT((index_64bit == count_of_64bit_) && 3661 ASSERT((index_64bit == count_of_64bit_) &&
3665 (index_code_ptr == (index_64bit + count_of_code_ptr_)) && 3662 (index_code_ptr == (index_64bit + count_of_code_ptr_)) &&
3666 (index_heap_ptr == (index_code_ptr + count_of_heap_ptr_)) && 3663 (index_heap_ptr == (index_code_ptr + count_of_heap_ptr_)) &&
3667 (index_32bit == (index_heap_ptr + count_of_32bit_))); 3664 (index_32bit == (index_heap_ptr + count_of_32bit_)));
3668 } 3665 }
3669 3666
3670 3667
3671 } } // namespace v8::internal 3668 } } // namespace v8::internal
3672 3669
3673 #endif // V8_TARGET_ARCH_ARM 3670 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « build/toolchain.gypi ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698