winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2019
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
895 discussions
Start a n
N
ew thread
Nikolay Sivov : propsys/tests: Merge test files.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: d189b55d2ffb038474cb6656dc8743eb34c35a3d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d189b55d2ffb038474cb6656…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Nov 3 00:13:36 2019 +0300 propsys/tests: Merge test files. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/propsys/tests/Makefile.in | 1 - dlls/propsys/tests/propstore.c | 374 ----------------------------------------- dlls/propsys/tests/propsys.c | 342 +++++++++++++++++++++++++++++++++++++ 3 files changed, 342 insertions(+), 375 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=d189b55d2ffb038474cb…
1
0
0
0
Piotr Caban : msvcrt: Enable printf %z, %t and %j formats.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 97557ae168109492e73b5d47b005a3e6c466a954 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=97557ae168109492e73b5d47…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Sat Nov 2 14:39:28 2019 +0100 msvcrt: Enable printf %z, %t and %j formats. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/printf.h | 10 ++++++---- dlls/msvcrt/tests/printf.c | 11 ++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/dlls/msvcrt/printf.h b/dlls/msvcrt/printf.h index 20bd77e792..d7f3b6f225 100644 --- a/dlls/msvcrt/printf.h +++ b/dlls/msvcrt/printf.h @@ -515,15 +515,17 @@ int FUNC_NAME(pf_printf)(FUNC_NAME(puts_clbk) pf_puts, void *puts_ctx, const API break; } else if(*p == 'w') flags.WideString = *p++; -#if _MSVCR_VER >= 140 - else if(*p == 'z' || *p == 't') +#if _MSVCR_VER == 0 || _MSVCR_VER >= 140 + else if((*p == 'z' || *p == 't') && p[1] && strchr("diouxX", p[1])) flags.IntegerNative = *p++; - else if(*p == 'T') - flags.NaturalString = *p++; else if(*p == 'j') { flags.IntegerDouble++; p++; } +#endif +#if _MSVCR_VER >= 140 + else if(*p == 'T') + flags.NaturalString = *p++; #endif else if((*p == 'F' || *p == 'N') && legacy_msvcrt_compat) p++; /* ignore */ diff --git a/dlls/msvcrt/tests/printf.c b/dlls/msvcrt/tests/printf.c index d1fe292143..4c153dab9e 100644 --- a/dlls/msvcrt/tests/printf.c +++ b/dlls/msvcrt/tests/printf.c @@ -163,8 +163,10 @@ static void test_sprintf( void ) { "%Ihd", "Ihd", 0, INT_ARG, 1 }, { "%I0d", "I0d", 0, INT_ARG, 1 }, { "%I64D", "D", 0, ULONGLONG_ARG, 0, -1 }, - { "%zx", "1", "zx", TODO_FLAG | INT_ARG, 1 }, - { "%z", "1", "z", TODO_FLAG | INT_ARG, 1 }, + { "%zx", "1", "zx", INT_ARG, 1 }, + { "%z", "z", 0, INT_ARG, 1 }, + { "%tx", "1", "tx", INT_ARG, 1 }, + { "%t", "t", 0, INT_ARG, 1 }, { "% d", " 1", 0, INT_ARG, 1 }, { "%+ d", "+1", 0, INT_ARG, 1 }, { "%S", "wide", 0, PTR_ARG, 0, 0, 0, L"wide" }, @@ -216,9 +218,8 @@ static void test_sprintf( void ) { "%u", "4294967295", 0, INT_ARG, -1 }, { "%w", "", 0, INT_ARG, -1 }, { "%h", "", 0, INT_ARG, -1 }, - { "%z", "z", 0, INT_ARG, -1 }, - { "%j", "", "j", TODO_FLAG | ULONGLONG_ARG, 0, -1 }, - { "%jd", "-1", "jd", TODO_FLAG | ULONGLONG_ARG, 0, -1 }, + { "%j", "", "j", ULONGLONG_ARG, 0, -1 }, + { "%jd", "-1", "jd", ULONGLONG_ARG, 0, -1 }, { "%F", "", 0, INT_ARG, -1 }, { "%N", "", 0, INT_ARG, -1 }, { "%H", "H", 0, INT_ARG, -1 },
1
0
0
0
Piotr Caban : msvcrt: Improve printf %I format support.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 1309e11ea1c5863616de7638731d00d6ab90b295 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1309e11ea1c5863616de7638…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Sat Nov 2 14:39:23 2019 +0100 msvcrt: Improve printf %I format support. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/printf.h | 6 +++--- dlls/msvcrt/tests/printf.c | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/msvcrt/printf.h b/dlls/msvcrt/printf.h index 975977087d..20bd77e792 100644 --- a/dlls/msvcrt/printf.h +++ b/dlls/msvcrt/printf.h @@ -509,10 +509,10 @@ int FUNC_NAME(pf_printf)(FUNC_NAME(puts_clbk) pf_puts, void *puts_ctx, const API p += 3; } else if(*(p+1)=='3' && *(p+2)=='2') p += 3; - else if(isdigit(*(p+1)) || !*(p+1)) - break; - else + else if(p[1] && strchr("diouxX", p[1])) flags.IntegerNative = *p++; + else + break; } else if(*p == 'w') flags.WideString = *p++; #if _MSVCR_VER >= 140 diff --git a/dlls/msvcrt/tests/printf.c b/dlls/msvcrt/tests/printf.c index ac5c37a59c..d1fe292143 100644 --- a/dlls/msvcrt/tests/printf.c +++ b/dlls/msvcrt/tests/printf.c @@ -159,6 +159,8 @@ static void test_sprintf( void ) " 00000000000000000000000000000000000000000000000000000000000000000000000000000001", 0, INT_ARG, 1 }, { "%I", "I", 0, INT_ARG, 1 }, + { "%Iq", "Iq", 0, INT_ARG, 1 }, + { "%Ihd", "Ihd", 0, INT_ARG, 1 }, { "%I0d", "I0d", 0, INT_ARG, 1 }, { "%I64D", "D", 0, ULONGLONG_ARG, 0, -1 }, { "%zx", "1", "zx", TODO_FLAG | INT_ARG, 1 }, @@ -256,6 +258,7 @@ static void test_sprintf( void ) int i, x, r; for (i=0; i<ARRAY_SIZE(tests); i++) { + memset(buffer, 'x', sizeof(buffer)); switch(tests[i].type & 0xff) { case NO_ARG: r = p_sprintf(buffer, tests[i].format);
1
0
0
0
Alexandre Julliard : kernel32/tests: Add more tests for FPU control registers.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 007f1b9a82aa2da84444d495affc90d699949956 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=007f1b9a82aa2da84444d495…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat Nov 2 14:15:17 2019 +0100 kernel32/tests: Add more tests for FPU control registers. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/thread.c | 123 ++++++++++++++++++++++++++++--------------- 1 file changed, 81 insertions(+), 42 deletions(-) diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c index f87f7704a8..ddbbec93ad 100644 --- a/dlls/kernel32/tests/thread.c +++ b/dlls/kernel32/tests/thread.c @@ -24,6 +24,7 @@ #include <assert.h> #include <stdarg.h> #include <stdio.h> +#include <float.h> /* the tests intentionally pass invalid pointers and need an exception handler */ #define WINE_NO_INLINE_STRING @@ -1674,40 +1675,42 @@ static void test_ThreadErrorMode(void) pSetThreadErrorMode(oldmode, NULL); } -#if (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))) || (defined(_MSC_VER) && defined(__i386__)) -static inline void set_fpu_cw(WORD cw) +struct fpu_thread_ctx { -#ifdef _MSC_VER - __asm { fnclex } - __asm { fldcw [cw] } -#else - __asm__ volatile ("fnclex; fldcw %0" : : "m" (cw)); -#endif -} + unsigned int cw; + unsigned long fpu_cw; + HANDLE finished; +}; -static inline WORD get_fpu_cw(void) +static inline unsigned long get_fpu_cw(void) { +#if defined(__i386__) || defined(__x86_64__) WORD cw = 0; + unsigned int sse = 0; #ifdef _MSC_VER __asm { fnstcw [cw] } + __asm { stmxcsr [sse] } #else __asm__ volatile ("fnstcw %0" : "=m" (cw)); + __asm__ volatile ("stmxcsr %0" : "=m" (sse)); #endif + return MAKELONG( cw, sse ); +#elif defined(__aarch64__) + unsigned long cw; + __asm__ __volatile__( "mrs %0, fpcr" : "=r" (cw) ); return cw; +#else + return 0; +#endif } -struct fpu_thread_ctx -{ - WORD cw; - HANDLE finished; -}; - static DWORD WINAPI fpu_thread(void *param) { struct fpu_thread_ctx *ctx = param; BOOL ret; - ctx->cw = get_fpu_cw(); + ctx->cw = _control87( 0, 0 ); + ctx->fpu_cw = get_fpu_cw(); ret = SetEvent(ctx->finished); ok(ret, "SetEvent failed, last error %#x.\n", GetLastError()); @@ -1715,7 +1718,7 @@ static DWORD WINAPI fpu_thread(void *param) return 0; } -static WORD get_thread_fpu_cw(void) +static unsigned int get_thread_fpu_cw( unsigned long *fpu_cw ) { struct fpu_thread_ctx ctx; DWORD tid, res; @@ -1734,34 +1737,72 @@ static WORD get_thread_fpu_cw(void) ok(!!res, "Failed to close event handle, last error %#x.\n", GetLastError()); CloseHandle(thread); + *fpu_cw = ctx.fpu_cw; return ctx.cw; } static void test_thread_fpu_cw(void) { - WORD initial_cw, cw; - - initial_cw = get_fpu_cw(); - ok(initial_cw == 0x27f, "Expected FPU control word 0x27f, got %#x.\n", initial_cw); - - cw = get_thread_fpu_cw(); - ok(cw == 0x27f, "Expected FPU control word 0x27f, got %#x.\n", cw); - - set_fpu_cw(0xf60); - cw = get_fpu_cw(); - ok(cw == 0xf60, "Expected FPU control word 0xf60, got %#x.\n", cw); - - cw = get_thread_fpu_cw(); - ok(cw == 0x27f, "Expected FPU control word 0x27f, got %#x.\n", cw); - - cw = get_fpu_cw(); - ok(cw == 0xf60, "Expected FPU control word 0xf60, got %#x.\n", cw); - - set_fpu_cw(initial_cw); - cw = get_fpu_cw(); - ok(cw == initial_cw, "Expected FPU control word %#x, got %#x.\n", initial_cw, cw); -} + static const struct { unsigned int cw; unsigned long fpu_cw; } expected_cw[6] = + { +#ifdef __i386__ + { _MCW_EM | _PC_53, MAKELONG( 0x27f, 0x1f80 ) }, + { _MCW_EM | _PC_53, MAKELONG( 0x27f, 0x1f80 ) }, + { _EM_INEXACT | _RC_CHOP | _PC_24, MAKELONG( 0xc60, 0x7000 ) }, + { _MCW_EM | _PC_53, MAKELONG( 0x27f, 0x1f80 ) }, + { _EM_INEXACT | _RC_CHOP | _PC_24, MAKELONG( 0xc60, 0x7000 ) }, + { _MCW_EM | _PC_53, MAKELONG( 0x27f, 0x1f80 ) } +#elif defined(__x86_64__) + { _MCW_EM | _PC_64, MAKELONG( 0x27f, 0x1f80 ) }, + { _MCW_EM | _PC_64, MAKELONG( 0x27f, 0x1f80 ) }, + { _EM_INEXACT | _RC_CHOP | _PC_64, MAKELONG( 0x27f, 0x7000 ) }, + { _MCW_EM | _PC_64, MAKELONG( 0x27f, 0x1f80 ) }, + { _EM_INEXACT | _RC_CHOP | _PC_64, MAKELONG( 0x27f, 0x7000 ) }, + { _MCW_EM | _PC_64, MAKELONG( 0x27f, 0x1f80 ) } +#elif defined(__aarch64__) + { _MCW_EM | _PC_64, 0 }, + { _MCW_EM | _PC_64, 0 }, + { _EM_INEXACT | _RC_CHOP | _PC_64, 0xc08f00 }, + { _MCW_EM | _PC_64, 0 }, + { _EM_INEXACT | _RC_CHOP | _PC_64, 0xc08f00 }, + { _MCW_EM | _PC_64, 0 } +#else + { 0xdeadbeef, 0xdeadbeef } #endif + }; + unsigned int initial_cw, cw; + unsigned long fpu_cw; + + fpu_cw = get_fpu_cw(); + initial_cw = _control87( 0, 0 ); + ok(initial_cw == expected_cw[0].cw, "expected %#x got %#x\n", expected_cw[0].cw, initial_cw); + ok(fpu_cw == expected_cw[0].fpu_cw, "expected %#lx got %#lx\n", expected_cw[0].fpu_cw, fpu_cw); + + cw = get_thread_fpu_cw( &fpu_cw ); + ok(cw == expected_cw[1].cw, "expected %#x got %#x\n", expected_cw[1].cw, cw); + ok(fpu_cw == expected_cw[1].fpu_cw, "expected %#lx got %#lx\n", expected_cw[1].fpu_cw, fpu_cw); + + _control87( _EM_INEXACT | _RC_CHOP | _PC_24, _MCW_EM | _MCW_RC | _MCW_PC ); + cw = _control87( 0, 0 ); + fpu_cw = get_fpu_cw(); + ok(cw == expected_cw[2].cw, "expected %#x got %#x\n", expected_cw[2].cw, cw); + ok(fpu_cw == expected_cw[2].fpu_cw, "expected %#lx got %#lx\n", expected_cw[2].fpu_cw, fpu_cw); + + cw = get_thread_fpu_cw( &fpu_cw ); + ok(cw == expected_cw[3].cw, "expected %#x got %#x\n", expected_cw[3].cw, cw); + ok(fpu_cw == expected_cw[3].fpu_cw, "expected %#lx got %#lx\n", expected_cw[3].fpu_cw, fpu_cw); + + cw = _control87( 0, 0 ); + fpu_cw = get_fpu_cw(); + ok(cw == expected_cw[4].cw, "expected %#x got %#x\n", expected_cw[4].cw, cw); + ok(fpu_cw == expected_cw[4].fpu_cw, "expected %#lx got %#lx\n", expected_cw[4].fpu_cw, fpu_cw); + + _control87( initial_cw, _MCW_EM | _MCW_RC | _MCW_PC ); + cw = _control87( 0, 0 ); + fpu_cw = get_fpu_cw(); + ok(cw == expected_cw[5].cw, "expected %#x got %#x\n", expected_cw[5].cw, cw); + ok(fpu_cw == expected_cw[5].fpu_cw, "expected %#lx got %#lx\n", expected_cw[5].fpu_cw, fpu_cw); +} static const char manifest_dep[] = "<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">" @@ -2180,9 +2221,7 @@ START_TEST(thread) test_TLS(); test_FLS(); test_ThreadErrorMode(); -#if (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))) || (defined(_MSC_VER) && defined(__i386__)) test_thread_fpu_cw(); -#endif test_thread_actctx(); test_threadpool();
1
0
0
0
Alexandre Julliard : msvcrt: Don't change FPU control word in _control87() on x86-64.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 0e183cc3c0d3b6f89f79047cdd71c389afc75073 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0e183cc3c0d3b6f89f79047c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat Nov 2 14:35:52 2019 +0100 msvcrt: Don't change FPU control word in _control87() on x86-64. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/math.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index f56ec9dcf0..f6824128cd 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -1087,7 +1087,7 @@ double CDECL MSVCRT__chgsign(double num) * * Not exported by native msvcrt, added in msvcr80. */ -#if defined(__i386__) || defined(__x86_64__) +#ifdef __i386__ int CDECL __control87_2( unsigned int newval, unsigned int mask, unsigned int *x86_cw, unsigned int *sse2_cw ) { @@ -1225,12 +1225,55 @@ int CDECL __control87_2( unsigned int newval, unsigned int mask, unsigned int CDECL _control87(unsigned int newval, unsigned int mask) { unsigned int flags = 0; -#if defined(__i386__) || defined(__x86_64__) +#ifdef __i386__ unsigned int sse2_cw; __control87_2( newval, mask, &flags, &sse2_cw ); if ((flags ^ sse2_cw) & (MSVCRT__MCW_EM | MSVCRT__MCW_RC)) flags |= MSVCRT__EM_AMBIGUOUS; +#elif defined(__x86_64__) + unsigned long fpword; + + __asm__ __volatile__( "stmxcsr %0" : "=m" (fpword) ); + if (fpword & 0x80) flags |= MSVCRT__EM_INVALID; + if (fpword & 0x100) flags |= MSVCRT__EM_DENORMAL; + if (fpword & 0x200) flags |= MSVCRT__EM_ZERODIVIDE; + if (fpword & 0x400) flags |= MSVCRT__EM_OVERFLOW; + if (fpword & 0x800) flags |= MSVCRT__EM_UNDERFLOW; + if (fpword & 0x1000) flags |= MSVCRT__EM_INEXACT; + switch (fpword & 0x6000) + { + case 0x6000: flags |= MSVCRT__RC_CHOP; break; + case 0x4000: flags |= MSVCRT__RC_UP; break; + case 0x2000: flags |= MSVCRT__RC_DOWN; break; + } + switch (fpword & 0x8040) + { + case 0x0040: flags |= MSVCRT__DN_FLUSH_OPERANDS_SAVE_RESULTS; break; + case 0x8000: flags |= MSVCRT__DN_SAVE_OPERANDS_FLUSH_RESULTS; break; + case 0x8040: flags |= MSVCRT__DN_FLUSH; break; + } + flags = (flags & ~mask) | (newval & mask); + fpword = 0; + if (flags & MSVCRT__EM_INVALID) fpword |= 0x80; + if (flags & MSVCRT__EM_DENORMAL) fpword |= 0x100; + if (flags & MSVCRT__EM_ZERODIVIDE) fpword |= 0x200; + if (flags & MSVCRT__EM_OVERFLOW) fpword |= 0x400; + if (flags & MSVCRT__EM_UNDERFLOW) fpword |= 0x800; + if (flags & MSVCRT__EM_INEXACT) fpword |= 0x1000; + switch (flags & MSVCRT__MCW_RC) + { + case MSVCRT__RC_CHOP: fpword |= 0x6000; break; + case MSVCRT__RC_UP: fpword |= 0x4000; break; + case MSVCRT__RC_DOWN: fpword |= 0x2000; break; + } + switch (flags & MSVCRT__MCW_DN) + { + case MSVCRT__DN_FLUSH_OPERANDS_SAVE_RESULTS: fpword |= 0x0040; break; + case MSVCRT__DN_SAVE_OPERANDS_FLUSH_RESULTS: fpword |= 0x8000; break; + case MSVCRT__DN_FLUSH: fpword |= 0x8040; break; + } + __asm__ __volatile__( "ldmxcsr %0" :: "m" (fpword) ); #elif defined(__aarch64__) unsigned long fpcr;
1
0
0
0
Alexandre Julliard : ntdll: Initialize FPU context on ARM64.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 6a0e0001ef9583f06266e4f611aaa0dc2e4c2b04 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6a0e0001ef9583f06266e4f6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 4 09:45:21 2019 +0100 ntdll: Initialize FPU context on ARM64. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_arm64.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 96b20d8ff6..687219ec40 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -1974,6 +1974,26 @@ __ASM_GLOBAL_FUNC( start_thread, "bl " __ASM_NAME("virtual_clear_thread_stack") "\n\t" /* switch to the initial context */ "mov x0, sp\n\t" + "ldp q0, q1, [x0, #0x110]\n\t" /* context->V[0,1] */ + "ldp q2, q3, [x0, #0x130]\n\t" /* context->V[2,3] */ + "ldp q4, q5, [x0, #0x150]\n\t" /* context->V[4,5] */ + "ldp q6, q7, [x0, #0x170]\n\t" /* context->V[6,7] */ + "ldp q8, q9, [x0, #0x190]\n\t" /* context->V[8,9] */ + "ldp q10, q11, [x0, #0x1b0]\n\t" /* context->V[10,11] */ + "ldp q12, q13, [x0, #0x1d0]\n\t" /* context->V[12,13] */ + "ldp q14, q15, [x0, #0x1f0]\n\t" /* context->V[14,15] */ + "ldp q16, q17, [x0, #0x210]\n\t" /* context->V[16,17] */ + "ldp q18, q19, [x0, #0x230]\n\t" /* context->V[18,19] */ + "ldp q20, q21, [x0, #0x250]\n\t" /* context->V[20,21] */ + "ldp q22, q23, [x0, #0x270]\n\t" /* context->V[22,23] */ + "ldp q24, q25, [x0, #0x290]\n\t" /* context->V[24,25] */ + "ldp q26, q27, [x0, #0x2b0]\n\t" /* context->V[26,27] */ + "ldp q28, q29, [x0, #0x2d0]\n\t" /* context->V[28,29] */ + "ldp q30, q31, [x0, #0x2f0]\n\t" /* context->V[30,31] */ + "ldr w1, [x0, #0x310]\n\t" /* context->Fpcr */ + "msr fpcr, x1\n\t" + "ldr w1, [x0, #0x314]\n\t" /* context->Fpsr */ + "msr fpsr, x1\n\t" "ldp x1, x2, [x0, #0x10]\n\t" /* context->X1,2 */ "ldp x3, x4, [x0, #0x20]\n\t" /* context->X3,4 */ "ldp x5, x6, [x0, #0x30]\n\t" /* context->X5,6 */
1
0
0
0
Alexandre Julliard : server: Clarify naming of ARM64 floating-point registers.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 85f1fbdb7eb02069319dd67a4615871f5abb9bbc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=85f1fbdb7eb02069319dd67a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 4 09:45:04 2019 +0100 server: Clarify naming of ARM64 floating-point registers. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_arm64.c | 12 ++++++++++-- include/wine/server_protocol.h | 2 +- server/protocol.def | 2 +- server/trace.c | 8 +++++--- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 17af494e29..96b20d8ff6 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -369,7 +369,11 @@ NTSTATUS context_to_server( context_t *to, const CONTEXT *from ) if (flags & CONTEXT_FLOATING_POINT) { to->flags |= SERVER_CTX_FLOATING_POINT; - for (i = 0; i < 64; i++) to->fp.arm64_regs.d[i] = from->V[i / 2].D[i % 2]; + for (i = 0; i < 32; i++) + { + to->fp.arm64_regs.q[i].low = from->V[i].s.Low; + to->fp.arm64_regs.q[i].high = from->V[i].s.High; + } to->fp.arm64_regs.fpcr = from->Fpcr; to->fp.arm64_regs.fpsr = from->Fpsr; } @@ -414,7 +418,11 @@ NTSTATUS context_from_server( CONTEXT *to, const context_t *from ) if (from->flags & SERVER_CTX_FLOATING_POINT) { to->ContextFlags |= CONTEXT_FLOATING_POINT; - for (i = 0; i < 64; i++) to->V[i / 2].D[i % 2] = from->fp.arm64_regs.d[i]; + for (i = 0; i < 32; i++) + { + to->V[i].s.Low = from->fp.arm64_regs.q[i].low; + to->V[i].s.High = from->fp.arm64_regs.q[i].high; + } to->Fpcr = from->fp.arm64_regs.fpcr; to->Fpsr = from->fp.arm64_regs.fpsr; } diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 4f35047241..83ce56ca25 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -156,7 +156,7 @@ typedef struct struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs; struct { double fpr[32], fpscr; } powerpc_regs; struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs; - struct { unsigned __int64 d[64]; unsigned int fpcr, fpsr; } arm64_regs; + struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs; } fp; union { diff --git a/server/protocol.def b/server/protocol.def index 6af0ae0cff..984f2a10fd 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -172,7 +172,7 @@ typedef struct struct { struct { unsigned __int64 low, high; } fpregs[32]; } x86_64_regs; struct { double fpr[32], fpscr; } powerpc_regs; struct { unsigned __int64 d[32]; unsigned int fpscr; } arm_regs; - struct { unsigned __int64 d[64]; unsigned int fpcr, fpsr; } arm64_regs; + struct { struct { unsigned __int64 low, high; } q[32]; unsigned int fpcr, fpsr; } arm64_regs; } fp; /* selected by SERVER_CTX_FLOATING_POINT */ union { diff --git a/server/trace.c b/server/trace.c index 615542cff5..0acfc92b27 100644 --- a/server/trace.c +++ b/server/trace.c @@ -727,10 +727,11 @@ static void dump_varargs_context( const char *prefix, data_size_t size ) } if (ctx.flags & SERVER_CTX_FLOATING_POINT) { - for (i = 0; i < 64; i++) + for (i = 0; i < 32; i++) { - fprintf( stderr, ",d%u=", i ); - dump_uint64( "", &ctx.fp.arm64_regs.d[i] ); + fprintf( stderr, ",q%u=", i ); + dump_uint64( "", &ctx.fp.arm64_regs.q[i].high ); + dump_uint64( "", &ctx.fp.arm64_regs.q[i].low ); } fprintf( stderr, ",fpcr=%08x,fpsr=%08x", ctx.fp.arm64_regs.fpcr, ctx.fp.arm64_regs.fpsr ); } @@ -5602,6 +5603,7 @@ static const struct { "PIPE_CLOSING", STATUS_PIPE_CLOSING }, { "PIPE_CONNECTED", STATUS_PIPE_CONNECTED }, { "PIPE_DISCONNECTED", STATUS_PIPE_DISCONNECTED }, + { "PIPE_EMPTY", STATUS_PIPE_EMPTY }, { "PIPE_LISTENING", STATUS_PIPE_LISTENING }, { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE }, { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD },
1
0
0
0
Alexandre Julliard : ntdll: Fix FPU initialization for new threads on x86-64.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 0b2e65f53aeb4fbda660828ad06bff554fccb1d5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0b2e65f53aeb4fbda660828a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat Nov 2 14:34:25 2019 +0100 ntdll: Fix FPU initialization for new threads on x86-64. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48019
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_x86_64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 9645c5266c..c372f65b34 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -4195,12 +4195,13 @@ static void init_thread_context( CONTEXT *context, LPTHREAD_START_ROUTINE entry, { __asm__( "movw %%cs,%0" : "=m" (context->SegCs) ); __asm__( "movw %%ss,%0" : "=m" (context->SegSs) ); - __asm__( "fxsave %0" : "=m" (context->u.FltSave) ); context->Rcx = (ULONG_PTR)entry; context->Rdx = (ULONG_PTR)arg; context->Rsp = (ULONG_PTR)NtCurrentTeb()->Tib.StackBase - 0x28; context->Rip = (ULONG_PTR)relay; context->EFlags = 0x200; + context->u.FltSave.ControlWord = 0x27f; + context->u.FltSave.MxCsr = context->MxCsr = 0x1f80; }
1
0
0
0
Alexandre Julliard : ntdll: Initialize MxCsr for new threads on x86.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 1b3fa021909fcb13d1517a8df0b84b6a225e6b98 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1b3fa021909fcb13d1517a8d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat Nov 2 14:34:17 2019 +0100 ntdll: Initialize MxCsr for new threads on x86. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_i386.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index fd761246c5..e9dd0de2fc 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -2716,6 +2716,7 @@ static void init_thread_context( CONTEXT *context, LPTHREAD_START_ROUTINE entry, context->Eip = (DWORD)relay; context->FloatSave.ControlWord = 0x27f; ((XMM_SAVE_AREA32 *)context->ExtendedRegisters)->ControlWord = 0x27f; + ((XMM_SAVE_AREA32 *)context->ExtendedRegisters)->MxCsr = 0x1f80; } @@ -2741,7 +2742,7 @@ PCONTEXT DECLSPEC_HIDDEN attach_thread( LPTHREAD_START_ROUTINE entry, void *arg, ctx = (CONTEXT *)((char *)NtCurrentTeb()->Tib.StackBase - 16) - 1; init_thread_context( ctx, entry, arg, relay ); } - ctx->ContextFlags = CONTEXT_FULL; + ctx->ContextFlags = CONTEXT_FULL | CONTEXT_FLOATING_POINT | CONTEXT_EXTENDED_REGISTERS; LdrInitializeThunk( ctx, (void **)&ctx->Eax, 0, 0 ); return ctx; }
1
0
0
0
Alexandre Julliard : makefiles: Pass --nostdinc also to widl.
by Alexandre Julliard
04 Nov '19
04 Nov '19
Module: wine Branch: master Commit: 42cf6cce4bfdb1f4eb0b9b1b086310204a3bbb3a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=42cf6cce4bfdb1f4eb0b9b1b…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat Nov 2 13:47:32 2019 +0100 makefiles: Pass --nostdinc also to widl. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/makedep.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/makedep.c b/tools/makedep.c index 67dfea43bb..13c2bd2342 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -2786,6 +2786,7 @@ static void output_source_idl( struct makefile *make, struct incl_file *source, output( ": %s\n", tools_path( make, "widl" )); output( "\t%s -o $@", tools_path( make, "widl" ) ); output_filenames( target_flags ); + output_filename( "--nostdinc" ); output_filenames( defines ); output_filenames( get_expanded_make_var_array( make, "EXTRAIDLFLAGS" )); output_filenames( get_expanded_file_local_var( make, obj, "EXTRAIDLFLAGS" ));
1
0
0
0
← Newer
1
...
83
84
85
86
87
88
89
90
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200