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
February 2021
----- 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
2 participants
915 discussions
Start a n
N
ew thread
Jacek Caban : ntdll: Use syscall frame in x86_64 call_raise_user_exception_dispatcher implementation.
by Alexandre Julliard
24 Feb '21
24 Feb '21
Module: wine Branch: master Commit: 43900dd621cd0564fec3fdd3896fec84f4377e17 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=43900dd621cd0564fec3fdd3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Feb 24 18:25:49 2021 +0100 ntdll: Use syscall frame in x86_64 call_raise_user_exception_dispatcher implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/signal_x86_64.c | 18 ++++-------------- dlls/ntdll/unix/unix_private.h | 2 +- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index df83094750e..cd0d0a2c1b0 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -2148,20 +2148,10 @@ __ASM_GLOBAL_FUNC( call_user_apc_dispatcher, /*********************************************************************** * call_raise_user_exception_dispatcher */ -__ASM_GLOBAL_FUNC( call_raise_user_exception_dispatcher, - "movq %gs:0x30,%rdx\n\t" - "movq 0x328(%rdx),%rax\n\t" /* amd64_thread_data()->syscall_frame */ - "leaq -0x340(%rax),%r8\n\t" - "andq $~63,%r8\n\t" - "fxrstor64 (%r8)\n\t" - "movq 0x8(%rax),%rbx\n\t" /* frame->rbx */ - "movq 0x20(%rax),%rsi\n\t" /* frame->rsi */ - "movq 0x28(%rax),%rdi\n\t" /* frame->rdi */ - "movq 0x50(%rax),%r12\n\t" /* frame->r12 */ - "movq 0x98(%rax),%rbp\n\t" /* frame->rbp */ - "movq $0,0x328(%rdx)\n\t" - "leaq 0xa8(%rax),%rsp\n\t" - "jmpq *%rcx" ) +void WINAPI call_raise_user_exception_dispatcher( NTSTATUS (WINAPI *dispatcher)(void) ) +{ + amd64_thread_data()->syscall_frame->rip = (UINT64)dispatcher; +} /*********************************************************************** diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index c98b11701e4..cf680218849 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -246,7 +246,7 @@ extern void WINAPI DECLSPEC_NORETURN call_user_apc_dispatcher( CONTEXT *context_ void (WINAPI *dispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULONG_PTR,PNTAPCFUNC) ) DECLSPEC_HIDDEN; extern void WINAPI DECLSPEC_NORETURN call_user_exception_dispatcher( EXCEPTION_RECORD *rec, CONTEXT *context, NTSTATUS (WINAPI *dispatcher)(EXCEPTION_RECORD*,CONTEXT*) ) DECLSPEC_HIDDEN; -extern void WINAPI DECLSPEC_NORETURN call_raise_user_exception_dispatcher( NTSTATUS (WINAPI *dispatcher)(void) ) DECLSPEC_HIDDEN; +extern void WINAPI call_raise_user_exception_dispatcher( NTSTATUS (WINAPI *dispatcher)(void) ) DECLSPEC_HIDDEN; extern void *get_syscall_frame(void) DECLSPEC_HIDDEN; extern void set_syscall_frame(void *frame) DECLSPEC_HIDDEN;
1
0
0
0
Piotr Caban : msvcrt: Improve asinf compatibility with native ucrtbase.
by Alexandre Julliard
24 Feb '21
24 Feb '21
Module: wine Branch: master Commit: 0b8db612713d6a92109396951d6ac53fd23d6039 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0b8db612713d6a9210939695…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Feb 24 16:32:07 2021 +0100 msvcrt: Improve asinf compatibility with native ucrtbase. It reduces number of different asinf results from 5413834 to 639464. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/math.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 83e5d1e65da..6abc1893a52 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -356,23 +356,25 @@ float CDECL acosf( float x ) static float asinf_R(float z) { /* coefficients for R(x^2) */ - static const float pS0 = 1.6666586697e-01, - pS1 = -4.2743422091e-02, - pS2 = -8.6563630030e-03, - qS1 = -7.0662963390e-01; + static const float p1 = 1.66666672e-01, + p2 = -5.11644611e-02, + p3 = -1.21124933e-02, + p4 = -3.58742251e-03, + q1 = -7.56982703e-01; float p, q; - p = z * (pS0 + z * (pS1 + z * pS2)); - q = 1.0f + z * qS1; + p = z * (p1 + z * (p2 + z * (p3 + z * p4))); + q = 1.0f + z * q1; return p / q; } float CDECL asinf( float x ) { static const double pio2 = 1.570796326794896558e+00; + static const float pio4_hi = 0.785398125648; + static const float pio2_lo = 7.54978941586e-08; - double s; - float z; + float s, z, f, c; unsigned int hx, ix; hx = *(unsigned int*)&x; @@ -391,8 +393,11 @@ float CDECL asinf( float x ) } /* 1 > |x| >= 0.5 */ z = (1 - fabsf(x)) * 0.5f; - s = sqrt(z); - x = pio2 - 2 * (s + s * asinf_R(z)); + s = sqrtf(z); + /* f+c = sqrt(z) */ + *(unsigned int*)&f = *(unsigned int*)&s & 0xffff0000; + c = (z - f * f) / (s + f); + x = pio4_hi - (2 * s * asinf_R(z) - (pio2_lo - 2 * c) - (pio4_hi - 2 * f)); if (hx >> 31) return -x; return x;
1
0
0
0
Jefferson Carpenter : msxml3/tests: Test mxwriter domdoc output.
by Alexandre Julliard
24 Feb '21
24 Feb '21
Module: wine Branch: master Commit: eca796bf75da6325a479352d0983eaba7455237c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eca796bf75da6325a479352d…
Author: Jefferson Carpenter <jeffersoncarpenter2(a)gmail.com> Date: Wed Feb 24 12:48:02 2021 +0300 msxml3/tests: Test mxwriter domdoc output. Signed-off-by: Jefferson Carpenter <jeffersoncarpenter2(a)gmail.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msxml3/tests/saxreader.c | 194 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 194 insertions(+) diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c index ab814c5f764..35d0e71545b 100644 --- a/dlls/msxml3/tests/saxreader.c +++ b/dlls/msxml3/tests/saxreader.c @@ -4367,6 +4367,199 @@ static void test_mxwriter_stream(void) free_bstrs(); } +static void test_mxwriter_domdoc(void) +{ + ISAXContentHandler *content; + IXMLDOMDocument *domdoc; + IMXWriter *writer; + HRESULT hr; + VARIANT dest; + IXMLDOMElement *root = NULL; + IXMLDOMNodeList *node_list = NULL; + IXMLDOMNode *node = NULL; + LONG list_length = 0; + BSTR str; + + /* Create writer and attach DOMDocument output */ + hr = CoCreateInstance(&CLSID_MXXMLWriter60, NULL, CLSCTX_INPROC_SERVER, &IID_IMXWriter, (void**)&writer); + ok(hr == S_OK, "Failed to create a writer, hr %#x.\n", hr); + + hr = IMXWriter_QueryInterface(writer, &IID_ISAXContentHandler, (void**)&content); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = CoCreateInstance(&CLSID_DOMDocument60, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (void **)&domdoc); + ok(hr == S_OK, "Failed to create a document, hr %#x.\n", hr); + + V_VT(&dest) = VT_DISPATCH; + V_DISPATCH(&dest) = (IDispatch *)domdoc; + + hr = IMXWriter_put_output(writer, dest); +todo_wine + ok(hr == S_OK, "Failed to set writer output, hr %#x.\n", hr); + if (FAILED(hr)) + { + IXMLDOMDocument_Release(domdoc); + IMXWriter_Release(writer); + return; + } + + /* Add root element to document. */ + hr = IXMLDOMDocument_createElement(domdoc, _bstr_("TestElement"), &root); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + hr = IXMLDOMDocument_appendChild(domdoc, (IXMLDOMNode *)root, NULL); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + IXMLDOMElement_Release(root); + + hr = IXMLDOMDocument_get_documentElement(domdoc, &root); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(root != NULL, "Unexpected document root.\n"); + IXMLDOMElement_Release(root); + + /* startDocument clears root element and disables methods. */ + hr = ISAXContentHandler_startDocument(content); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IXMLDOMDocument_get_documentElement(domdoc, &root); +todo_wine + ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr); + + hr = IXMLDOMDocument_createElement(domdoc, _bstr_("TestElement"), &root); +todo_wine + ok(hr == E_FAIL, "Unexpected hr %#x.\n", hr); + + /* startElement allows document root node to be accessed. */ + hr = ISAXContentHandler_startElement(content, L"", 0, L"", 0, L"BankAccount", 11, NULL); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IXMLDOMDocument_get_documentElement(domdoc, &root); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(root != NULL, "Unexpected document root.\n"); + + hr = IXMLDOMElement_get_nodeName(root, &str); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); +todo_wine + ok(!lstrcmpW(L"BankAccount", str), "Unexpected name %s.\n", wine_dbgstr_w(str)); + SysFreeString(str); + + /* startElement immediately updates previous node. */ + hr = ISAXContentHandler_startElement(content, L"", 0, L"", 0, L"Number", 6, NULL); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IXMLDOMElement_get_childNodes(root, &node_list); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IXMLDOMNodeList_get_length(node_list, &list_length); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); +todo_wine + ok(list_length == 1, "list length %i, expected 1\n", list_length); + + hr = IXMLDOMNodeList_get_item(node_list, 0, &node); +todo_wine + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IXMLDOMNode_get_nodeName(node, &str); +todo_wine { + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(!lstrcmpW(L"Number", str), "got %s\n", wine_dbgstr_w(str)); +} + SysFreeString(str); + + /* characters not immediately visible. */ + hr = ISAXContentHandler_characters(content, L"12345", 5); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IXMLDOMNode_get_text(node, &str); +todo_wine { + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(!lstrcmpW(L"", str), "got %s\n", wine_dbgstr_w(str)); +} + SysFreeString(str); + + /* characters visible after endElement. */ + hr = ISAXContentHandler_endElement(content, L"", 0, L"", 0, L"Number", 6); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IXMLDOMNode_get_text(node, &str); +todo_wine { + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(!lstrcmpW(L"12345", str), "got %s\n", wine_dbgstr_w(str)); +} + SysFreeString(str); + + IXMLDOMNode_Release(node); + + /* second startElement updates the existing node list. */ + + hr = ISAXContentHandler_startElement(content, L"", 0, L"", 0, L"Name", 4, NULL); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = ISAXContentHandler_characters(content, L"Captain Ahab", 12); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = ISAXContentHandler_endElement(content, L"", 0, L"", 0, L"Name", 4); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = ISAXContentHandler_endElement(content, L"", 0, L"", 0, L"BankAccount", 11); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IXMLDOMNodeList_get_length(node_list, &list_length); +todo_wine { + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(2 == list_length, "list length %i, expected 2\n", list_length); +} + hr = IXMLDOMNodeList_get_item(node_list, 1, &node); +todo_wine + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IXMLDOMNode_get_nodeName(node, &str); +todo_wine { + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(!lstrcmpW(L"Name", str), "got %s\n", wine_dbgstr_w(str)); +} + SysFreeString(str); + + hr = IXMLDOMNode_get_text(node, &str); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); +todo_wine { + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(!lstrcmpW(L"Captain Ahab", str), "got %s\n", wine_dbgstr_w(str)); +} + SysFreeString(str); + + IXMLDOMNode_Release(node); + IXMLDOMNodeList_Release(node_list); + IXMLDOMElement_Release(root); + + /* endDocument makes document modifiable again. */ + + hr = ISAXContentHandler_endDocument(content); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IXMLDOMDocument_createElement(domdoc, _bstr_("TestElement"), &root); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + IXMLDOMElement_Release(root); + + /* finally check doc output */ + hr = IXMLDOMDocument_get_xml(domdoc, &str); +todo_wine { + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(!lstrcmpW( + L"<BankAccount>" + "<Number>12345</Number>" + "<Name>Captain Ahab</Name>" + "</BankAccount>\r\n", + str), + "got %s\n", wine_dbgstr_w(str)); +} + SysFreeString(str); + + IXMLDOMDocument_Release(domdoc); + ISAXContentHandler_Release(content); + IMXWriter_Release(writer); + + free_bstrs(); +} + static const char *encoding_names[] = { "iso-8859-1", "iso-8859-2", @@ -5768,6 +5961,7 @@ START_TEST(saxreader) test_mxwriter_properties(); test_mxwriter_flush(); test_mxwriter_stream(); + test_mxwriter_domdoc(); test_mxwriter_encoding(); test_mxwriter_dispex(); test_mxwriter_indent();
1
0
0
0
Alexandre Julliard : winebuild: Simplify constant loading on ARM.
by Alexandre Julliard
24 Feb '21
24 Feb '21
Module: wine Branch: master Commit: abf4747ba786931a431533e84870d6b3af7e55c4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=abf4747ba786931a431533e8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 24 10:38:50 2021 +0100 winebuild: Simplify constant loading on ARM. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/import.c | 43 ++++++++++++++++++++++--------------------- tools/winebuild/spec32.c | 20 ++++++++++++-------- 2 files changed, 34 insertions(+), 29 deletions(-) diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 791ea6e400c..57b79ff187d 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -1166,23 +1166,15 @@ static void output_delayed_import_thunks( const DLLSPEC *spec ) switch(target_cpu) { case CPU_x86: - output( "\tmovl $%d, %%eax\n", (idx << 16) | j ); - output( "\tjmp %s\n", asm_name("__wine_delay_load_asm") ); - break; case CPU_x86_64: - output( "\tmovq $%d,%%rax\n", (idx << 16) | j ); + output( "\tmovl $%d,%%eax\n", (idx << 16) | j ); output( "\tjmp %s\n", asm_name("__wine_delay_load_asm") ); break; case CPU_ARM: - { - unsigned int mask, count = 0, val = (idx << 16) | j; - - for (mask = 0xff; mask; mask <<= 8) - if (val & mask) output( "\t%s IP,#%u\n", count++ ? "add" : "mov", val & mask ); - if (!count) output( "\tmov IP,#0\n" ); + output( "\tmov ip, #%u\n", j ); + if (idx) output( "\tmovt ip, #%u\n", idx ); output( "\tb %s\n", asm_name("__wine_delay_load_asm") ); break; - } case CPU_ARM64: if (idx) { @@ -1370,12 +1362,15 @@ void output_stubs( DLLSPEC *spec ) } else { - output( "\tldr r0,1f\n"); - output( "\tldr r1,1f+4\n"); + output( "\tmovw r0,:lower16:.L__wine_spec_file_name\n"); + output( "\tmovt r0,:upper16:.L__wine_spec_file_name\n"); + if (exp_name) + { + output( "\tmovw r1,:lower16:.L%s_string\n", name ); + output( "\tmovt r1,:upper16:.L%s_string\n", name ); + } + else output( "\tmov r1,#%u\n", odp->ordinal ); output( "\tbl %s\n", asm_name("__wine_spec_unimplemented_stub") ); - output( "1:\t.long .L__wine_spec_file_name\n" ); - if (exp_name) output( "\t.long .L%s_string\n", name ); - else output( "\t.long %u\n", odp->ordinal ); } break; case CPU_ARM64: @@ -1823,15 +1818,21 @@ void output_syscalls( DLLSPEC *spec ) break; case CPU_ARM: output( "\tpush {r4,lr}\n" ); - output( "\tldr r4, 3f\n"); - output( "\tldr ip, 2f\n"); - if (UsePIC) output( "1:\tadd ip, pc\n" ); + output( "\tmov r4, #%u\n", i ); + if (UsePIC) + { + output( "\tldr ip, 2f\n"); + output( "1:\tadd ip, pc\n" ); + } + else + { + output( "\tmovw ip, :lower16:%s\n", asm_name("__wine_syscall_dispatcher") ); + output( "\tmovt ip, :upper16:%s\n", asm_name("__wine_syscall_dispatcher") ); + } output( "\tldr ip, [ip]\n"); output( "\tblx ip\n"); output( "\tpop {r4,pc}\n" ); if (UsePIC) output( "2:\t.long %s-1b-%u\n", asm_name("__wine_syscall_dispatcher"), thumb_mode ? 4 : 8 ); - else output( "2:\t.long %s\n", asm_name("__wine_syscall_dispatcher") ); - output( "3:\t.long %u\n", i ); break; case CPU_ARM64: output( "\tstp x29, x30, [sp,#-16]!\n" ); diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 546d058b199..02029056b30 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -297,14 +297,12 @@ static void output_relay_debug( DLLSPEC *spec ) case CPU_ARM: { - unsigned int mask, val, count = 0; int j, has_float = 0; if (strcmp( float_abi_option, "soft" )) for (j = 0; j < odp->u.func.nb_args && !has_float; j++) has_float = is_float_arg( odp, j ); - val = (odp->u.func.args_str_offset << 16) | (i - spec->base); output( "\t.align %d\n", get_alignment(4) ); if (thumb_mode) output( "\t.thumb_func\n" ); output( "__wine_spec_relay_entry_point_%d:\n", i ); @@ -314,18 +312,24 @@ static void output_relay_debug( DLLSPEC *spec ) if (has_float) output( "\tvpush {s0-s15}\n" ); output( "\tpush {LR}\n" ); output( "\tsub SP, #4\n"); - for (mask = 0xff; mask; mask <<= 8) - if (val & mask) output( "\t%s r1,#%u\n", count++ ? "add" : "mov", val & mask ); - if (!count) output( "\tmov r1,#0\n" ); - output( "\tldr r0, 2f\n"); - if (UsePIC) output( "1:\tadd r0, PC\n"); + output( "\tmov r1,#%u\n", i - spec->base ); + output( "\tmovt r1,#%u\n", odp->u.func.args_str_offset ); + if (UsePIC) + { + output( "\tldr r0, 2f\n"); + output( "1:\tadd r0, PC\n"); + } + else + { + output( "\tmovw r0, :lower16:.L__wine_spec_relay_descr\n" ); + output( "\tmovt r0, :upper16:.L__wine_spec_relay_descr\n" ); + } output( "\tldr IP, [r0, #4]\n"); output( "\tblx IP\n"); output( "\tldr IP, [SP, #4]\n" ); output( "\tadd SP, #%u\n", 24 + (has_float ? 64 : 0) ); output( "\tbx IP\n"); if (UsePIC) output( "2:\t.long .L__wine_spec_relay_descr-1b-%u\n", thumb_mode ? 4 : 8 ); - else output( "2:\t.long .L__wine_spec_relay_descr\n" ); output_cfi( ".cfi_endproc" ); break; }
1
0
0
0
Alexandre Julliard : winebuild: Fix relay entry points for Thumb mode.
by Alexandre Julliard
24 Feb '21
24 Feb '21
Module: wine Branch: master Commit: b1fe783adee51b5c3d3c0dc58e5dc1e81fd46299 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b1fe783adee51b5c3d3c0dc5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 24 10:34:58 2021 +0100 winebuild: Fix relay entry points for Thumb mode. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/spec32.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 8d7e48d2da4..546d058b199 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -236,7 +236,7 @@ static void output_relay_debug( DLLSPEC *spec ) ORDDEF *odp = spec->ordinals[i]; if (needs_relay( odp )) - output( "\t.long .L__wine_spec_relay_entry_point_%d-__wine_spec_relay_entry_points\n", i ); + output( "\t.long __wine_spec_relay_entry_point_%d-__wine_spec_relay_entry_points\n", i ); else output( "\t.long 0\n" ); } @@ -249,7 +249,6 @@ static void output_relay_debug( DLLSPEC *spec ) /* then the relay thunks */ output( "\t.text\n" ); - if (thumb_mode) output( "\t.thumb_func\n" ); output( "__wine_spec_relay_entry_points:\n" ); output( "\tnop\n" ); /* to avoid 0 offset */ @@ -264,7 +263,7 @@ static void output_relay_debug( DLLSPEC *spec ) case CPU_x86: output( "\t.align %d\n", get_alignment(4) ); output( "\t.long 0x90909090,0x90909090\n" ); - output( ".L__wine_spec_relay_entry_point_%d:\n", i ); + output( "__wine_spec_relay_entry_point_%d:\n", i ); output_cfi( ".cfi_startproc" ); output( "\t.byte 0x8b,0xff,0x55,0x8b,0xec,0x5d\n" ); /* hotpatch prolog */ if (odp->flags & (FLAG_THISCALL | FLAG_FASTCALL)) /* add the register arguments */ @@ -308,7 +307,7 @@ static void output_relay_debug( DLLSPEC *spec ) val = (odp->u.func.args_str_offset << 16) | (i - spec->base); output( "\t.align %d\n", get_alignment(4) ); if (thumb_mode) output( "\t.thumb_func\n" ); - output( ".L__wine_spec_relay_entry_point_%d:\n", i ); + output( "__wine_spec_relay_entry_point_%d:\n", i ); output_cfi( ".cfi_startproc" ); output( "\tpush {r0-r3}\n" ); output( "\tmov r2, SP\n"); @@ -333,7 +332,7 @@ static void output_relay_debug( DLLSPEC *spec ) case CPU_ARM64: output( "\t.align %d\n", get_alignment(4) ); - output( ".L__wine_spec_relay_entry_point_%d:\n", i ); + output( "__wine_spec_relay_entry_point_%d:\n", i ); output_cfi( ".cfi_startproc" ); switch (odp->u.func.nb_args) { @@ -372,7 +371,7 @@ static void output_relay_debug( DLLSPEC *spec ) case CPU_x86_64: output( "\t.align %d\n", get_alignment(4) ); output( "\t.long 0x90909090,0x90909090\n" ); - output( ".L__wine_spec_relay_entry_point_%d:\n", i ); + output( "__wine_spec_relay_entry_point_%d:\n", i ); output_cfi( ".cfi_startproc" ); switch (odp->u.func.nb_args) {
1
0
0
0
Alexandre Julliard : winebuild: Set Thumb bit in CPSR register on syscall entry.
by Alexandre Julliard
24 Feb '21
24 Feb '21
Module: wine Branch: master Commit: 4ef8e946f161ec5f7140699f6f97d9119a4ec7b2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4ef8e946f161ec5f7140699f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 24 10:34:15 2021 +0100 winebuild: Set Thumb bit in CPSR register on syscall entry. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/exception.c | 3 ++- tools/winebuild/import.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index 06d8246a566..397de7dad98 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -4233,7 +4233,8 @@ static void test_thread_context(void) COMPARE( R9 ); COMPARE( R10 ); COMPARE( R11 ); - COMPARE( Cpsr ); + ok( (context.Cpsr & 0xff0f0000) == (expect.Cpsr & 0xff0f0000), + "wrong Cpsr %08x/%08x\n", context.Cpsr, expect.Cpsr ); ok( context.Sp == expect.Sp - 8, "wrong Sp %08x/%08x\n", context.Sp, expect.Sp - 8 ); /* Pc is somewhere close to the NtGetContextThread implementation */ diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 2fa9d3d430b..791ea6e400c 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -1611,6 +1611,7 @@ static void output_syscall_dispatcher( int count, const char *variant ) output( "\tmrc p15, 0, r7, c13, c0, 2\n" ); /* NtCurrentTeb() */ output( "\tadd r7, #0x1d8\n" ); /* arm_thread_data()->syscall_frame */ output( "\tmrs ip, CPSR\n" ); + output( "\tbfi ip, lr, #5, #1\n" ); /* set thumb bit */ output( "\tstr ip, [sp, #4]\n" ); output( "\tstr sp, [r7]\n" ); /* syscall frame */ output( "\tldr r5, 6f+4\n");
1
0
0
0
Alexandre Julliard : traffic: Use --prefer-native instead of DLL_WINE_PREATTACH.
by Alexandre Julliard
24 Feb '21
24 Feb '21
Module: wine Branch: master Commit: 7905c3164224399a6ef7dc92a95b661182e366ef URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7905c3164224399a6ef7dc92…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 24 10:29:19 2021 +0100 traffic: Use --prefer-native instead of DLL_WINE_PREATTACH. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/traffic/Makefile.in | 2 +- dlls/traffic/traffic_main.c | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/dlls/traffic/Makefile.in b/dlls/traffic/Makefile.in index e823eb380cb..a18224ac4e1 100644 --- a/dlls/traffic/Makefile.in +++ b/dlls/traffic/Makefile.in @@ -1,6 +1,6 @@ MODULE = traffic.dll -EXTRADLLFLAGS = -mno-cygwin +EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native C_SRCS = \ traffic_main.c diff --git a/dlls/traffic/traffic_main.c b/dlls/traffic/traffic_main.c index 6b8a9751e19..87646622346 100644 --- a/dlls/traffic/traffic_main.c +++ b/dlls/traffic/traffic_main.c @@ -26,24 +26,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(traffic); -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); - - switch (fdwReason) - { - case DLL_WINE_PREATTACH: - return FALSE; /* prefer native version */ - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hinstDLL); - break; - default: - break; - } - - return TRUE; -} - /***************************************************************************** * TcRegisterClient [TRAFFIC.@] */
1
0
0
0
Alexandre Julliard : tdh: Use --prefer-native instead of DLL_WINE_PREATTACH.
by Alexandre Julliard
24 Feb '21
24 Feb '21
Module: wine Branch: master Commit: 4d52323893f95ea8b8f3308a4e815cdf70635c30 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4d52323893f95ea8b8f3308a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 24 10:29:16 2021 +0100 tdh: Use --prefer-native instead of DLL_WINE_PREATTACH. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/tdh/Makefile.in | 2 +- dlls/tdh/tdh_main.c | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/dlls/tdh/Makefile.in b/dlls/tdh/Makefile.in index 66bc18c88ee..eab8b56e264 100644 --- a/dlls/tdh/Makefile.in +++ b/dlls/tdh/Makefile.in @@ -1,6 +1,6 @@ MODULE = tdh.dll -EXTRADLLFLAGS = -mno-cygwin +EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native C_SRCS = \ tdh_main.c diff --git a/dlls/tdh/tdh_main.c b/dlls/tdh/tdh_main.c index 29e7d50c241..2e6a9e69a38 100644 --- a/dlls/tdh/tdh_main.c +++ b/dlls/tdh/tdh_main.c @@ -27,22 +27,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(tdh); -BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) -{ - TRACE("(%p, %u, %p)\n", instance, reason, reserved); - - switch (reason) - { - case DLL_WINE_PREATTACH: - return FALSE; /* prefer native version */ - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(instance); - break; - } - - return TRUE; -} - ULONG WINAPI TdhLoadManifest(LPWSTR manifest) { FIXME("(%s): stub\n", debugstr_w(manifest));
1
0
0
0
Alexandre Julliard : t2embed: Use --prefer-native instead of DLL_WINE_PREATTACH.
by Alexandre Julliard
24 Feb '21
24 Feb '21
Module: wine Branch: master Commit: a8aecf946688cba1a98aa7355d904f5e9dfe8ebc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a8aecf946688cba1a98aa735…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 24 10:29:12 2021 +0100 t2embed: Use --prefer-native instead of DLL_WINE_PREATTACH. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/t2embed/Makefile.in | 2 +- dlls/t2embed/main.c | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/dlls/t2embed/Makefile.in b/dlls/t2embed/Makefile.in index f2b0583f987..faceac9b3a4 100644 --- a/dlls/t2embed/Makefile.in +++ b/dlls/t2embed/Makefile.in @@ -2,7 +2,7 @@ MODULE = t2embed.dll IMPORTLIB = t2embed IMPORTS = gdi32 advapi32 -EXTRADLLFLAGS = -mno-cygwin +EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native C_SRCS = \ main.c diff --git a/dlls/t2embed/main.c b/dlls/t2embed/main.c index 12005640281..f79d4d69eb5 100644 --- a/dlls/t2embed/main.c +++ b/dlls/t2embed/main.c @@ -28,20 +28,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(t2embed); -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - switch (fdwReason) - { - case DLL_WINE_PREATTACH: - return FALSE; /* prefer native version */ - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hinstDLL); - break; - } - - return TRUE; -} - LONG WINAPI TTLoadEmbeddedFont(HANDLE *phFontReference, ULONG ulFlags, ULONG *pulPrivStatus, ULONG ulPrivs, ULONG *pulStatus, READEMBEDPROC lpfnReadFromStream,
1
0
0
0
Alexandre Julliard : sxs: Use --prefer-native instead of DLL_WINE_PREATTACH.
by Alexandre Julliard
24 Feb '21
24 Feb '21
Module: wine Branch: master Commit: 36e02dc7bcafb72d04aa429c9c1e16c101ecb1eb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=36e02dc7bcafb72d04aa429c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Feb 24 10:28:56 2021 +0100 sxs: Use --prefer-native instead of DLL_WINE_PREATTACH. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/sxs/Makefile.in | 2 +- dlls/sxs/sxs.c | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/dlls/sxs/Makefile.in b/dlls/sxs/Makefile.in index 05794029f2c..4e87d764a30 100644 --- a/dlls/sxs/Makefile.in +++ b/dlls/sxs/Makefile.in @@ -2,7 +2,7 @@ MODULE = sxs.dll IMPORTS = oleaut32 ole32 IMPORTLIB = sxs -EXTRADLLFLAGS = -mno-cygwin +EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native C_SRCS = \ cache.c \ diff --git a/dlls/sxs/sxs.c b/dlls/sxs/sxs.c index cd1d0f7bb56..2fa4dc0262b 100644 --- a/dlls/sxs/sxs.c +++ b/dlls/sxs/sxs.c @@ -28,23 +28,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(sxs); -/*********************************************************************** - * DllMain (SXS.@) - * - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - switch(fdwReason) - { - case DLL_WINE_PREATTACH: - return FALSE; /* prefer native version */ - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls( hinstDLL ); - break; - } - return TRUE; -} - typedef struct _SXS_GUID_INFORMATION_CLR { DWORD cbSize;
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
...
92
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
91
92
Results per page:
10
25
50
100
200