VirtualBox

source: vbox/trunk/src/VBox/Runtime/common/time/timesupA.asm@ 10998

Last change on this file since 10998 was 8281, checked in by vboxsync, 17 years ago

removed mess in id string.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1; $Id: timesupA.asm 8281 2008-04-22 12:43:16Z vboxsync $
2;; @file
3; IPRT - Time using SUPLib, the Assembly Implementation.
4;
5
6;
7; Copyright (C) 2006-2007 Sun Microsystems, Inc.
8;
9; This file is part of VirtualBox Open Source Edition (OSE), as
10; available from http://www.virtualbox.org. This file is free software;
11; you can redistribute it and/or modify it under the terms of the GNU
12; General Public License (GPL) as published by the Free Software
13; Foundation, in version 2 as it comes in the "COPYING" file of the
14; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16;
17; The contents of this file may alternatively be used under the terms
18; of the Common Development and Distribution License Version 1.0
19; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20; VirtualBox OSE distribution, in which case the provisions of the
21; CDDL are applicable instead of those of the GPL.
22;
23; You may elect to license modified versions of this file under the
24; terms and conditions of either the GPL or the CDDL or both.
25;
26; Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
27; Clara, CA 95054 USA or visit http://www.sun.com if you need
28; additional information or have any questions.
29;
30
31%ifndef IN_GUEST
32
33%include "iprt/asmdefs.mac"
34%include "VBox/sup.mac"
35
36
37;; Keep this in sync with iprt/time.h.
38struc RTTIMENANOTSDATA
39 .pu64Prev RTCCPTR_RES 1
40 .pfnBad RTCCPTR_RES 1
41 .pfnRediscover RTCCPTR_RES 1
42 .pvDummy RTCCPTR_RES 1
43 .c1nsSteps resd 1
44 .cExpired resd 1
45 .cBadPrev resd 1
46 .cUpdateRaces resd 1
47endstruc
48
49
50BEGINDATA
51%undef IN_SUPLIB
52%undef IMPORTED_SUPLIB
53%ifdef IN_SUP_R0
54 %define IN_SUPLIB
55%endif
56%ifdef IN_SUP_R3
57 %define IN_SUPLIB
58%endif
59%ifdef IN_SUP_GC
60 %define IN_SUPLIB
61%endif
62%ifdef IN_SUPLIB
63 extern NAME(g_pSUPGlobalInfoPage)
64%elifdef IN_RING0
65 %ifdef RT_OS_WINDOWS
66 %define IMPORTED_SUPLIB
67 extern IMPNAME(g_SUPGlobalInfoPage)
68 %else
69 extern NAME(g_SUPGlobalInfoPage)
70 %endif
71%else
72 %ifdef RT_OS_WINDOWS
73 %define IMPORTED_SUPLIB
74 extern IMPNAME(g_pSUPGlobalInfoPage)
75 %else
76 extern NAME(g_pSUPGlobalInfoPage)
77 %endif
78%endif
79
80
81BEGINCODE
82
83;
84; The default stuff that works everywhere.
85; Uses cpuid for serializing.
86;
87%undef ASYNC_GIP
88%undef USE_LFENCE
89%define NEED_TRANSACTION_ID
90%define NEED_TO_SAVE_REGS
91%define rtTimeNanoTSInternalAsm RTTimeNanoTSLegacySync
92%include "timesupA.mac"
93
94%define ASYNC_GIP
95%ifdef IN_GC
96 %undef NEED_TRANSACTION_ID
97%endif
98%define rtTimeNanoTSInternalAsm RTTimeNanoTSLegacyAsync
99%include "timesupA.mac"
100
101;
102; Alternative implementation that employs lfence instead of cpuid.
103;
104%undef ASYNC_GIP
105%define USE_LFENCE
106%define NEED_TRANSACTION_ID
107%undef NEED_TO_SAVE_REGS
108%define rtTimeNanoTSInternalAsm RTTimeNanoTSLFenceSync
109%include "timesupA.mac"
110
111%define ASYNC_GIP
112%ifdef IN_GC
113 %undef NEED_TRANSACTION_ID
114%endif
115%define rtTimeNanoTSInternalAsm RTTimeNanoTSLFenceAsync
116%include "timesupA.mac"
117
118
119%endif ; !IN_GUEST
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette