#REFACTORING by cg
authorClaus Gittinger <cg@exept.de>
Wed, 14 Jun 2017 11:45:32 +0200
changeset 21805 5ce0a350e898
parent 21804 92c5bbb60712
child 21806 86a2e0bfd55d
#REFACTORING by cg class: AbstractOperatingSystem class changed: #getCPUCycleCount
AbstractOperatingSystem.st
--- a/AbstractOperatingSystem.st	Tue Jun 13 17:54:16 2017 +0200
+++ b/AbstractOperatingSystem.st	Wed Jun 14 11:45:32 2017 +0200
@@ -6714,10 +6714,10 @@
      Notice, that the # of cycles has to be multiplied by the cycle time (1/cpu-frequency).
 
      For x86:
-	the CPU cycle count register value is returned (RDTSC instruction).
-	answer 0 if RDTSC instruction is not supported (which is unlikely, nowadays).
+        the CPU cycle count register value is returned (RDTSC instruction).
+        answer 0 if RDTSC instruction is not supported (which is unlikely, nowadays).
      For others:
-	answer 0"
+        answer 0"
 
 %{  /* NOCONTEXT */
     unsigned INT low, high;
@@ -6727,7 +6727,7 @@
     RETURN ( __MKUINT(low + (high << 32)) );
 #endif
 
-#ifdef i386
+#if defined(i386) || defined(__x86__)
     // use RDTSC instruction (retrieves 64bit cycle count; hi in EDX, lo in EAX)
 
 # if defined(__BORLANDC__)
@@ -6753,6 +6753,7 @@
     "
 
     "Created: / 05-01-2012 / 13:23:31 / cg"
+    "Modified: / 14-06-2017 / 10:44:48 / cg"
 !
 
 getMicrosecondTime