mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Added patch to implement stubless proxies on x86_64.
This commit is contained in:
parent
8b28977596
commit
0c787e6a09
@ -34,7 +34,7 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
-----------------------------------
|
||||
|
||||
**Bug fixes and features included in the next upcoming release [10]:**
|
||||
**Bug fixes and features included in the next upcoming release [11]:**
|
||||
|
||||
* Add partial implementation of ITfThreadMgrEx_ActivateEx ([Wine Bug #39564](https://bugs.winehq.org/show_bug.cgi?id=39564))
|
||||
* Add stub kernel32.FreeUserPhysicalPages ([Wine Bug #39543](https://bugs.winehq.org/show_bug.cgi?id=39543))
|
||||
@ -43,6 +43,7 @@ Included bug fixes and improvements
|
||||
* Do not require SeBackupPrivilege in load_registry and unload_registry ([Wine Bug #28729](https://bugs.winehq.org/show_bug.cgi?id=28729))
|
||||
* Implement marshalling for TKIND_COCLASS ([Wine Bug #19016](https://bugs.winehq.org/show_bug.cgi?id=19016))
|
||||
* Implement stub for hid.HidP_TranslateUsagesToI8042ScanCodes ([Wine Bug #39447](https://bugs.winehq.org/show_bug.cgi?id=39447))
|
||||
* Implement stubless proxies on x86_64 ([Wine Bug #26768](https://bugs.winehq.org/show_bug.cgi?id=26768))
|
||||
* Implement support for "Purist Mode" (override for all dlls)
|
||||
* Properly handle multiple registry notifications per key
|
||||
* Revert patch to prepare GL resources before calling context_apply_fbo_state ([Wine Bug #39536](https://bugs.winehq.org/show_bug.cgi?id=39536))
|
||||
|
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -12,6 +12,7 @@ wine-staging (1.7.55) UNRELEASED; urgency=low
|
||||
* Added patch to make sure CompareString immediately aborts on first non-
|
||||
matching character.
|
||||
* Added patch to implement marshalling for TKIND_COCLASS.
|
||||
* Added patch to implement stubless proxies on x86_64.
|
||||
* Remove disabled shell32-Quoted_ShellExecute patchset (bug already fixed and
|
||||
all tests pass).
|
||||
* Remove disabled reg-Cleanup patchset (only cleanup and not actively
|
||||
|
@ -0,0 +1,393 @@
|
||||
From f93d65a6e5dc87784e064444e3245d0504cdd9ea Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 15 Nov 2015 04:25:27 +0100
|
||||
Subject: oleaut32: Initial preparation to make marshalling compatible with
|
||||
x86_64.
|
||||
|
||||
---
|
||||
dlls/oleaut32/tmarshal.c | 94 ++++++++++++++++++++++++++----------------------
|
||||
dlls/oleaut32/typelib.c | 8 ++---
|
||||
dlls/oleaut32/typelib.h | 2 +-
|
||||
3 files changed, 57 insertions(+), 47 deletions(-)
|
||||
|
||||
diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c
|
||||
index f4ce311..c5aa374 100644
|
||||
--- a/dlls/oleaut32/tmarshal.c
|
||||
+++ b/dlls/oleaut32/tmarshal.c
|
||||
@@ -633,42 +633,51 @@ static const IRpcProxyBufferVtbl tmproxyvtable = {
|
||||
TMProxyImpl_Disconnect
|
||||
};
|
||||
|
||||
-/* how much space do we use on stack in DWORD steps. */
|
||||
+/* how much space do we use on stack in DWORD_PTR steps. */
|
||||
static int
|
||||
_argsize(TYPEDESC *tdesc, ITypeInfo *tinfo) {
|
||||
+ DWORD ret;
|
||||
switch (tdesc->vt) {
|
||||
case VT_I8:
|
||||
case VT_UI8:
|
||||
- return 8/sizeof(DWORD);
|
||||
+ ret = 8;
|
||||
+ break;
|
||||
case VT_R8:
|
||||
- return sizeof(double)/sizeof(DWORD);
|
||||
+ ret = sizeof(double);
|
||||
+ break;
|
||||
case VT_CY:
|
||||
- return sizeof(CY)/sizeof(DWORD);
|
||||
+ ret = sizeof(CY);
|
||||
+ break;
|
||||
case VT_DATE:
|
||||
- return sizeof(DATE)/sizeof(DWORD);
|
||||
+ ret = sizeof(DATE);
|
||||
+ break;
|
||||
case VT_DECIMAL:
|
||||
- return (sizeof(DECIMAL)+3)/sizeof(DWORD);
|
||||
+ ret = sizeof(DECIMAL);
|
||||
+ break;
|
||||
case VT_VARIANT:
|
||||
- return (sizeof(VARIANT)+3)/sizeof(DWORD);
|
||||
+ ret = sizeof(VARIANT);
|
||||
+ break;
|
||||
case VT_USERDEFINED:
|
||||
{
|
||||
ITypeInfo *tinfo2;
|
||||
TYPEATTR *tattr;
|
||||
HRESULT hres;
|
||||
- DWORD ret;
|
||||
|
||||
hres = ITypeInfo_GetRefTypeInfo(tinfo,tdesc->u.hreftype,&tinfo2);
|
||||
if (FAILED(hres))
|
||||
return 0; /* should fail critically in serialize_param */
|
||||
ITypeInfo_GetTypeAttr(tinfo2,&tattr);
|
||||
- ret = (tattr->cbSizeInstance+3)/sizeof(DWORD);
|
||||
+ ret = tattr->cbSizeInstance;
|
||||
ITypeInfo_ReleaseTypeAttr(tinfo2, tattr);
|
||||
ITypeInfo_Release(tinfo2);
|
||||
- return ret;
|
||||
+ break;
|
||||
}
|
||||
default:
|
||||
- return 1;
|
||||
+ ret = sizeof(DWORD_PTR);
|
||||
+ break;
|
||||
}
|
||||
+
|
||||
+ return (ret + sizeof(DWORD_PTR) - 1) / sizeof(DWORD_PTR);
|
||||
}
|
||||
|
||||
/* how much space do we use on the heap (in bytes) */
|
||||
@@ -717,7 +726,7 @@ _xsize(const TYPEDESC *td, ITypeInfo *tinfo) {
|
||||
return ret;
|
||||
}
|
||||
default:
|
||||
- return 4;
|
||||
+ return sizeof(DWORD_PTR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -736,7 +745,7 @@ serialize_param(
|
||||
BOOL debugout,
|
||||
BOOL dealloc,
|
||||
TYPEDESC *tdesc,
|
||||
- DWORD *arg,
|
||||
+ DWORD_PTR *arg,
|
||||
marshal_state *buf)
|
||||
{
|
||||
HRESULT hres = S_OK;
|
||||
@@ -755,7 +764,7 @@ serialize_param(
|
||||
case VT_R8:
|
||||
case VT_CY:
|
||||
hres = S_OK;
|
||||
- if (debugout) TRACE_(olerelay)("%x%x\n",arg[0],arg[1]);
|
||||
+ if (debugout) TRACE_(olerelay)("%s\n", wine_dbgstr_longlong(*(ULONGLONG *)arg));
|
||||
if (writeit)
|
||||
hres = xbuf_add(buf,(LPBYTE)arg,8);
|
||||
return hres;
|
||||
@@ -766,7 +775,7 @@ serialize_param(
|
||||
case VT_R4:
|
||||
case VT_UI4:
|
||||
hres = S_OK;
|
||||
- if (debugout) TRACE_(olerelay)("%x\n",*arg);
|
||||
+ if (debugout) TRACE_(olerelay)("%x\n", *(DWORD *)arg);
|
||||
if (writeit)
|
||||
hres = xbuf_add(buf,(LPBYTE)arg,sizeof(DWORD));
|
||||
return hres;
|
||||
@@ -774,14 +783,14 @@ serialize_param(
|
||||
case VT_UI2:
|
||||
case VT_BOOL:
|
||||
hres = S_OK;
|
||||
- if (debugout) TRACE_(olerelay)("%04x\n",*arg & 0xffff);
|
||||
+ if (debugout) TRACE_(olerelay)("%04x\n", *(WORD *)arg);
|
||||
if (writeit)
|
||||
hres = xbuf_add(buf,(LPBYTE)arg,sizeof(DWORD));
|
||||
return hres;
|
||||
case VT_I1:
|
||||
case VT_UI1:
|
||||
hres = S_OK;
|
||||
- if (debugout) TRACE_(olerelay)("%02x\n",*arg & 0xff);
|
||||
+ if (debugout) TRACE_(olerelay)("%02x\n", *(BYTE *)arg);
|
||||
if (writeit)
|
||||
hres = xbuf_add(buf,(LPBYTE)arg,sizeof(DWORD));
|
||||
return hres;
|
||||
@@ -881,19 +890,19 @@ serialize_param(
|
||||
if (debugout) TRACE_(olerelay)("NULL");
|
||||
return S_OK;
|
||||
}
|
||||
- hres = serialize_param(tinfo,writeit,debugout,dealloc,tdesc->u.lptdesc,(DWORD*)*arg,buf);
|
||||
+ hres = serialize_param(tinfo,writeit,debugout,dealloc,tdesc->u.lptdesc,(DWORD_PTR *)*arg,buf);
|
||||
if (derefhere && dealloc) HeapFree(GetProcessHeap(),0,(LPVOID)*arg);
|
||||
return hres;
|
||||
}
|
||||
case VT_UNKNOWN:
|
||||
- if (debugout) TRACE_(olerelay)("unk(0x%x)",*arg);
|
||||
+ if (debugout) TRACE_(olerelay)("unk(0x%lx)", *arg);
|
||||
if (writeit)
|
||||
hres = _marshal_interface(buf,&IID_IUnknown,(LPUNKNOWN)*arg);
|
||||
if (dealloc && *(IUnknown **)arg)
|
||||
IUnknown_Release((LPUNKNOWN)*arg);
|
||||
return hres;
|
||||
case VT_DISPATCH:
|
||||
- if (debugout) TRACE_(olerelay)("idisp(0x%x)",*arg);
|
||||
+ if (debugout) TRACE_(olerelay)("idisp(0x%lx)", *arg);
|
||||
if (writeit)
|
||||
hres = _marshal_interface(buf,&IID_IDispatch,(LPUNKNOWN)*arg);
|
||||
if (dealloc && *(IUnknown **)arg)
|
||||
@@ -941,7 +950,7 @@ serialize_param(
|
||||
debugout,
|
||||
dealloc,
|
||||
tdesc2,
|
||||
- (DWORD*)(((LPBYTE)arg)+vdesc->u.oInst),
|
||||
+ (DWORD_PTR *)(((LPBYTE)arg)+vdesc->u.oInst),
|
||||
buf
|
||||
);
|
||||
ITypeInfo_ReleaseVarDesc(tinfo2, vdesc);
|
||||
@@ -958,7 +967,7 @@ serialize_param(
|
||||
break;
|
||||
case TKIND_ENUM:
|
||||
hres = S_OK;
|
||||
- if (debugout) TRACE_(olerelay)("%x",*arg);
|
||||
+ if (debugout) TRACE_(olerelay)("%x", *(DWORD *)arg);
|
||||
if (writeit)
|
||||
hres = xbuf_add(buf,(LPBYTE)arg,sizeof(DWORD));
|
||||
break;
|
||||
@@ -984,7 +993,7 @@ serialize_param(
|
||||
if (debugout) TRACE_(olerelay)("[");
|
||||
for (i=0;i<arrsize;i++) {
|
||||
LPBYTE base = _passbyref(&adesc->tdescElem, tinfo) ? (LPBYTE) *arg : (LPBYTE) arg;
|
||||
- hres = serialize_param(tinfo, writeit, debugout, dealloc, &adesc->tdescElem, (DWORD*)((LPBYTE)base+i*_xsize(&adesc->tdescElem, tinfo)), buf);
|
||||
+ hres = serialize_param(tinfo, writeit, debugout, dealloc, &adesc->tdescElem, (DWORD_PTR *)((LPBYTE)base+i*_xsize(&adesc->tdescElem, tinfo)), buf);
|
||||
if (hres)
|
||||
return hres;
|
||||
if (debugout && (i<arrsize-1)) TRACE_(olerelay)(",");
|
||||
@@ -1023,7 +1032,7 @@ deserialize_param(
|
||||
BOOL debugout,
|
||||
BOOL alloc,
|
||||
TYPEDESC *tdesc,
|
||||
- DWORD *arg,
|
||||
+ DWORD_PTR *arg,
|
||||
marshal_state *buf)
|
||||
{
|
||||
HRESULT hres = S_OK;
|
||||
@@ -1056,7 +1065,7 @@ deserialize_param(
|
||||
hres = xbuf_get(buf,(LPBYTE)arg,8);
|
||||
if (hres) ERR("Failed to read integer 8 byte\n");
|
||||
}
|
||||
- if (debugout) TRACE_(olerelay)("%x%x",arg[0],arg[1]);
|
||||
+ if (debugout) TRACE_(olerelay)("%s", wine_dbgstr_longlong(*(ULONGLONG *)arg));
|
||||
return hres;
|
||||
case VT_ERROR:
|
||||
case VT_I4:
|
||||
@@ -1068,7 +1077,7 @@ deserialize_param(
|
||||
hres = xbuf_get(buf,(LPBYTE)arg,sizeof(DWORD));
|
||||
if (hres) ERR("Failed to read integer 4 byte\n");
|
||||
}
|
||||
- if (debugout) TRACE_(olerelay)("%x",*arg);
|
||||
+ if (debugout) TRACE_(olerelay)("%x", *(DWORD *)arg);
|
||||
return hres;
|
||||
case VT_I2:
|
||||
case VT_UI2:
|
||||
@@ -1079,7 +1088,7 @@ deserialize_param(
|
||||
if (hres) ERR("Failed to read integer 4 byte\n");
|
||||
memcpy(arg,&x,2);
|
||||
}
|
||||
- if (debugout) TRACE_(olerelay)("%04x",*arg & 0xffff);
|
||||
+ if (debugout) TRACE_(olerelay)("%04x", *(WORD *)arg);
|
||||
return hres;
|
||||
case VT_I1:
|
||||
case VT_UI1:
|
||||
@@ -1089,7 +1098,7 @@ deserialize_param(
|
||||
if (hres) ERR("Failed to read integer 4 byte\n");
|
||||
memcpy(arg,&x,1);
|
||||
}
|
||||
- if (debugout) TRACE_(olerelay)("%02x",*arg & 0xff);
|
||||
+ if (debugout) TRACE_(olerelay)("%02x", *(BYTE *)arg);
|
||||
return hres;
|
||||
case VT_BSTR: {
|
||||
if (readit)
|
||||
@@ -1165,17 +1174,17 @@ deserialize_param(
|
||||
if (alloc) {
|
||||
/* Allocate space for the referenced struct */
|
||||
if (derefhere)
|
||||
- *arg=(DWORD)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,_xsize(tdesc->u.lptdesc, tinfo));
|
||||
+ *arg=(DWORD_PTR)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,_xsize(tdesc->u.lptdesc, tinfo));
|
||||
}
|
||||
if (derefhere)
|
||||
- return deserialize_param(tinfo, readit, debugout, alloc, tdesc->u.lptdesc, (LPDWORD)*arg, buf);
|
||||
+ return deserialize_param(tinfo, readit, debugout, alloc, tdesc->u.lptdesc, (DWORD_PTR *)*arg, buf);
|
||||
else
|
||||
return deserialize_param(tinfo, readit, debugout, alloc, tdesc->u.lptdesc, arg, buf);
|
||||
}
|
||||
case VT_UNKNOWN:
|
||||
/* FIXME: UNKNOWN is unknown ..., but allocate 4 byte for it */
|
||||
if (alloc)
|
||||
- *arg=(DWORD)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(DWORD));
|
||||
+ *arg=(DWORD_PTR)HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(DWORD_PTR));
|
||||
hres = S_OK;
|
||||
if (readit)
|
||||
hres = _unmarshal_interface(buf,&IID_IUnknown,(LPUNKNOWN*)arg);
|
||||
@@ -1231,7 +1240,7 @@ deserialize_param(
|
||||
debugout,
|
||||
alloc,
|
||||
&vdesc->elemdescVar.tdesc,
|
||||
- (DWORD*)(((LPBYTE)arg)+vdesc->u.oInst),
|
||||
+ (DWORD_PTR *)(((LPBYTE)arg)+vdesc->u.oInst),
|
||||
buf
|
||||
);
|
||||
ITypeInfo_ReleaseVarDesc(tinfo2, vdesc);
|
||||
@@ -1248,7 +1257,7 @@ deserialize_param(
|
||||
hres = xbuf_get(buf,(LPBYTE)arg,sizeof(DWORD));
|
||||
if (hres) ERR("Failed to read enum (4 byte)\n");
|
||||
}
|
||||
- if (debugout) TRACE_(olerelay)("%x",*arg);
|
||||
+ if (debugout) TRACE_(olerelay)("%x", *(DWORD *)arg);
|
||||
break;
|
||||
default:
|
||||
ERR("Unhandled typekind %d\n",tattr->typekind);
|
||||
@@ -1274,7 +1283,7 @@ deserialize_param(
|
||||
if (_passbyref(&adesc->tdescElem, tinfo))
|
||||
{
|
||||
base = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,_xsize(tdesc->u.lptdesc, tinfo) * arrsize);
|
||||
- *arg = (DWORD) base;
|
||||
+ *arg = (DWORD_PTR)base;
|
||||
}
|
||||
for (i=0;i<arrsize;i++)
|
||||
deserialize_param(
|
||||
@@ -1283,7 +1292,7 @@ deserialize_param(
|
||||
debugout,
|
||||
alloc,
|
||||
&adesc->tdescElem,
|
||||
- (DWORD*)(base + i*_xsize(&adesc->tdescElem, tinfo)),
|
||||
+ (DWORD_PTR *)(base + i*_xsize(&adesc->tdescElem, tinfo)),
|
||||
buf
|
||||
);
|
||||
return S_OK;
|
||||
@@ -1413,7 +1422,7 @@ static inline BOOL is_out_elem(const ELEMDESC *elem)
|
||||
static DWORD WINAPI xCall(int method, void **args)
|
||||
{
|
||||
TMProxyImpl *tpinfo = args[0];
|
||||
- DWORD *xargs;
|
||||
+ DWORD_PTR *xargs;
|
||||
const FUNCDESC *fdesc;
|
||||
HRESULT hres;
|
||||
int i;
|
||||
@@ -1473,7 +1482,7 @@ static DWORD WINAPI xCall(int method, void **args)
|
||||
if (nrofnames > sizeof(names)/sizeof(names[0]))
|
||||
ERR("Need more names!\n");
|
||||
|
||||
- xargs = (DWORD *)(args + 1);
|
||||
+ xargs = (DWORD_PTR *)(args + 1);
|
||||
for (i=0;i<fdesc->cParams;i++) {
|
||||
ELEMDESC *elem = fdesc->lprgelemdescParam+i;
|
||||
if (TRACE_ON(olerelay)) {
|
||||
@@ -1540,7 +1549,7 @@ static DWORD WINAPI xCall(int method, void **args)
|
||||
buf.curoff = 0;
|
||||
|
||||
/* generic deserializer using typelib description */
|
||||
- xargs = (DWORD *)(args + 1);
|
||||
+ xargs = (DWORD_PTR *)(args + 1);
|
||||
status = S_OK;
|
||||
for (i=0;i<fdesc->cParams;i++) {
|
||||
ELEMDESC *elem = fdesc->lprgelemdescParam+i;
|
||||
@@ -2067,7 +2076,8 @@ TMStubImpl_Invoke(
|
||||
const FUNCDESC *fdesc;
|
||||
TMStubImpl *This = impl_from_IRpcStubBuffer(iface);
|
||||
HRESULT hres;
|
||||
- DWORD *args = NULL, res, *xargs, nrofargs;
|
||||
+ DWORD_PTR *args = NULL, *xargs;
|
||||
+ DWORD res, nrofargs;
|
||||
marshal_state buf;
|
||||
UINT nrofnames = 0;
|
||||
BSTR names[10];
|
||||
@@ -2132,7 +2142,7 @@ TMStubImpl_Invoke(
|
||||
nrofargs = 0;
|
||||
for (i=0;i<fdesc->cParams;i++)
|
||||
nrofargs += _argsize(&fdesc->lprgelemdescParam[i].tdesc, tinfo);
|
||||
- args = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,(nrofargs+1)*sizeof(DWORD));
|
||||
+ args = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (nrofargs+1)*sizeof(DWORD_PTR));
|
||||
if (!args)
|
||||
{
|
||||
hres = E_OUTOFMEMORY;
|
||||
@@ -2160,12 +2170,12 @@ TMStubImpl_Invoke(
|
||||
}
|
||||
}
|
||||
|
||||
- args[0] = (DWORD)This->pUnk;
|
||||
+ args[0] = (DWORD_PTR)This->pUnk;
|
||||
|
||||
__TRY
|
||||
{
|
||||
res = _invoke(
|
||||
- (*((FARPROC**)args[0]))[fdesc->oVft/4],
|
||||
+ (*((FARPROC**)args[0]))[fdesc->oVft / sizeof(DWORD_PTR)],
|
||||
fdesc->callconv,
|
||||
(xargs-args),
|
||||
args
|
||||
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
|
||||
index 0891098..97f40bc 100644
|
||||
--- a/dlls/oleaut32/typelib.c
|
||||
+++ b/dlls/oleaut32/typelib.c
|
||||
@@ -6402,15 +6402,15 @@ static double (* const call_double_method)(void*,int,const DWORD*,int*) = (void
|
||||
* Invokes a method, or accesses a property of an object, that implements the
|
||||
* interface described by the type description.
|
||||
*/
|
||||
-DWORD
|
||||
-_invoke(FARPROC func,CALLCONV callconv, int nrargs, DWORD *args) {
|
||||
+DWORD _invoke(FARPROC func, CALLCONV callconv, int nrargs, DWORD_PTR *args)
|
||||
+{
|
||||
DWORD res;
|
||||
int stack_offset;
|
||||
|
||||
if (TRACE_ON(ole)) {
|
||||
int i;
|
||||
TRACE("Calling %p(",func);
|
||||
- for (i=0;i<min(nrargs,30);i++) TRACE("%08x,",args[i]);
|
||||
+ for (i=0;i<min(nrargs,30);i++) TRACE("%08lx,",args[i]);
|
||||
if (nrargs > 30) TRACE("...");
|
||||
TRACE(")\n");
|
||||
}
|
||||
@@ -6418,7 +6418,7 @@ _invoke(FARPROC func,CALLCONV callconv, int nrargs, DWORD *args) {
|
||||
switch (callconv) {
|
||||
case CC_STDCALL:
|
||||
case CC_CDECL:
|
||||
- res = call_method( func, nrargs, args, &stack_offset );
|
||||
+ res = call_method(func, nrargs, (DWORD *)args, &stack_offset);
|
||||
break;
|
||||
default:
|
||||
FIXME("unsupported calling convention %d\n",callconv);
|
||||
diff --git a/dlls/oleaut32/typelib.h b/dlls/oleaut32/typelib.h
|
||||
index 8f274ba..5ecb75a 100644
|
||||
--- a/dlls/oleaut32/typelib.h
|
||||
+++ b/dlls/oleaut32/typelib.h
|
||||
@@ -604,7 +604,7 @@ extern void heap_free(void *ptr) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT ITypeInfoImpl_GetInternalFuncDesc( ITypeInfo *iface, UINT index, const FUNCDESC **ppFuncDesc ) DECLSPEC_HIDDEN;
|
||||
|
||||
-extern DWORD _invoke(FARPROC func,CALLCONV callconv, int nrargs, DWORD *args) DECLSPEC_HIDDEN;
|
||||
+extern DWORD _invoke(FARPROC func, CALLCONV callconv, int nrargs, DWORD_PTR *args) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT TMARSHAL_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv) DECLSPEC_HIDDEN;
|
||||
|
||||
--
|
||||
2.6.2
|
||||
|
@ -0,0 +1,65 @@
|
||||
From 371486a6f5257c287886543b1d0c76ad60993998 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 15 Nov 2015 05:06:30 +0100
|
||||
Subject: oleaut32: Implement TMStubImpl_Invoke on x86_64.
|
||||
|
||||
---
|
||||
dlls/oleaut32/tmarshal.c | 2 +-
|
||||
dlls/oleaut32/typelib.c | 28 ++++++++++++++++++++++++++++
|
||||
2 files changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c
|
||||
index c5aa374..bcea046 100644
|
||||
--- a/dlls/oleaut32/tmarshal.c
|
||||
+++ b/dlls/oleaut32/tmarshal.c
|
||||
@@ -2071,7 +2071,7 @@ static HRESULT WINAPI
|
||||
TMStubImpl_Invoke(
|
||||
LPRPCSTUBBUFFER iface, RPCOLEMESSAGE* xmsg,IRpcChannelBuffer*rpcchanbuf)
|
||||
{
|
||||
-#ifdef __i386__
|
||||
+#if defined(__i386__) || defined(__x86_64__)
|
||||
int i;
|
||||
const FUNCDESC *fdesc;
|
||||
TMStubImpl *This = impl_from_IRpcStubBuffer(iface);
|
||||
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
|
||||
index 97f40bc..2d0768b 100644
|
||||
--- a/dlls/oleaut32/typelib.c
|
||||
+++ b/dlls/oleaut32/typelib.c
|
||||
@@ -6475,6 +6475,34 @@ __ASM_GLOBAL_FUNC( call_method,
|
||||
/* same function but returning floating point */
|
||||
static double (CDECL * const call_double_method)(void*,int,const DWORD_PTR*) = (void *)call_method;
|
||||
|
||||
+DWORD _invoke(FARPROC func, CALLCONV callconv, int nrargs, DWORD_PTR *args)
|
||||
+{
|
||||
+ DWORD res;
|
||||
+
|
||||
+ if (TRACE_ON(ole))
|
||||
+ {
|
||||
+ int i;
|
||||
+ TRACE("Calling %p(", func);
|
||||
+ for (i=0; i<min(nrargs, 30); i++) TRACE("%016lx,", args[i]);
|
||||
+ if (nrargs > 30) TRACE("...");
|
||||
+ TRACE(")\n");
|
||||
+ }
|
||||
+
|
||||
+ switch (callconv) {
|
||||
+ case CC_STDCALL:
|
||||
+ case CC_CDECL:
|
||||
+ res = call_method(func, nrargs, args);
|
||||
+ break;
|
||||
+ default:
|
||||
+ FIXME("unsupported calling convention %d\n", callconv);
|
||||
+ res = -1;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ TRACE("returns %08x\n", res);
|
||||
+ return res;
|
||||
+}
|
||||
+
|
||||
#endif /* __x86_64__ */
|
||||
|
||||
static HRESULT userdefined_to_variantvt(ITypeInfo *tinfo, const TYPEDESC *tdesc, VARTYPE *vt)
|
||||
--
|
||||
2.6.2
|
||||
|
@ -0,0 +1,94 @@
|
||||
From b4d8caeafdf2ad8dc4e3b499834f89236a639d49 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 15 Nov 2015 05:09:53 +0100
|
||||
Subject: oleaut32: Implement asm proxys for x86_64.
|
||||
|
||||
---
|
||||
dlls/oleaut32/tmarshal.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 52 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c
|
||||
index bcea046..e53da96 100644
|
||||
--- a/dlls/oleaut32/tmarshal.c
|
||||
+++ b/dlls/oleaut32/tmarshal.c
|
||||
@@ -490,7 +490,6 @@ static HRESULT num_of_funcs(ITypeInfo *tinfo, unsigned int *num,
|
||||
#ifdef __i386__
|
||||
|
||||
#include "pshpack1.h"
|
||||
-
|
||||
typedef struct _TMAsmProxy {
|
||||
DWORD lealeax;
|
||||
BYTE pushleax;
|
||||
@@ -502,10 +501,33 @@ typedef struct _TMAsmProxy {
|
||||
WORD bytestopop;
|
||||
WORD nop;
|
||||
} TMAsmProxy;
|
||||
+#include "poppack.h"
|
||||
+
|
||||
+#elif defined(__x86_64__)
|
||||
|
||||
+#include "pshpack1.h"
|
||||
+typedef struct _TMAsmProxy {
|
||||
+ BYTE pushq_rbp;
|
||||
+ BYTE movq_rsp_rbp[3];
|
||||
+ DWORD subq_0x20_rsp;
|
||||
+ DWORD movq_rcx_0x10rbp;
|
||||
+ DWORD movq_rdx_0x18rbp;
|
||||
+ DWORD movq_r8_0x20rbp;
|
||||
+ DWORD movq_r9_0x28rbp;
|
||||
+ BYTE movq_rcx[3];
|
||||
+ DWORD nr;
|
||||
+ DWORD leaq_0x10rbp_rdx;
|
||||
+ WORD movq_rax;
|
||||
+ void *xcall;
|
||||
+ WORD callq_rax;
|
||||
+ BYTE movq_rbp_rsp[3];
|
||||
+ BYTE popq_rbp;
|
||||
+ BYTE ret;
|
||||
+ DWORD nop;
|
||||
+} TMAsmProxy;
|
||||
#include "poppack.h"
|
||||
|
||||
-#else /* __i386__ */
|
||||
+#else
|
||||
# warning You need to implement stubless proxies for your architecture
|
||||
typedef struct _TMAsmProxy {
|
||||
} TMAsmProxy;
|
||||
@@ -1845,6 +1867,34 @@ static HRESULT init_proxy_entry_point(TMProxyImpl *proxy, unsigned int num)
|
||||
xasm->bytestopop = nrofargs * 4;
|
||||
xasm->nop = 0x9090;
|
||||
proxy->lpvtbl[fdesc->oVft / sizeof(void *)] = xasm;
|
||||
+
|
||||
+#elif defined(__x86_64__)
|
||||
+
|
||||
+ xasm->pushq_rbp = 0x55; /* pushq %rbp */
|
||||
+ xasm->movq_rsp_rbp[0] = 0x48; /* movq %rsp,%rbp */
|
||||
+ xasm->movq_rsp_rbp[1] = 0x89;
|
||||
+ xasm->movq_rsp_rbp[2] = 0xe5;
|
||||
+ xasm->subq_0x20_rsp = 0x20ec8348; /* subq 0x20,%rsp */
|
||||
+ xasm->movq_rcx_0x10rbp = 0x104d8948; /* movq %rcx,0x10(%rbp) */
|
||||
+ xasm->movq_rdx_0x18rbp = 0x18558948; /* movq %rdx,0x18(%rbp) */
|
||||
+ xasm->movq_r8_0x20rbp = 0x2045894c; /* movq %r8,0x20(%rbp) */
|
||||
+ xasm->movq_r9_0x28rbp = 0x284d894c; /* movq %r9,0x28(%rbp) */
|
||||
+ xasm->movq_rcx[0] = 0x48; /* movq <num>,%rcx */
|
||||
+ xasm->movq_rcx[1] = 0xc7;
|
||||
+ xasm->movq_rcx[2] = 0xc1;
|
||||
+ xasm->nr = num;
|
||||
+ xasm->leaq_0x10rbp_rdx = 0x10558d48; /* leaq 0x10(%rbp),%rdx */
|
||||
+ xasm->movq_rax = 0xb848; /* movq <xCall>,%rax */
|
||||
+ xasm->xcall = xCall;
|
||||
+ xasm->callq_rax = 0xd0ff; /* callq *%rax */
|
||||
+ xasm->movq_rbp_rsp[0] = 0x48; /* movq %rbp,%rsp */
|
||||
+ xasm->movq_rbp_rsp[1] = 0x89;
|
||||
+ xasm->movq_rbp_rsp[2] = 0xec;
|
||||
+ xasm->popq_rbp = 0x5d; /* popq %rbp */
|
||||
+ xasm->ret = 0xc3; /* ret */
|
||||
+ xasm->nop = 0x90909090; /* nop */
|
||||
+ proxy->lpvtbl[fdesc->oVft / sizeof(void *)] = xasm;
|
||||
+
|
||||
#else
|
||||
FIXME("not implemented on non i386\n");
|
||||
return E_FAIL;
|
||||
--
|
||||
2.6.2
|
||||
|
1
patches/oleaut32-x86_64_Marshaller/definition
Normal file
1
patches/oleaut32-x86_64_Marshaller/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [26768] Implement stubless proxies on x86_64
|
@ -227,6 +227,7 @@ patch_enable_all ()
|
||||
enable_nvcuvid_CUDA_Video_Support="$1"
|
||||
enable_nvencodeapi_Video_Encoder="$1"
|
||||
enable_oleaut32_TKIND_COCLASS="$1"
|
||||
enable_oleaut32_x86_64_Marshaller="$1"
|
||||
enable_openal32_EFX_Extension="$1"
|
||||
enable_opengl32_Revert_Disable_Ext="$1"
|
||||
enable_quartz_MediaSeeking_Positions="$1"
|
||||
@ -787,6 +788,9 @@ patch_enable ()
|
||||
oleaut32-TKIND_COCLASS)
|
||||
enable_oleaut32_TKIND_COCLASS="$2"
|
||||
;;
|
||||
oleaut32-x86_64_Marshaller)
|
||||
enable_oleaut32_x86_64_Marshaller="$2"
|
||||
;;
|
||||
openal32-EFX_Extension)
|
||||
enable_openal32_EFX_Extension="$2"
|
||||
;;
|
||||
@ -4691,6 +4695,25 @@ if test "$enable_oleaut32_TKIND_COCLASS" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset oleaut32-x86_64_Marshaller
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#26768] Implement stubless proxies on x86_64
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/oleaut32/tmarshal.c, dlls/oleaut32/typelib.c, dlls/oleaut32/typelib.h
|
||||
# |
|
||||
if test "$enable_oleaut32_x86_64_Marshaller" -eq 1; then
|
||||
patch_apply oleaut32-x86_64_Marshaller/0001-oleaut32-Initial-preparation-to-make-marshalling-com.patch
|
||||
patch_apply oleaut32-x86_64_Marshaller/0002-oleaut32-Implement-TMStubImpl_Invoke-on-x86_64.patch
|
||||
patch_apply oleaut32-x86_64_Marshaller/0003-oleaut32-Implement-asm-proxys-for-x86_64.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "oleaut32: Initial preparation to make marshalling compatible with x86_64.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "oleaut32: Implement TMStubImpl_Invoke on x86_64.", 1 },';
|
||||
echo '+ { "Sebastian Lackner", "oleaut32: Implement asm proxys for x86_64.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset openal32-EFX_Extension
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
Loading…
Reference in New Issue
Block a user