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

Unified Diff: src/arm/assembler-arm.cc

Issue 1094014: Merge the partial_snapshots branch back into bleeding_edge. For... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 9 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
Index: src/arm/assembler-arm.cc
===================================================================
--- src/arm/assembler-arm.cc (revision 4215)
+++ src/arm/assembler-arm.cc (working copy)
@@ -47,21 +47,41 @@
unsigned CpuFeatures::enabled_ = 0;
unsigned CpuFeatures::found_by_runtime_probing_ = 0;
+
+#ifdef __arm__
+static uint64_t CpuFeaturesImpliedByCompiler() {
+ uint64_t answer = 0;
+#ifdef CAN_USE_ARMV7_INSTRUCTIONS
+ answer |= 1u << ARMv7;
+#endif // def CAN_USE_ARMV7_INSTRUCTIONS
+ // If the compiler is allowed to use VFP then we can use VFP too in our code
+ // generation even when generating snapshots. This won't work for cross
+ // compilation.
+#if defined(__VFP_FP__) && !defined(__SOFTFP__)
+ answer |= 1u << VFP3;
+#endif // defined(__VFP_FP__) && !defined(__SOFTFP__)
+#ifdef CAN_USE_VFP_INSTRUCTIONS
+ answer |= 1u << VFP3;
+#endif // def CAN_USE_VFP_INSTRUCTIONS
+ return answer;
+}
+#endif // def __arm__
+
+
void CpuFeatures::Probe() {
- // If the compiler is allowed to use vfp then we can use vfp too in our
- // code generation.
-#if !defined(__arm__)
+#ifndef __arm__
// For the simulator=arm build, use VFP when FLAG_enable_vfp3 is enabled.
if (FLAG_enable_vfp3) {
- supported_ |= 1u << VFP3;
+ supported_ |= 1u << VFP3;
}
// For the simulator=arm build, use ARMv7 when FLAG_enable_armv7 is enabled
if (FLAG_enable_armv7) {
- supported_ |= 1u << ARMv7;
+ supported_ |= 1u << ARMv7;
}
-#else
+#else // def __arm__
if (Serializer::enabled()) {
supported_ |= OS::CpuFeaturesImpliedByPlatform();
+ supported_ |= CpuFeaturesImpliedByCompiler();
return; // No features if we might serialize.
}
@@ -532,7 +552,7 @@
if (!Serializer::enabled()) {
Serializer::TooLateToEnableNow();
}
-#endif
+#endif // def DEBUG
return Serializer::enabled();
} else if (rmode == RelocInfo::NONE) {
return false;
@@ -1137,14 +1157,16 @@
// Exception-generating instructions and debugging support.
void Assembler::stop(const char* msg) {
-#if !defined(__arm__)
+#ifndef __arm__
// The simulator handles these special instructions and stops execution.
emit(15 << 28 | ((intptr_t) msg));
-#else
- // Just issue a simple break instruction for now. Alternatively we could use
- // the swi(0x9f0001) instruction on Linux.
+#else // def __arm__
+#ifdef CAN_USE_ARMV5_INSTRUCTIONS
bkpt(0);
-#endif
+#else // ndef CAN_USE_ARMV5_INSTRUCTIONS
+ swi(0x9f0001);
+#endif // ndef CAN_USE_ARMV5_INSTRUCTIONS
+#endif // def __arm__
}

Powered by Google App Engine
This is Rietveld 408576698