VirtualBox

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

Last change on this file since 53470 was 53470, checked in by vboxsync, 10 years ago

timesupA.asm: Disabled SUPTscDeltaApply macro invocation, see review comments in code.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
1; $Id: timesupA.asm 53470 2014-12-06 03:55:37Z vboxsync $
2;; @file
3; IPRT - Time using SUPLib, the Assembly Implementation.
4;
5
6;
7; Copyright (C) 2006-2010 Oracle Corporation
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
27%ifndef IN_GUEST
28
29%include "iprt/asmdefs.mac"
30%include "VBox/sup.mac"
31
32
33;; Keep this in sync with iprt/time.h.
34struc RTTIMENANOTSDATA
35 .pu64Prev RTCCPTR_RES 1
36 .pfnBad RTCCPTR_RES 1
37 .pfnRediscover RTCCPTR_RES 1
38 .pvDummy RTCCPTR_RES 1
39 .c1nsSteps resd 1
40 .cExpired resd 1
41 .cBadPrev resd 1
42 .cUpdateRaces resd 1
43endstruc
44
45
46BEGINDATA
47%undef IN_SUPLIB
48%undef IMPORTED_SUPLIB
49%ifdef IN_SUP_R0
50 %define IN_SUPLIB
51%endif
52%ifdef IN_SUP_R3
53 %define IN_SUPLIB
54%endif
55%ifdef IN_SUP_RC
56 %define IN_SUPLIB
57%endif
58%ifdef IN_SUPLIB
59 extern NAME(g_pSUPGlobalInfoPage)
60%elifdef IN_RING0
61 %ifdef RT_OS_WINDOWS
62 %define IMPORTED_SUPLIB
63 extern IMPNAME(g_SUPGlobalInfoPage)
64 %else
65 extern NAME(g_SUPGlobalInfoPage)
66 %endif
67%else
68 %ifdef RT_OS_WINDOWS
69 %define IMPORTED_SUPLIB
70 extern IMPNAME(g_pSUPGlobalInfoPage)
71 %else
72 extern NAME(g_pSUPGlobalInfoPage)
73 %endif
74%endif
75
76
77BEGINCODE
78
79;
80; The default stuff that works everywhere.
81; Uses cpuid for serializing.
82;
83%undef ASYNC_GIP
84%undef USE_LFENCE
85%define NEED_TRANSACTION_ID
86%define NEED_TO_SAVE_REGS
87%define rtTimeNanoTSInternalAsm RTTimeNanoTSLegacySync
88%include "timesupA.mac"
89
90%define ASYNC_GIP
91%ifdef IN_RC
92 %undef NEED_TRANSACTION_ID
93%endif
94%define rtTimeNanoTSInternalAsm RTTimeNanoTSLegacyAsync
95%include "timesupA.mac"
96
97%undef ASYNC_GIP
98%define INVARIANT_GIP
99%ifdef IN_RC
100 %undef NEED_TRANSACTION_ID
101%endif
102%define rtTimeNanoTSInternalAsm RTTimeNanoTSLegacyInvariant
103;%include "timesupA.mac"
104;; @todo r=bird: later.
105
106;
107; Alternative implementation that employs lfence instead of cpuid.
108;
109%undef INVARIANT_GIP
110%define USE_LFENCE
111%define NEED_TRANSACTION_ID
112%undef NEED_TO_SAVE_REGS
113%define rtTimeNanoTSInternalAsm RTTimeNanoTSLFenceSync
114%include "timesupA.mac"
115
116%define ASYNC_GIP
117%ifdef IN_RC
118 %undef NEED_TRANSACTION_ID
119%endif
120%define rtTimeNanoTSInternalAsm RTTimeNanoTSLFenceAsync
121%include "timesupA.mac"
122
123%undef ASYNC_GIP
124%define INVARIANT_GIP
125%define NEED_TRANSACTION_ID
126%define rtTimeNanoTSInternalAsm RTTimeNanoTSLFenceInvariant
127;%include "timesupA.mac"
128;; @todo r=bird: later.
129
130
131%endif ; !IN_GUEST
Note: See TracBrowser for help on using the repository browser.

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