AbstractOperatingSystem.st
changeset 18229 872eb9c8e3b7
parent 18186 59b07c61d875
child 18237 8457ae63fa44
child 18277 8c839dd755f4
--- a/AbstractOperatingSystem.st	Sun Apr 19 11:45:21 2015 +0200
+++ b/AbstractOperatingSystem.st	Sun Apr 19 11:46:54 2015 +0200
@@ -5998,6 +5998,13 @@
 %{  /* NOCONTEXT */
     unsigned INT low, high;
 
+#ifdef __x86_64__
+# if defined(__GCC__)
+    asm volatile("rdtsc" : "=a"(low), "=d"(high));
+    RETURN ( __MKUINT(low + (high << 32)) );
+# endif
+#endif
+
 #ifdef i386
     // use RDTSC instruction (retrieves 64bit cycle count; hi in EDX, lo in EAX)
 
@@ -6007,21 +6014,16 @@
     _asm { mov low,eax };
     _asm { mov high,edx };
     _asm { pop edx };
-# elif defined(__MINGW_H) || defined(__GNUC__)
+# else
+#  if defined(__MINGW_H) || defined(__GNUC__)
     asm volatile("rdtsc" : "=a"(low), "=d"(high));
-# else
+#  else
     goto unsupported;
+#  endif
 # endif
     RETURN ( __MKLARGEINT64(1, low, high) );
 #endif /* i386 */
 
-#ifdef __x86_64__
-# if defined(__GCC__)
-    asm volatile("rdtsc" : "=a"(low), "=d"(high));
-    RETURN ( __MKUINT(low + (high << 32)) );
-# endif
-#endif
-
 unsupported: ;
 %}.
     self primitiveFailed:'no CPU cycle register on this architecture'
@@ -7724,11 +7726,11 @@
 !AbstractOperatingSystem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.296 2015-04-07 10:21:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.297 2015-04-19 09:46:54 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.296 2015-04-07 10:21:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AbstractOperatingSystem.st,v 1.297 2015-04-19 09:46:54 cg Exp $'
 ! !