aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
authorRichard Brooksby2012-09-12 16:06:53 +0100
committerRichard Brooksby2012-09-12 16:06:53 +0100
commit425efaffb3fd0435996ceac88717d854a6dc5f71 (patch)
tree1a5a1667f3e0f086ff116e4a0aa2ed45589905c5 /mps/code
parent13da97d0f2d3b45defc106b7f0adb3a45b3a4cee (diff)
downloademacs-425efaffb3fd0435996ceac88717d854a6dc5f71.tar.gz
emacs-425efaffb3fd0435996ceac88717d854a6dc5f71.zip
Another attempt at a patch for the event clock for really old versions of microsoft c.
Copied from Perforce Change: 179445 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
-rw-r--r--mps/code/eventcom.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/mps/code/eventcom.h b/mps/code/eventcom.h
index d108609715c..ca4af0b6b00 100644
--- a/mps/code/eventcom.h
+++ b/mps/code/eventcom.h
@@ -60,17 +60,17 @@ typedef union EventClockUnion {
60 60
61#else /* _MSC_VER < 1400 */ 61#else /* _MSC_VER < 1400 */
62 62
63/* Fake the __rdtsc intrinsic for old Microsoft C versions. */ 63/* This is mostly a patch for Open Dylan's bootstrap on Windows, which is
64 using Microsoft Visual Studio 6 because of support for CodeView debugging
65 information. */
66
67#include <windows.h> /* KILL IT WITH FIRE! */
64 68
65#define EVENT_CLOCK(lvalue) \ 69#define EVENT_CLOCK(lvalue) \
66 BEGIN \ 70 BEGIN \
67 EventClockUnion ecu; \ 71 __declspec(align(16)) LARGE_INTEGER _count; \
68 __asm { \ 72 QueryPerformanceCounter(&_count); \
69 __asm __emit 0fh __asm __emit 031h ; rdtsc \ 73 (lvalue) = _count.QuadPart; \
70 mov ecu.half.high, edx \
71 mov ecu.half.low, eax \
72 } \
73 (lvalue) = ecu.whole; \
74 END 74 END
75 75
76#endif /* _MSC_VER < 1400 */ 76#endif /* _MSC_VER < 1400 */