summaryrefslogtreecommitdiff
path: root/src/win95/pentime.h
diff options
context:
space:
mode:
authorSteven Fuller <relnev@icculus.org>2001-08-07 03:16:27 +0000
committerPatryk Obara <dreamer.tan@gmail.com>2019-08-20 02:22:36 +0200
commit78cdb29e7aa6860640b9ab77994b17b22840cf11 (patch)
treee814bcff1ea12e5123f81156bb671f76f3b2ea85 /src/win95/pentime.h
parent455f56573ef8378ad1297970829e227c80525959 (diff)
Removed several unused files.
Diffstat (limited to 'src/win95/pentime.h')
-rw-r--r--src/win95/pentime.h64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/win95/pentime.h b/src/win95/pentime.h
deleted file mode 100644
index 8c66961..0000000
--- a/src/win95/pentime.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* pentime.h */
-extern unsigned long int rdtsc_lo(void);
-extern unsigned long int rdtsc_hi(void);
-extern unsigned long int rdtsc_mid(void);
-
-#define ProfileStart() \
-{ \
- int time = rdtsc_lo();
-#define ProfileStop(x) \
- textprint("%s %d\n",x,rdtsc_lo()-time); \
-}
-
-#pragma aux rdtsc_lo = \
- "db 0fh, 31h" \
- value [eax] \
- modify [edx];
-
-#pragma aux rdtsc_hi = \
- "db 0fh, 31h" \
- value [edx] \
- modify [eax];
-
-#pragma aux rdtsc_mid = \
- "db 0fh, 31h" \
- "shr eax, 10h" \
- "shl edx, 10h" \
- "add eax, edx" \
- value [eax] \
- modify [edx];
-
-/* Test to see if we have a Pentium or not. Note that this test is reliable
- * enough for a tools project (where we can put in an overide switch) but not
- * for a released product.
- */
-extern unsigned char Pentium(void);
-#pragma aux Pentium = \
- "pushfd" \
- "pop eax" \
- "or eax, 00200000h" \
- "push eax" \
- "popfd" \
- "pushfd" \
- "pop eax" \
- "mov ecx, eax" \
- "and eax, 00200000h" \
- "cmp eax, 0" \
- "je not_Pentium" \
- "mov eax, ecx" \
- "and eax, 0ffdfffffh" \
- "push eax" \
- "popfd" \
- "pushfd" \
- "pop eax" \
- "and eax, 00200000h" \
- "cmp eax, 0" \
- "jne not_Pentium" \
- "is_Pentium: mov al, 1" \
- "jmp finish" \
- "not_Pentium: mov al, 0" \
- "finish: nop" \
- value [al] \
- modify [eax ecx]
-
-