Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
56cfbf6b
Commit
56cfbf6b
authored
May 31, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Only enable the non-inline NtCurrentTeb() on the Unix side.
parent
0fac6bcf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
winnt.h
include/winnt.h
+15
-11
No files found.
include/winnt.h
View file @
56cfbf6b
...
...
@@ -2357,14 +2357,20 @@ typedef struct _NT_TIB
struct
_TEB
;
#if defined(__i386__) && defined(__GNUC__) && !defined(WINE_UNIX_LIB)
#ifdef WINE_UNIX_LIB
# ifdef __GNUC__
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
)
__attribute__
((
pure
));
# else
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
);
# endif
#elif defined(__i386__) && defined(__GNUC__)
static
FORCEINLINE
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
)
{
struct
_TEB
*
teb
;
__asm__
(
".byte 0x64
\n\t
movl (0x18),%0"
:
"=r"
(
teb
));
return
teb
;
}
#elif defined(__i386__) && defined(_MSC_VER)
&& !defined(WINE_UNIX_LIB)
#elif defined(__i386__) && defined(_MSC_VER)
static
FORCEINLINE
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
)
{
struct
_TEB
*
teb
;
...
...
@@ -2372,34 +2378,34 @@ static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void)
__asm
mov
teb
,
eax
;
return
teb
;
}
#elif defined(__x86_64__) && defined(__GNUC__)
&& !defined(WINE_UNIX_LIB)
#elif defined(__x86_64__) && defined(__GNUC__)
static
FORCEINLINE
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
)
{
struct
_TEB
*
teb
;
__asm__
(
".byte 0x65
\n\t
movq (0x30),%0"
:
"=r"
(
teb
));
return
teb
;
}
#elif defined(__x86_64__) && defined(_MSC_VER)
&& !defined(WINE_UNIX_LIB)
#elif defined(__x86_64__) && defined(_MSC_VER)
unsigned
__int64
__readgsqword
(
unsigned
long
);
#pragma intrinsic(__readgsqword)
static
FORCEINLINE
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
)
{
return
(
struct
_TEB
*
)
__readgsqword
(
FIELD_OFFSET
(
NT_TIB
,
Self
));
}
#elif defined(__arm__) && defined(__GNUC__)
&& !defined(WINE_UNIX_LIB)
#elif defined(__arm__) && defined(__GNUC__)
static
FORCEINLINE
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
)
{
struct
_TEB
*
teb
;
__asm__
(
"mrc p15, 0, %0, c13, c0, 2"
:
"=r"
(
teb
));
return
teb
;
}
#elif defined(__arm__) && defined(_MSC_VER)
&& !defined(WINE_UNIX_LIB)
#elif defined(__arm__) && defined(_MSC_VER)
#pragma intrinsic(_MoveFromCoprocessor)
static
FORCEINLINE
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
)
{
return
(
struct
_TEB
*
)(
ULONG_PTR
)
_MoveFromCoprocessor
(
15
,
0
,
13
,
0
,
2
);
}
#elif defined(__aarch64__) && defined(__
MINGW32
__)
#elif defined(__aarch64__) && defined(__
GNUC
__)
register
struct
_TEB
*
__wine_current_teb
__asm__
(
"x18"
);
static
FORCEINLINE
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
)
{
...
...
@@ -2412,10 +2418,8 @@ static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void)
{
return
(
struct
_TEB
*
)
__getReg
(
18
);
}
#elif defined(__GNUC__)
extern
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
)
__attribute__
((
pure
));
#else
extern
struct
_TEB
*
WINAPI
NtCurrentTeb
(
void
);
#elif !defined(RC_INVOKED)
# error You must define NtCurrentTeb() for your architecture
#endif
#ifdef NONAMELESSUNION
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment