2008-06-05 Antti Koivisto <antti@apple.com>
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jun 2008 00:50:29 +0000 (00:50 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jun 2008 00:50:29 +0000 (00:50 +0000)
        Reviewed by Darin.

        Support compiling JavaScriptCore for ARM.

        * kjs/collector.cpp:
        (KJS::getPlatformThreadRegisters):
        (KJS::otherThreadStackPointer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34395 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/kjs/collector.cpp

index 479cd3ec83abd10f456f401a03114a8a2c4b52ab..5eeb0aa3755eceef3192e8111bdb35afdad746b8 100644 (file)
@@ -1,3 +1,13 @@
+2008-06-05  Antti Koivisto  <antti@apple.com>
+
+        Reviewed by Darin.
+        
+        Support compiling JavaScriptCore for ARM.
+
+        * kjs/collector.cpp:
+        (KJS::getPlatformThreadRegisters):
+        (KJS::otherThreadStackPointer):
+
 2008-06-05  Kevin McCullough  <kmccullough@apple.com>
 
         Reviewed by Jon.
index 1522bede9264f93a4d5b5419bcfb2175e1d20472..17d6606c00ad13bd56146c191db075d8818e78a5 100644 (file)
@@ -599,6 +599,8 @@ typedef x86_thread_state64_t PlatformThreadRegisters;
 typedef ppc_thread_state_t PlatformThreadRegisters;
 #elif   PLATFORM(PPC64)
 typedef ppc_thread_state64_t PlatformThreadRegisters;
+#elif   PLATFORM(ARM)
+typedef arm_thread_state_t PlatformThreadRegisters;
 #else
 #error Unknown Architecture
 #endif
@@ -625,6 +627,9 @@ size_t getPlatformThreadRegisters(const PlatformThread& platformThread, Platform
 #elif   PLATFORM(PPC64)
     unsigned user_count = PPC_THREAD_STATE64_COUNT;
     thread_state_flavor_t flavor = PPC_THREAD_STATE64;
+#elif   PLATFORM(ARM)
+    unsigned user_count = ARM_THREAD_STATE_COUNT;
+    thread_state_flavor_t flavor = ARM_THREAD_STATE;
 #else
 #error Unknown Architecture
 #endif
@@ -659,6 +664,8 @@ static inline void* otherThreadStackPointer(const PlatformThreadRegisters& regs)
     return (void*)regs.__rsp;
 #elif PLATFORM(PPC) || PLATFORM(PPC64)
     return (void*)regs.__r1;
+#elif PLATFORM(ARM)
+    return (void*)regs.__sp;
 #else
 #error Unknown Architecture
 #endif