vrclient: Fix flatapi calls on 32 bit.

CW-Bug-Id: #24429
This commit is contained in:
Paul Gofman 2024-11-04 13:19:56 -06:00
parent 8247478a48
commit baa056bd08
2 changed files with 10 additions and 0 deletions

View File

@ -16,6 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_CXX_H
#define __WINE_CXX_H
#include "wine/asm.h"
#ifdef _WIN64
@ -474,3 +476,5 @@ __ASM_BLOCK_BEGIN(type_info_vtables) \
__ASM_VTABLE(type_info, \
VTABLE_ADD_FUNC(type_info_vector_dtor)); \
__ASM_BLOCK_END
#endif

View File

@ -1,6 +1,8 @@
/* asm thunks for the flat (FnTable) API */
#ifdef __i386__
#include "cxx.h"
#include "pshpack1.h"
struct thunk
{
@ -24,7 +26,11 @@ static inline void init_thunk( struct thunk *thunk, void *this, void *proc,
thunk->mov_edx = 0xba;
thunk->proc = proc;
thunk->jmp = 0xe9;
#ifdef __ASM_USE_THISCALL_WRAPPER
thunk->call_flat = (char *)call_flat_method - (char *)(&thunk->call_flat + 1);
#else
thunk->call_flat = (char *)proc - (char *)(&thunk->call_flat + 1);
#endif
}
#else