summaryrefslogtreecommitdiff
path: root/deps/v8/src/platform-linux.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-02-19 10:29:41 -0800
committerRyan Dahl <ry@tinyclouds.org>2010-02-19 10:40:48 -0800
commitbcf163da27676e26108ec430a392baee84f2831c (patch)
tree1afc6af6d5b53247b25ecb9f2f14f88c9fd532f5 /deps/v8/src/platform-linux.cc
parent764783560ed8d2cd523e715567938f2c3afbb8d0 (diff)
downloadnode-new-bcf163da27676e26108ec430a392baee84f2831c.tar.gz
Upgrade V8 to 2.1.1
Diffstat (limited to 'deps/v8/src/platform-linux.cc')
-rw-r--r--deps/v8/src/platform-linux.cc17
1 files changed, 15 insertions, 2 deletions
diff --git a/deps/v8/src/platform-linux.cc b/deps/v8/src/platform-linux.cc
index 005b1deb6b..e890f94aad 100644
--- a/deps/v8/src/platform-linux.cc
+++ b/deps/v8/src/platform-linux.cc
@@ -89,6 +89,8 @@ uint64_t OS::CpuFeaturesImpliedByPlatform() {
// Here gcc is telling us that we are on an ARM and gcc is assuming that we
// have VFP3 instructions. If gcc can assume it then so can we.
return 1u << VFP3;
+#elif CAN_USE_ARMV7_INSTRUCTIONS
+ return 1u << ARMv7;
#else
return 0; // Linux runs on anything.
#endif
@@ -113,6 +115,9 @@ bool OS::ArmCpuHasFeature(CpuFeature feature) {
case VFP3:
search_string = "vfp";
break;
+ case ARMv7:
+ search_string = "ARMv7";
+ break;
default:
UNREACHABLE();
}
@@ -151,11 +156,12 @@ int OS::ActivationFrameAlignment() {
// On EABI ARM targets this is required for fp correctness in the
// runtime system.
return 8;
-#else
+#elif V8_TARGET_ARCH_MIPS
+ return 8;
+#endif
// With gcc 4.4 the tree vectorization optimiser can generate code
// that requires 16 byte alignment such as movdqa on x86.
return 16;
-#endif
}
@@ -262,6 +268,8 @@ void OS::DebugBreak() {
// which is the architecture of generated code).
#if defined(__arm__) || defined(__thumb__)
asm("bkpt 0");
+#elif defined(__mips__)
+ asm("break");
#else
asm("int $3");
#endif
@@ -713,6 +721,7 @@ static inline bool IsVmThread() {
static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
+#ifndef V8_HOST_ARCH_MIPS
USE(info);
if (signal != SIGPROF) return;
if (active_sampler_ == NULL) return;
@@ -743,6 +752,9 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
sample.sp = reinterpret_cast<Address>(mcontext.arm_sp);
sample.fp = reinterpret_cast<Address>(mcontext.arm_fp);
#endif
+#elif V8_HOST_ARCH_MIPS
+ // Implement this on MIPS.
+ UNIMPLEMENTED();
#endif
if (IsVmThread())
active_sampler_->SampleStack(&sample);
@@ -752,6 +764,7 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
sample.state = Logger::state();
active_sampler_->Tick(&sample);
+#endif
}