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
June 2009
----- 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
5 participants
1115 discussions
Start a n
N
ew thread
Rein Klazes : gdi32/tests: Show that there is an upper limit to the width of a font that can be specified .
by Alexandre Julliard
25 Jun '09
25 Jun '09
Module: wine Branch: master Commit: 08ca2fa6a9576c7b202915b4e111db3dcd2aaf67 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=08ca2fa6a9576c7b202915b4e…
Author: Rein Klazes <wijn(a)online.nl> Date: Thu Jun 25 09:40:46 2009 +0200 gdi32/tests: Show that there is an upper limit to the width of a font that can be specified. --- dlls/gdi32/tests/font.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 75 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 88e1797..b8b5084 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -2911,10 +2911,82 @@ static void test_GetGlyphOutline(void) DeleteDC(hdc); } +/* bug #9995: there is a limit to the character width that can be specified */ +void test_GetTextMetrics2( const char *fontname) +{ + HFONT of, hf; + HDC hdc; + TEXTMETRICA tm; + LOGFONTA lf; + BOOL ret; + int avecharw[3], maxcharw[3]; + + if (!is_truetype_font_installed( fontname)) { + skip("%s is not installed\n", fontname); + return; + } + hdc = CreateCompatibleDC(0); + ok( hdc != NULL, "CreateCompatibleDC failed\n"); + /* select width = 0 */ + hf = CreateFontA( -11, 0, 0, 0, FW_REGULAR, FALSE, FALSE, FALSE, + DEFAULT_CHARSET, OUT_TT_PRECIS, CLIP_LH_ANGLES, + DEFAULT_QUALITY, VARIABLE_PITCH, + fontname); + ok( hf != NULL, "CreateFontA failed\n"); + of = SelectObject( hdc, hf); + ret = GetObjectA( hf, sizeof( lf), &lf); + ret = GetTextMetricsA( hdc, &tm); + ok(ret, "GetTextMetricsA error %u, ", GetLastError()); + avecharw[0] =tm.tmAveCharWidth; + maxcharw[0] =tm.tmMaxCharWidth; + SelectObject( hdc, of); + DeleteObject( hf); + /* select LARGE width = 1023 */ + hf = CreateFontA( -11, 1023, 0, 0, FW_REGULAR, FALSE, FALSE, FALSE, + DEFAULT_CHARSET, OUT_TT_PRECIS, CLIP_LH_ANGLES, + DEFAULT_QUALITY, VARIABLE_PITCH, + fontname); + ok( hf != NULL, "CreateFontA failed\n"); + of = SelectObject( hdc, hf); + ret = GetObjectA( hf, sizeof( lf), &lf); + ret = GetTextMetricsA( hdc, &tm); + ok(ret, "GetTextMetricsA error %u, ", GetLastError()); + avecharw[1] =tm.tmAveCharWidth; + maxcharw[1] =tm.tmMaxCharWidth; + SelectObject( hdc, of); + DeleteObject( hf); + /* select TOOLARGE width = 1536 */ + hf = CreateFontA( -11, 1536, 0, 0, FW_REGULAR, FALSE, FALSE, FALSE, + DEFAULT_CHARSET, OUT_TT_PRECIS, CLIP_LH_ANGLES, + DEFAULT_QUALITY, VARIABLE_PITCH, + fontname); + ok( hf != NULL, "CreateFontA failed\n"); + of = SelectObject( hdc, hf); + ret = GetObjectA( hf, sizeof( lf), &lf); + ret = GetTextMetricsA( hdc, &tm); + ok(ret, "GetTextMetricsA error %u, ", GetLastError()); + avecharw[2] =tm.tmAveCharWidth; + maxcharw[2] =tm.tmMaxCharWidth; + SelectObject( hdc, of); + DeleteObject( hf); + /* tests */ + ok( avecharw[1] > 10 * avecharw[0], "Av. charwidth not large ( %d cmp.to %d)\n", + avecharw[1], avecharw[0]); + ok( maxcharw[1] > 10 * maxcharw[0], "Max charwidth not large ( %d cmp.to %d)\n", + maxcharw[1], maxcharw[0]); +todo_wine { + ok( avecharw[2] == avecharw[0], "Unexpected Av. charwidth ( %d cmp.to %d)\n", + avecharw[2], avecharw[0]); + ok( maxcharw[2] == maxcharw[0], "Unexpected Max charwidth ( %d cmp.to %d)\n", + maxcharw[2], maxcharw[0]); +} + /* clean up */ + DeleteDC(hdc); +} + START_TEST(font) { init(); - test_logfont(); test_bitmap_font(); test_outline_font(); @@ -2949,4 +3021,6 @@ START_TEST(font) test_GdiRealizationInfo(); test_GetTextFace(); test_GetGlyphOutline(); + test_GetTextMetrics2( "Tahoma"); + test_GetTextMetrics2( "Arial"); }
1
0
0
0
Alexandre Julliard : kernel32: Add call frame annotations in x86 assembly code.
by Alexandre Julliard
25 Jun '09
25 Jun '09
Module: wine Branch: master Commit: 69bb29ced960e9e126d82c67c446645588b2f195 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=69bb29ced960e9e126d82c67c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 25 12:02:59 2009 +0200 kernel32: Add call frame annotations in x86 assembly code. --- dlls/kernel32/relay16.c | 49 +++++++++++++++++++++++++++------------------- 1 files changed, 29 insertions(+), 20 deletions(-) diff --git a/dlls/kernel32/relay16.c b/dlls/kernel32/relay16.c index a2a550c..b3ac234 100644 --- a/dlls/kernel32/relay16.c +++ b/dlls/kernel32/relay16.c @@ -283,26 +283,35 @@ static const CALLFROM16 *get_entry_point( STACK16FRAME *frame, LPSTR module, LPS extern int call_entry_point( void *func, int nb_args, const int *args ); __ASM_GLOBAL_FUNC( call_entry_point, - "\tpushl %ebp\n" - "\tmovl %esp,%ebp\n" - "\tpushl %esi\n" - "\tpushl %edi\n" - "\tmovl 12(%ebp),%edx\n" - "\tshll $2,%edx\n" - "\tjz 1f\n" - "\tsubl %edx,%esp\n" - "\tandl $~15,%esp\n" - "\tmovl 12(%ebp),%ecx\n" - "\tmovl 16(%ebp),%esi\n" - "\tmovl %esp,%edi\n" - "\tcld\n" - "\trep; movsl\n" - "1:\tcall *8(%ebp)\n" - "\tleal -8(%ebp),%esp\n" - "\tpopl %edi\n" - "\tpopl %esi\n" - "\tpopl %ebp\n" - "\tret" ) + "pushl %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") + "movl %esp,%ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") + "pushl %esi\n\t" + __ASM_CFI(".cfi_rel_offset %esi,-4\n\t") + "pushl %edi\n\t" + __ASM_CFI(".cfi_rel_offset %edi,-8\n\t") + "movl 12(%ebp),%edx\n\t" + "shll $2,%edx\n\t" + "jz 1f\n\t" + "subl %edx,%esp\n\t" + "andl $~15,%esp\n\t" + "movl 12(%ebp),%ecx\n\t" + "movl 16(%ebp),%esi\n\t" + "movl %esp,%edi\n\t" + "cld\n\t" + "rep; movsl\n" + "1:\tcall *8(%ebp)\n\t" + "leal -8(%ebp),%esp\n\t" + "popl %edi\n\t" + __ASM_CFI(".cfi_same_value %edi\n\t") + "popl %esi\n\t" + __ASM_CFI(".cfi_same_value %esi\n\t") + "popl %ebp\n\t" + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") + "ret" ) /***********************************************************************
1
0
0
0
Alexandre Julliard : ntdll: Add call frame annotations in x86 assembly code .
by Alexandre Julliard
25 Jun '09
25 Jun '09
Module: wine Branch: master Commit: 0c463415432769df5bfe295a071380f3eebe6283 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0c463415432769df5bfe295a0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 25 12:02:53 2009 +0200 ntdll: Add call frame annotations in x86 assembly code. --- dlls/ntdll/loader.c | 7 +++ dlls/ntdll/relay.c | 49 +++++++++++++--------- dlls/ntdll/signal_i386.c | 99 ++++++++++++++++++++++++++++------------------ 3 files changed, 96 insertions(+), 59 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 166766b..2f9b41e 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -148,8 +148,12 @@ static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len ) extern BOOL call_dll_entry_point( DLLENTRYPROC proc, void *module, UINT reason, void *reserved ); __ASM_GLOBAL_FUNC(call_dll_entry_point, "pushl %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") "movl %esp,%ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") "pushl %ebx\n\t" + __ASM_CFI(".cfi_rel_offset %ebx,-4\n\t") "subl $8,%esp\n\t" "pushl 20(%ebp)\n\t" "pushl 16(%ebp)\n\t" @@ -158,7 +162,10 @@ __ASM_GLOBAL_FUNC(call_dll_entry_point, "call *%eax\n\t" "leal -4(%ebp),%esp\n\t" "popl %ebx\n\t" + __ASM_CFI(".cfi_same_value %ebx\n\t") "popl %ebp\n\t" + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") "ret" ) #else /* __i386__ */ static inline BOOL call_dll_entry_point( DLLENTRYPROC proc, void *module, diff --git a/dlls/ntdll/relay.c b/dlls/ntdll/relay.c index 0f74c41..1981e51 100644 --- a/dlls/ntdll/relay.c +++ b/dlls/ntdll/relay.c @@ -320,26 +320,35 @@ static inline void RELAY_PrintArgs( const INT_PTR *args, int nb_args, unsigned i extern LONGLONG CDECL call_entry_point( void *func, int nb_args, const INT_PTR *args ); #ifdef __i386__ __ASM_GLOBAL_FUNC( call_entry_point, - "\tpushl %ebp\n" - "\tmovl %esp,%ebp\n" - "\tpushl %esi\n" - "\tpushl %edi\n" - "\tmovl 12(%ebp),%edx\n" - "\tshll $2,%edx\n" - "\tjz 1f\n" - "\tsubl %edx,%esp\n" - "\tandl $~15,%esp\n" - "\tmovl 12(%ebp),%ecx\n" - "\tmovl 16(%ebp),%esi\n" - "\tmovl %esp,%edi\n" - "\tcld\n" - "\trep; movsl\n" - "1:\tcall *8(%ebp)\n" - "\tleal -8(%ebp),%esp\n" - "\tpopl %edi\n" - "\tpopl %esi\n" - "\tpopl %ebp\n" - "\tret" ) + "pushl %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") + "movl %esp,%ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") + "pushl %esi\n\t" + __ASM_CFI(".cfi_rel_offset %esi,-4\n\t") + "pushl %edi\n\t" + __ASM_CFI(".cfi_rel_offset %edi,-8\n\t") + "movl 12(%ebp),%edx\n\t" + "shll $2,%edx\n\t" + "jz 1f\n\t" + "subl %edx,%esp\n\t" + "andl $~15,%esp\n\t" + "movl 12(%ebp),%ecx\n\t" + "movl 16(%ebp),%esi\n\t" + "movl %esp,%edi\n\t" + "cld\n\t" + "rep; movsl\n" + "1:\tcall *8(%ebp)\n\t" + "leal -8(%ebp),%esp\n\t" + "popl %edi\n\t" + __ASM_CFI(".cfi_same_value %edi\n\t") + "popl %esi\n\t" + __ASM_CFI(".cfi_same_value %esi\n\t") + "popl %ebp\n\t" + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") + "ret" ) #else __ASM_GLOBAL_FUNC( call_entry_point, "pushq %rbp\n\t" diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index ff251fa..d0e0172 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -137,11 +137,15 @@ void vm86_return(void); void vm86_return_end(void); __ASM_GLOBAL_FUNC(vm86_enter, "pushl %ebp\n\t" - "movl %esp, %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") + "movl %esp,%ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") + "pushl %ebx\n\t" + __ASM_CFI(".cfi_rel_offset %ebx,-4\n\t") "movl $166,%eax\n\t" /*SYS_vm86*/ "movl 8(%ebp),%ecx\n\t" /* vm86_ptr */ "movl (%ecx),%ecx\n\t" - "pushl %ebx\n\t" "movl $1,%ebx\n\t" /*VM86_ENTER*/ "pushl %ecx\n\t" /* put vm86plus_struct ptr somewhere we can find it */ "pushl %fs\n\t" @@ -154,7 +158,10 @@ __ASM_GLOBAL_FUNC(vm86_enter, "popl %fs\n\t" "popl %ecx\n\t" "popl %ebx\n\t" + __ASM_CFI(".cfi_same_value %ebx\n\t") "popl %ebp\n\t" + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") "testl %eax,%eax\n\t" "jl 0f\n\t" "cmpb $0,%al\n\t" /* VM86_SIGNAL */ @@ -2268,7 +2275,10 @@ DEFINE_REGS_ENTRYPOINT( RtlRaiseException, 1 ) extern void DECLSPEC_NORETURN call_thread_func( LPTHREAD_START_ROUTINE entry, void *arg ); __ASM_GLOBAL_FUNC(call_thread_func, "pushl %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") "movl %esp,%ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") "subl $4,%esp\n\t" "pushl 12(%ebp)\n\t" "call *8(%ebp)\n\t" @@ -2329,42 +2339,53 @@ __ASM_STDCALL_FUNC( NtCurrentTeb, 0, ".byte 0x64\n\tmovl 0x18,%eax\n\tret" ) * function calling the handler having only 5 parameters (*4). */ __ASM_GLOBAL_FUNC( EXC_CallHandler, -" pushl %ebp\n" -" movl %esp, %ebp\n" -" pushl %ebx\n" -" movl 28(%ebp), %edx\n" /* ugly hack to pass the 6th param needed because of Shrinker */ -" pushl 24(%ebp)\n" -" pushl 20(%ebp)\n" -" pushl 16(%ebp)\n" -" pushl 12(%ebp)\n" -" pushl 8(%ebp)\n" -" call " __ASM_NAME("call_exception_handler") "\n" -" popl %ebx\n" -" leave\n" -" ret\n" -) + "pushl %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") + "movl %esp,%ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") + "pushl %ebx\n\t" + __ASM_CFI(".cfi_rel_offset %ebx,-4\n\t") + "movl 28(%ebp), %edx\n\t" /* ugly hack to pass the 6th param needed because of Shrinker */ + "pushl 24(%ebp)\n\t" + "pushl 20(%ebp)\n\t" + "pushl 16(%ebp)\n\t" + "pushl 12(%ebp)\n\t" + "pushl 8(%ebp)\n\t" + "call " __ASM_NAME("call_exception_handler") "\n\t" + "popl %ebx\n\t" + __ASM_CFI(".cfi_same_value %ebx\n\t") + "leave\n" + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") + "ret" ) __ASM_GLOBAL_FUNC(call_exception_handler, -" pushl %ebp\n" -" movl %esp, %ebp\n" -" subl $12,%esp\n" -" pushl 12(%ebp)\n" /* make any exceptions in this... */ -" pushl %edx\n" /* handler be handled by... */ -" .byte 0x64\n" -" pushl (0)\n" /* nested_handler (passed in edx). */ -" .byte 0x64\n" -" movl %esp,(0)\n" /* push the new exception frame onto the exception stack. */ -" pushl 20(%ebp)\n" -" pushl 16(%ebp)\n" -" pushl 12(%ebp)\n" -" pushl 8(%ebp)\n" -" movl 24(%ebp), %ecx\n" /* (*1) */ -" call *%ecx\n" /* call handler. (*2) */ -" .byte 0x64\n" -" movl (0), %esp\n" /* restore previous... (*3) */ -" .byte 0x64\n" -" popl (0)\n" /* exception frame. */ -" movl %ebp, %esp\n" /* restore saved stack, in case it was corrupted */ -" popl %ebp\n" -" ret $20\n" /* (*4) */ -) + "pushl %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") + "movl %esp,%ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") + "subl $12,%esp\n\t" + "pushl 12(%ebp)\n\t" /* make any exceptions in this... */ + "pushl %edx\n\t" /* handler be handled by... */ + ".byte 0x64\n\t" + "pushl (0)\n\t" /* nested_handler (passed in edx). */ + ".byte 0x64\n\t" + "movl %esp,(0)\n\t" /* push the new exception frame onto the exception stack. */ + "pushl 20(%ebp)\n\t" + "pushl 16(%ebp)\n\t" + "pushl 12(%ebp)\n\t" + "pushl 8(%ebp)\n\t" + "movl 24(%ebp), %ecx\n\t" /* (*1) */ + "call *%ecx\n\t" /* call handler. (*2) */ + ".byte 0x64\n\t" + "movl (0), %esp\n\t" /* restore previous... (*3) */ + ".byte 0x64\n\t" + "popl (0)\n\t" /* exception frame. */ + "movl %ebp, %esp\n\t" /* restore saved stack, in case it was corrupted */ + "popl %ebp\n\t" + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") + "ret $20" ) /* (*4) */ + #endif /* __i386__ */
1
0
0
0
Alexandre Julliard : libwine: Add call frame annotations in x86 assembly code.
by Alexandre Julliard
25 Jun '09
25 Jun '09
Module: wine Branch: master Commit: 065287ed66e7886672a8650e0bea34c99a5acd82 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=065287ed66e7886672a8650e0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 25 11:54:02 2009 +0200 libwine: Add call frame annotations in x86 assembly code. --- libs/port/interlocked.c | 8 ++++++++ libs/wine/port.c | 18 ++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/libs/port/interlocked.c b/libs/port/interlocked.c index fc40fe5..cefbb5e 100644 --- a/libs/port/interlocked.c +++ b/libs/port/interlocked.c @@ -40,7 +40,11 @@ __ASM_GLOBAL_FUNC(interlocked_cmpxchg_ptr, "ret") __ASM_GLOBAL_FUNC(interlocked_cmpxchg64, "push %ebx\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebx,0\n\t") "push %esi\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %esi,0\n\t") "movl 12(%esp),%esi\n\t" "movl 16(%esp),%ebx\n\t" "movl 20(%esp),%ecx\n\t" @@ -48,7 +52,11 @@ __ASM_GLOBAL_FUNC(interlocked_cmpxchg_ptr, "movl 28(%esp),%edx\n\t" "lock; cmpxchg8b (%esi)\n\t" "pop %esi\n\t" + __ASM_CFI(".cfi_same_value %esi\n\t") + __ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") "pop %ebx\n\t" + __ASM_CFI(".cfi_same_value %ebx\n\t") + __ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") "ret") __ASM_GLOBAL_FUNC(interlocked_xchg, "movl 8(%esp),%eax\n\t" diff --git a/libs/wine/port.c b/libs/wine/port.c index 6307069..cfd3bcd 100644 --- a/libs/wine/port.c +++ b/libs/wine/port.c @@ -94,19 +94,29 @@ void DECLSPEC_NORETURN wine_switch_to_stack( void (*func)(void *), void *arg, vo #if defined(__i386__) && defined(__GNUC__) __ASM_GLOBAL_FUNC( wine_call_on_stack, "pushl %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") "pushl %esi\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %esi,0\n\t") + "movl %esp,%esi\n\t" + __ASM_CFI(".cfi_def_cfa_register %esi\n\t") "movl 12(%esp),%ecx\n\t" /* func */ "movl 16(%esp),%edx\n\t" /* arg */ - "movl 20(%esp),%esi\n\t" /* stack */ - "andl $~15,%esi\n\t" - "subl $12,%esi\n\t" - "xchgl %esi,%esp\n\t" + "movl 20(%esp),%eax\n\t" /* stack */ + "andl $~15,%eax\n\t" + "subl $12,%eax\n\t" + "movl %eax,%esp\n\t" "pushl %edx\n\t" "xorl %ebp,%ebp\n\t" "call *%ecx\n\t" "movl %esi,%esp\n\t" "popl %esi\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") + __ASM_CFI(".cfi_same_value %esi\n\t") "popl %ebp\n\t" + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") "ret" ) #elif defined(__i386__) && defined(_MSC_VER) __declspec(naked) int wine_call_on_stack( int (*func)(void *), void *arg, void *stack )
1
0
0
0
Alexandre Julliard : winedos: Add call frame annotations in x86 assembly code.
by Alexandre Julliard
25 Jun '09
25 Jun '09
Module: wine Branch: master Commit: e7da3b519f7806ef429b6cc2c7ebe3e39e7fce7b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e7da3b519f7806ef429b6cc2c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 25 11:52:01 2009 +0200 winedos: Add call frame annotations in x86 assembly code. --- dlls/winedos/int31.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dlls/winedos/int31.c b/dlls/winedos/int31.c index 905d7e6..0c5bdc7 100644 --- a/dlls/winedos/int31.c +++ b/dlls/winedos/int31.c @@ -312,9 +312,14 @@ void DPMI_CallRMCB32(RMCB *rmcb, UINT16 ss, DWORD esp, UINT16*es, DWORD*edi) ; __ASM_GLOBAL_FUNC(DPMI_CallRMCB32, "pushl %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") "movl %esp,%ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") "pushl %edi\n\t" + __ASM_CFI(".cfi_rel_offset %edi,-4\n\t") "pushl %esi\n\t" + __ASM_CFI(".cfi_rel_offset %esi,-8\n\t") "movl 0x8(%ebp),%eax\n\t" "movl 0x10(%ebp),%esi\n\t" "movl 0xc(%ebp),%edx\n\t" @@ -339,8 +344,12 @@ __ASM_GLOBAL_FUNC(DPMI_CallRMCB32, "movl 0x18(%ebp),%edx\n\t" "movl %edi,(%edx)\n\t" "popl %esi\n\t" + __ASM_CFI(".cfi_same_value %esi\n\t") "popl %edi\n\t" + __ASM_CFI(".cfi_same_value %edi\n\t") "leave\n\t" + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") "ret") #endif
1
0
0
0
Alexandre Julliard : user32: Add call frame annotations in x86 assembly code.
by Alexandre Julliard
25 Jun '09
25 Jun '09
Module: wine Branch: master Commit: 39984d4824fa6e2ecf2960d06190eaab753d7789 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=39984d4824fa6e2ecf2960d06…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 25 11:51:52 2009 +0200 user32: Add call frame annotations in x86 assembly code. --- dlls/user32/winproc.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 2a88329..91eeeb7 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -282,10 +282,16 @@ extern LRESULT WINPROC_wrapper( WNDPROC proc, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); __ASM_GLOBAL_FUNC( WINPROC_wrapper, "pushl %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") "movl %esp,%ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") "pushl %edi\n\t" + __ASM_CFI(".cfi_rel_offset %edi,-4\n\t") "pushl %esi\n\t" + __ASM_CFI(".cfi_rel_offset %esi,-8\n\t") "pushl %ebx\n\t" + __ASM_CFI(".cfi_rel_offset %ebx,-12\n\t") "subl $12,%esp\n\t" "pushl 24(%ebp)\n\t" "pushl 20(%ebp)\n\t" @@ -295,9 +301,14 @@ __ASM_GLOBAL_FUNC( WINPROC_wrapper, "call *%eax\n\t" "leal -12(%ebp),%esp\n\t" "popl %ebx\n\t" + __ASM_CFI(".cfi_same_value %ebx\n\t") "popl %esi\n\t" + __ASM_CFI(".cfi_same_value %esi\n\t") "popl %edi\n\t" + __ASM_CFI(".cfi_same_value %edi\n\t") "leave\n\t" + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") "ret" ) #else static inline LRESULT WINPROC_wrapper( WNDPROC proc, HWND hwnd, UINT msg,
1
0
0
0
Alexandre Julliard : rpcrt4: Add call frame annotations in x86 assembly code.
by Alexandre Julliard
25 Jun '09
25 Jun '09
Module: wine Branch: master Commit: b6efd13ef5c7f1b458c49aef3cb4e6a3bc6a46bd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b6efd13ef5c7f1b458c49aef3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 25 11:51:30 2009 +0200 rpcrt4: Add call frame annotations in x86 assembly code. --- dlls/rpcrt4/cproxy.c | 2 ++ dlls/rpcrt4/ndr_stubless.c | 13 +++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c index 0887aa2..9ce555f 100644 --- a/dlls/rpcrt4/cproxy.c +++ b/dlls/rpcrt4/cproxy.c @@ -76,8 +76,10 @@ struct thunk { extern void call_stubless_func(void); __ASM_GLOBAL_FUNC(call_stubless_func, "pushl %esp\n\t" /* pointer to index */ + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "call " __ASM_NAME("ObjectStubless") __ASM_STDCALL(4) "\n\t" "popl %edx\n\t" /* args size */ + __ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") "movl (%esp),%ecx\n\t" /* return address */ "addl %edx,%esp\n\t" "jmp *%ecx" ); diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index 6a3854e..8cb5f2b 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -867,9 +867,14 @@ __declspec(naked) LONG_PTR __cdecl call_server_func(SERVER_ROUTINE func, unsigne LONG_PTR __cdecl call_server_func(SERVER_ROUTINE func, unsigned char * args, unsigned int stack_size); __ASM_GLOBAL_FUNC(call_server_func, "pushl %ebp\n\t" - "movl %esp, %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") + "movl %esp,%ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") "pushl %edi\n\t" /* Save registers */ + __ASM_CFI(".cfi_rel_offset %edi,-4\n\t") "pushl %esi\n\t" + __ASM_CFI(".cfi_rel_offset %esi,-8\n\t") "movl 16(%ebp), %eax\n\t" /* Get stack size */ "subl %eax, %esp\n\t" /* Make room in stack for arguments */ "andl $~15, %esp\n\t" /* Make sure stack has 16-byte alignment for Mac OS X */ @@ -882,9 +887,13 @@ __ASM_GLOBAL_FUNC(call_server_func, "call *8(%ebp)\n\t" /* Call function */ "leal -8(%ebp), %esp\n\t" /* Restore stack */ "popl %esi\n\t" /* Restore registers */ + __ASM_CFI(".cfi_same_value %esi\n\t") "popl %edi\n\t" + __ASM_CFI(".cfi_same_value %edi\n\t") "popl %ebp\n\t" - "ret\n" ) + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") + "ret" ) #else #warning call_server_func not implemented for your architecture LONG_PTR __cdecl call_server_func(SERVER_ROUTINE func, unsigned char * args, unsigned short stack_size)
1
0
0
0
Alexandre Julliard : msvcrt: Add call frame annotations in x86 assembly code.
by Alexandre Julliard
25 Jun '09
25 Jun '09
Module: wine Branch: master Commit: 0cb406ef290f46ba0060d609a2b1024c28cf1352 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0cb406ef290f46ba0060d609a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 25 11:50:42 2009 +0200 msvcrt: Add call frame annotations in x86 assembly code. --- dlls/msvcrt/cppexcept.c | 8 ++++++++ dlls/msvcrt/except.c | 5 +++++ dlls/msvcrt/misc.c | 5 +++++ 3 files changed, 18 insertions(+), 0 deletions(-) diff --git a/dlls/msvcrt/cppexcept.c b/dlls/msvcrt/cppexcept.c index 6dafc9e..a777025 100644 --- a/dlls/msvcrt/cppexcept.c +++ b/dlls/msvcrt/cppexcept.c @@ -413,14 +413,22 @@ extern DWORD CDECL __CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRAT PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch ); __ASM_GLOBAL_FUNC( __CxxFrameHandler, "pushl $0\n\t" /* nested_trylevel */ + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "pushl $0\n\t" /* nested_frame */ + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "pushl %eax\n\t" /* descr */ + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "pushl 28(%esp)\n\t" /* dispatch */ + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "pushl 28(%esp)\n\t" /* context */ + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "pushl 28(%esp)\n\t" /* frame */ + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "pushl 28(%esp)\n\t" /* rec */ + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "call " __ASM_NAME("cxx_frame_handler") "\n\t" "add $28,%esp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset -28\n\t") "ret" ) diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c index 9b254f8..5de42db 100644 --- a/dlls/msvcrt/except.c +++ b/dlls/msvcrt/except.c @@ -117,14 +117,19 @@ static DWORD MSVCRT_nested_handler(PEXCEPTION_RECORD rec, /* Provided for VC++ binary compatibility only */ __ASM_GLOBAL_FUNC(_EH_prolog, + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") /* skip ret addr */ "pushl $-1\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "pushl %eax\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "pushl %fs:0\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "movl %esp, %fs:0\n\t" "movl 12(%esp), %eax\n\t" "movl %ebp, 12(%esp)\n\t" "leal 12(%esp), %ebp\n\t" "pushl %eax\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") "ret") static void msvcrt_local_unwind2(MSVCRT_EXCEPTION_FRAME* frame, int trylevel, void *ebp) diff --git a/dlls/msvcrt/misc.c b/dlls/msvcrt/misc.c index 3d3c03b..082c38b 100644 --- a/dlls/msvcrt/misc.c +++ b/dlls/msvcrt/misc.c @@ -138,7 +138,10 @@ __ASM_GLOBAL_FUNC(_chkesp, "jnz 1f\n\t" "ret\n" "1:\tpushl %ebp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t") + __ASM_CFI(".cfi_rel_offset %ebp,0\n\t") "movl %esp,%ebp\n\t" + __ASM_CFI(".cfi_def_cfa_register %ebp\n\t") "subl $12,%esp\n\t" "pushl %eax\n\t" "pushl %ecx\n\t" @@ -148,6 +151,8 @@ __ASM_GLOBAL_FUNC(_chkesp, "popl %ecx\n\t" "popl %eax\n\t" "leave\n\t" + __ASM_CFI(".cfi_def_cfa %esp,4\n\t") + __ASM_CFI(".cfi_same_value %ebp\n\t") "ret") void CDECL MSVCRT_chkesp_fail(void)
1
0
0
0
Alexandre Julliard : configure: Add a wrapper macro for . cfi pseudo-ops in assembly code.
by Alexandre Julliard
25 Jun '09
25 Jun '09
Module: wine Branch: master Commit: e1f0a0db1fb4c98eac66c626791e0058d012182b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e1f0a0db1fb4c98eac66c6267…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jun 25 11:49:21 2009 +0200 configure: Add a wrapper macro for .cfi pseudo-ops in assembly code. --- configure | 10 ++++++++++ configure.ac | 3 +++ include/config.h.in | 3 +++ 3 files changed, 16 insertions(+), 0 deletions(-) diff --git a/configure b/configure index 2b759b7..3f3548e 100755 --- a/configure +++ b/configure @@ -18207,6 +18207,16 @@ if test "$ac_cv_c_cfi_support" = "yes" then asm_func_header="$asm_func_header.cfi_startproc\\n\\t" asm_func_trailer="\\n\\t.cfi_endproc$asm_func_trailer" + +cat >>confdefs.h <<\_ACEOF +#define __ASM_CFI(str) str +_ACEOF + +else + cat >>confdefs.h <<\_ACEOF +#define __ASM_CFI(str) "" +_ACEOF + fi asm_func_code="$asm_func_header\" code \"$asm_func_trailer" diff --git a/configure.ac b/configure.ac index eb276b6..bb4d82e 100644 --- a/configure.ac +++ b/configure.ac @@ -1519,6 +1519,9 @@ if test "$ac_cv_c_cfi_support" = "yes" then asm_func_header="$asm_func_header.cfi_startproc\\n\\t" asm_func_trailer="\\n\\t.cfi_endproc$asm_func_trailer" + AC_DEFINE([__ASM_CFI(str)],[str],[Define to a macro to output a .cfi assembly pseudo-op]) +else + AC_DEFINE([__ASM_CFI(str)],[""]) fi asm_func_code="$asm_func_header\" code \"$asm_func_trailer" diff --git a/include/config.h.in b/include/config.h.in index 99ecae3..f6799c6 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -1188,6 +1188,9 @@ /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING +/* Define to a macro to output a .cfi assembly pseudo-op */ +#undef __ASM_CFI + /* Define to a macro to define an assembly function */ #undef __ASM_DEFINE_FUNC
1
0
0
0
Paul Vriens : user32/tests: Prevent some 'deadcode' (Coverity).
by Alexandre Julliard
25 Jun '09
25 Jun '09
Module: wine Branch: master Commit: d3b3b3e0b909bb5a24c6fdd18cef0580fa33aff3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d3b3b3e0b909bb5a24c6fdd18…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Thu Jun 25 11:07:43 2009 +0200 user32/tests: Prevent some 'deadcode' (Coverity). --- dlls/user32/tests/cursoricon.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index b15acc2..3b646fb 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -1111,11 +1111,6 @@ static void test_DrawIcon(void) check_alpha_draw(hdcDst, FALSE, FALSE, 32, __LINE__); todo_wine check_alpha_draw(hdcDst, FALSE, TRUE, 32, __LINE__); - SelectObject(hdcDst, bmpOld); - DeleteObject(bmpDst); - bmpOld = NULL; - bmpDst = NULL; - cleanup: if(bmpOld) SelectObject(hdcDst, bmpOld);
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
112
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Results per page:
10
25
50
100
200