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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/toolchain.gypi ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/assembler-arm.cc
diff --git a/src/arm/assembler-arm.cc b/src/arm/assembler-arm.cc
index 68738a7f3bbc58395f57fd6f21cd347b46f0e6b2..9751dce1721d7af748f2b3bcafff52e98f3067af 100644
--- a/src/arm/assembler-arm.cc
+++ b/src/arm/assembler-arm.cc
@@ -129,56 +129,53 @@ void CpuFeatures::ProbeImpl(bool cross_compile) {
void CpuFeatures::PrintTarget() {
const char* arm_arch = NULL;
- const char* arm_test = "";
+ const char* arm_target_type = "";
+ const char* arm_no_probe = "";
const char* arm_fpu = "";
const char* arm_thumb = "";
const char* arm_float_abi = NULL;
+#if !defined __arm__
+ arm_target_type = " simulator";
+#endif
+
+#if defined ARM_TEST_NO_FEATURE_PROBE
+ arm_no_probe = " noprobe";
+#endif
+
#if defined CAN_USE_ARMV7_INSTRUCTIONS
arm_arch = "arm v7";
#else
arm_arch = "arm v6";
#endif
-#ifdef __arm__
-
-# ifdef ARM_TEST
- arm_test = " test";
-# endif
-# if defined __ARM_NEON__
+#if defined CAN_USE_NEON
arm_fpu = " neon";
-# elif defined CAN_USE_VFP3_INSTRUCTIONS
- arm_fpu = " vfp3";
-# else
- arm_fpu = " vfp2";
-# endif
-# if (defined __thumb__) || (defined __thumb2__)
- arm_thumb = " thumb";
-# endif
- arm_float_abi = OS::ArmUsingHardFloat() ? "hard" : "softfp";
-
-#else // __arm__
-
- arm_test = " simulator";
-# if defined CAN_USE_VFP3_INSTRUCTIONS
+#elif defined CAN_USE_VFP3_INSTRUCTIONS
# if defined CAN_USE_VFP32DREGS
arm_fpu = " vfp3";
# else
arm_fpu = " vfp3-d16";
# endif
-# else
+#else
arm_fpu = " vfp2";
-# endif
-# if USE_EABI_HARDFLOAT == 1
+#endif
+
+#ifdef __arm__
+ arm_float_abi = OS::ArmUsingHardFloat() ? "hard" : "softfp";
+#elif USE_EABI_HARDFLOAT
arm_float_abi = "hard";
-# else
+#else
arm_float_abi = "softfp";
-# endif
+#endif
-#endif // __arm__
+#if defined __arm__ && (defined __thumb__) || (defined __thumb2__)
+ arm_thumb = " thumb";
+#endif
- printf("target%s %s%s%s %s\n",
- arm_test, arm_arch, arm_fpu, arm_thumb, arm_float_abi);
+ printf("target%s%s %s%s%s %s\n",
+ arm_target_type, arm_no_probe, arm_arch, arm_fpu, arm_thumb,
+ arm_float_abi);
}
« 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