Skip to content

Commit

Permalink
[CRT] Reduce diff to wine-5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tkreuzer committed Aug 19, 2023
1 parent e04b796 commit c332b91
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
16 changes: 16 additions & 0 deletions sdk/lib/crt/except/i386/cpp.s
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
.code
.align 4

EXTERN _cxx_frame_handler:PROC

MACRO(DEFINE_THISCALL_ALIAS, cxxname, target)
#ifdef _USE_ML
EXTERN ___thiscall&target:PROC
Expand Down Expand Up @@ -166,5 +168,19 @@ _call_handler:
pop ebp
ret


PUBLIC ___CxxFrameHandler
___CxxFrameHandler:
push 0
push 0
push eax
push[esp + 28]
push[esp + 28]
push[esp + 28]
push[esp + 28]
call _cxx_frame_handler
add esp, 28
ret

END

2 changes: 0 additions & 2 deletions sdk/lib/crt/wine/cpp.c
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,6 @@ void __thiscall MSVCRT_improper_scheduler_detach_dtor(

#endif /* _MSVCR_VER >= 100 */

#ifndef _MSC_VER
#ifndef __GNUC__
void __asm_dummy_vtables(void) {
#endif
Expand Down Expand Up @@ -1049,7 +1048,6 @@ __ASM_VTABLE(improper_scheduler_detach,
#ifndef __GNUC__
}
#endif
#endif /* !_MSC_VER */

DEFINE_RTTI_DATA0( type_info, 0, ".?AVtype_info@@" )
#if _MSVCR_VER >= 80
Expand Down
6 changes: 5 additions & 1 deletion sdk/lib/crt/wine/cxx.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

#include "wine/asm.h"

#ifdef _MSC_VER
#define __ASM_VTABLE(name,funcs)
#else
#ifdef _WIN64

#define VTABLE_ADD_FUNC(name) "\t.quad " THISCALL_NAME(name) "\n"
Expand All @@ -43,6 +46,7 @@
funcs "\n\t.text")

#endif /* _WIN64 */
#endif // _MSC_VER

#ifndef __x86_64__

Expand Down Expand Up @@ -264,4 +268,4 @@ extern void *vtbl_wrapper_48;

#endif

//exception* __thiscall MSVCRT_exception_ctor(exception*, const char**);
exception* __thiscall MSVCRT_exception_ctor(exception*, const char**);
20 changes: 0 additions & 20 deletions sdk/lib/crt/wine/except_i386.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,25 +652,6 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame
*/
extern DWORD CDECL __CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame,
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch );
#ifdef _MSC_VER
DWORD _declspec(naked) __CxxFrameHandler(PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame,
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch)
{
__asm
{
push 0
push 0
push eax
push[esp + 28]
push[esp + 28]
push[esp + 28]
push[esp + 28]
call cxx_frame_handler
add esp, 28
ret
}
}
#else
__ASM_GLOBAL_FUNC( __CxxFrameHandler,
"pushl $0\n\t" /* nested_trylevel */
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
Expand All @@ -690,7 +671,6 @@ __ASM_GLOBAL_FUNC( __CxxFrameHandler,
"add $28,%esp\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset -28\n\t")
"ret" )
#endif


/*********************************************************************
Expand Down
14 changes: 8 additions & 6 deletions sdk/lib/crt/wine/undname.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/

#define __WINE_DEBUG_CHANNEL__
#include <precomp.h>
#include "config.h"
#include "wine/port.h"

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "msvcrt.h"

#include <internal/wine/msvcrt.h>
#include <internal/wine/cppexcept.h>
#include "wine/debug.h"

WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);

Expand Down Expand Up @@ -199,8 +202,7 @@ static BOOL str_array_push(struct parsed_symbol* sym, const char* ptr, int len,
c = '>';
if (i < a->start) c = '-';
else if (i >= a->num) c = '}';
/* This check is as useless as the unused-but-set gcc warning that we want to silence here */
if (c != 0) TRACE("%p\t%d%c %s\n", a, i, c, debugstr_a(a->elts[i]));
TRACE("%p\t%d%c %s\n", a, i, c, debugstr_a(a->elts[i]));
}
}

Expand Down

0 comments on commit c332b91

Please sign in to comment.