[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kjs
From:       Ralf Habacker <Ralf.Habacker () freenet ! de>
Date:       2010-04-26 8:26:25
Message-ID: 20100426082625.7D679AC8A4 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1118924 by habacker:

replaced windows related asm code with a function provided by ntdll

 M  +4 -12     collector.cpp  


--- trunk/KDE/kdelibs/kjs/collector.cpp #1118923:1118924
@@ -46,6 +46,7 @@
 #elif PLATFORM(WIN_OS) || COMPILER(CYGWIN)
 
 #include <windows.h>
+#include <winnt.h>
 
 #elif PLATFORM(UNIX)
 
@@ -483,19 +484,10 @@
 #if PLATFORM(DARWIN)
     pthread_t thread = pthread_self();
     void *stackBase = pthread_get_stackaddr_np(thread);
-#elif PLATFORM(WIN_OS) && PLATFORM(X86) && COMPILER(MSVC)
-    NT_TIB *pTib;
-    __asm {
-        MOV EAX, FS:[18h]
-        MOV pTib, EAX
-    }
+#elif PLATFORM(WIN_OS)
+    // tested with mingw32, mingw64, msvc2008, cygwin
+    NT_TIB *pTib = (NT_TIB*)NtCurrentTeb();
     void *stackBase = (void *)pTib->StackBase;
-#elif (PLATFORM(WIN_OS) || COMPILER(CYGWIN)) && PLATFORM(X86) && COMPILER(GCC)
-    NT_TIB *pTib;
-		__asm__("movl  %%fs:0x18,%0"
-						: "=r" (pTib)
-		);
-		void *stackBase = (void *)pTib->StackBase;
 #elif PLATFORM(SOLARIS_OS)
     stack_t s;
     thr_stksegment(&s);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic