Alexandre Julliard : ntdll/tests: Retrieve the actual segment registers for RtlWow64GetThreadSelectorEntry test.
Module: wine Branch: master Commit: c6919423a85f5e77b05cb353bcd9e54055b6c988 URL: https://source.winehq.org/git/wine.git/?a=commit;h=c6919423a85f5e77b05cb353b... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 2 09:59:30 2021 +0200 ntdll/tests: Retrieve the actual segment registers for RtlWow64GetThreadSelectorEntry test. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/wow64.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/ntdll/tests/wow64.c b/dlls/ntdll/tests/wow64.c index 44010607f77..82543c250af 100644 --- a/dlls/ntdll/tests/wow64.c +++ b/dlls/ntdll/tests/wow64.c @@ -431,8 +431,13 @@ static void test_selectors(void) { /* hardcoded values */ context.SegCs = 0x23; +#ifdef __x86_64__ + __asm__( "movw %%fs,%0" : "=m" (context.SegFs) ); + __asm__( "movw %%ss,%0" : "=m" (context.SegSs) ); +#else context.SegSs = 0x2b; context.SegFs = 0x53; +#endif } #define GET_ENTRY(info,size,ret) \ pRtlWow64GetThreadSelectorEntry( GetCurrentThread(), info, size, ret )
participants (1)
-
Alexandre Julliard