Zebediah Figura : rpcrt4: Write the floating-point mask on x86-64.

Alexandre Julliard julliard at winehq.org
Mon Nov 12 16:26:55 CST 2018


Module: wine
Branch: master
Commit: 0c642cc043fa9c32b15199182929c14bf7e7be0e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0c642cc043fa9c32b15199182929c14bf7e7be0e

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Fri Nov  9 18:01:59 2018 -0600

rpcrt4: Write the floating-point mask on x86-64.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/rpcrt4/ndr_typelib.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/dlls/rpcrt4/ndr_typelib.c b/dlls/rpcrt4/ndr_typelib.c
index 37be5d0..f68e61e 100644
--- a/dlls/rpcrt4/ndr_typelib.c
+++ b/dlls/rpcrt4/ndr_typelib.c
@@ -689,6 +689,10 @@ static void write_proc_func_header(ITypeInfo *typeinfo, FUNCDESC *desc,
         WORD proc_idx, unsigned char *proc, size_t *proclen)
 {
     unsigned short stack_size = 2 * sizeof(void *); /* This + return */
+#ifdef __x86_64__
+    unsigned short float_mask = 0;
+    unsigned char basetype;
+#endif
     WORD param_idx;
 
     WRITE_CHAR (proc, *proclen, FC_AUTO_HANDLE);
@@ -700,8 +704,28 @@ static void write_proc_func_header(ITypeInfo *typeinfo, FUNCDESC *desc,
 
     WRITE_SHORT(proc, *proclen, 0); /* constant_client_buffer_size */
     WRITE_SHORT(proc, *proclen, 0); /* constant_server_buffer_size */
+#ifdef __x86_64__
+    WRITE_CHAR (proc, *proclen, 0x47);  /* HasExtensions | HasReturn | ClientMustSize | ServerMustSize */
+#else
     WRITE_CHAR (proc, *proclen, 0x07);  /* HasReturn | ClientMustSize | ServerMustSize */
+#endif
     WRITE_CHAR (proc, *proclen, desc->cParams + 1); /* incl. return value */
+#ifdef __x86_64__
+    WRITE_CHAR (proc, *proclen, 10); /* extension size */
+    WRITE_CHAR (proc, *proclen, 0);  /* INTERPRETER_OPT_FLAGS2 */
+    WRITE_SHORT(proc, *proclen, 0);  /* ClientCorrHint */
+    WRITE_SHORT(proc, *proclen, 0);  /* ServerCorrHint */
+    WRITE_SHORT(proc, *proclen, 0);  /* NotifyIndex */
+    for (param_idx = 0; param_idx < desc->cParams && param_idx < 3; param_idx++)
+    {
+        basetype = get_base_type(desc->lprgelemdescParam[param_idx].tdesc.vt);
+        if (basetype == FC_FLOAT)
+            float_mask |= (1 << ((param_idx + 1) * 2));
+        else if (basetype == FC_DOUBLE)
+            float_mask |= (2 << ((param_idx + 1) * 2));
+    }
+    WRITE_SHORT(proc, *proclen, float_mask);
+#endif
 }
 
 static HRESULT write_iface_fs(ITypeInfo *typeinfo, WORD funcs, WORD parentfuncs,




More information about the wine-cvs mailing list