Alexandre Julliard : include: Allow 64-bit pointers to pass through LDT functions unmolested.
Alexandre Julliard
julliard at winehq.org
Mon Dec 15 08:27:40 CST 2008
Module: wine
Branch: master
Commit: a518edc3aabeaabf581775584389309a360ff8ed
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a518edc3aabeaabf581775584389309a360ff8ed
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Dec 15 13:31:52 2008 +0100
include: Allow 64-bit pointers to pass through LDT functions unmolested.
---
include/wine/library.h | 6 ++++++
include/winnt.h | 3 +++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/include/wine/library.h b/include/wine/library.h
index 52186c6..1102390 100644
--- a/include/wine/library.h
+++ b/include/wine/library.h
@@ -135,6 +135,9 @@ static inline void wine_ldt_set_base( LDT_ENTRY *ent, const void *base )
ent->BaseLow = (WORD)(ULONG_PTR)base;
ent->HighWord.Bits.BaseMid = (BYTE)((ULONG_PTR)base >> 16);
ent->HighWord.Bits.BaseHi = (BYTE)((ULONG_PTR)base >> 24);
+#ifdef _WIN64
+ ent->BaseHigh = (ULONG_PTR)base >> 32;
+#endif
}
static inline void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit )
{
@@ -145,6 +148,9 @@ static inline void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit )
static inline void *wine_ldt_get_base( const LDT_ENTRY *ent )
{
return (void *)(ent->BaseLow |
+#ifdef _WIN64
+ (ULONG_PTR)ent->BaseHigh << 32 |
+#endif
(ULONG_PTR)ent->HighWord.Bits.BaseMid << 16 |
(ULONG_PTR)ent->HighWord.Bits.BaseHi << 24);
}
diff --git a/include/winnt.h b/include/winnt.h
index 083bd96..580c2e5 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -846,6 +846,9 @@ typedef struct _LDT_ENTRY {
unsigned BaseHi : 8;
} Bits;
} HighWord;
+#ifdef _WIN64 /* FIXME: 64-bit code should not be using the LDT */
+ DWORD BaseHigh;
+#endif
} LDT_ENTRY, *PLDT_ENTRY;
/* x86-64 context definitions */
More information about the wine-cvs
mailing list