Title: [95153] trunk/Source/_javascript_Core
Revision
95153
Author
[email protected]
Date
2011-09-14 19:40:46 -0700 (Wed, 14 Sep 2011)

Log Message

Port MachineStackMarker to Windows ARM and MIPS
https://bugs.webkit.org/show_bug.cgi?id=68068

Reviewed by Geoffrey Garen.

Use the correct memeber of the CONTEXT struct for the stackpointer for CPU(ARM) and CPU(MIPS).
Only query CONTEXT_INTEGER and CONTEXT_CONTROL, since CONTEXT_SEGMENTS isn't defined for
CPU(ARM) and CPU(MIPS) and the stackpointer is defined in the CONTEXT_CONTROL section for
CPU(ARM), CPU(X86) and CPU(X86_64) and in the CONTEXT_INTEGER section for CPU(MIPS).

* heap/MachineStackMarker.cpp:
(JSC::getPlatformThreadRegisters):
(JSC::otherThreadStackPointer):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (95152 => 95153)


--- trunk/Source/_javascript_Core/ChangeLog	2011-09-15 02:34:02 UTC (rev 95152)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-09-15 02:40:46 UTC (rev 95153)
@@ -1,3 +1,19 @@
+2011-09-14  Patrick Gansterer  <[email protected]>
+
+        Port MachineStackMarker to Windows ARM and MIPS
+        https://bugs.webkit.org/show_bug.cgi?id=68068
+
+        Reviewed by Geoffrey Garen.
+
+        Use the correct memeber of the CONTEXT struct for the stackpointer for CPU(ARM) and CPU(MIPS).
+        Only query CONTEXT_INTEGER and CONTEXT_CONTROL, since CONTEXT_SEGMENTS isn't defined for
+        CPU(ARM) and CPU(MIPS) and the stackpointer is defined in the CONTEXT_CONTROL section for
+        CPU(ARM), CPU(X86) and CPU(X86_64) and in the CONTEXT_INTEGER section for CPU(MIPS).
+
+        * heap/MachineStackMarker.cpp:
+        (JSC::getPlatformThreadRegisters):
+        (JSC::otherThreadStackPointer):
+
 2011-09-12  Filip Pizlo  <[email protected]>
 
         DFG JIT always speculates that ValueAdd is a numeric addition

Modified: trunk/Source/_javascript_Core/heap/MachineStackMarker.cpp (95152 => 95153)


--- trunk/Source/_javascript_Core/heap/MachineStackMarker.cpp	2011-09-15 02:34:02 UTC (rev 95152)
+++ trunk/Source/_javascript_Core/heap/MachineStackMarker.cpp	2011-09-15 02:40:46 UTC (rev 95153)
@@ -364,7 +364,7 @@
 // end OS(DARWIN)
 
 #elif OS(WINDOWS)
-    regs.ContextFlags = CONTEXT_INTEGER | CONTEXT_CONTROL | CONTEXT_SEGMENTS;
+    regs.ContextFlags = CONTEXT_INTEGER | CONTEXT_CONTROL;
     GetThreadContext(platformThread, &regs);
     return sizeof(CONTEXT);
 #elif USE(PTHREADS)
@@ -415,10 +415,20 @@
 #endif // __DARWIN_UNIX03
 
 // end OS(DARWIN)
-#elif CPU(X86) && OS(WINDOWS)
+#elif OS(WINDOWS)
+
+#if CPU(ARM)
+    return reinterpret_cast<void*>((uintptr_t) regs.Sp);
+#elif CPU(MIPS)
+    return reinterpret_cast<void*>((uintptr_t) regs.IntSp);
+#elif CPU(X86)
     return reinterpret_cast<void*>((uintptr_t) regs.Esp);
-#elif CPU(X86_64) && OS(WINDOWS)
+#elif CPU(X86_64)
     return reinterpret_cast<void*>((uintptr_t) regs.Rsp);
+#else
+#error Unknown Architecture
+#endif
+
 #elif USE(PTHREADS)
     void* stackBase = 0;
     size_t stackSize = 0;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to