Alexandre Julliard : widl: Set a correct fpu parameter mask on 64-bit.
Alexandre Julliard
julliard at winehq.org
Wed Jun 8 11:26:59 CDT 2011
Module: wine
Branch: master
Commit: e4a0483529d0dae4480b888ce025001dcb7dd6bb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e4a0483529d0dae4480b888ce025001dcb7dd6bb
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Jun 8 11:51:14 2011 +0200
widl: Set a correct fpu parameter mask on 64-bit.
---
tools/widl/typegen.c | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 7620653..b41abd0 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -1353,7 +1353,24 @@ static void write_proc_func_header( FILE *file, int indent, const type_t *iface,
*offset += 14;
if (pointer_size == 8)
{
- print_file( file, indent, "NdrFcShort(0x0),\n" ); /* floating point mask */
+ unsigned short pos = 0, fpu_mask = 0;
+
+ if (is_object( iface )) pos += 2;
+ if (args) LIST_FOR_EACH_ENTRY( var, args, var_t, entry )
+ {
+ if (type_get_type( var->type ) == TYPE_BASIC)
+ {
+ switch (type_basic_get_type( var->type ))
+ {
+ case TYPE_BASIC_FLOAT: fpu_mask |= 1 << pos; break;
+ case TYPE_BASIC_DOUBLE: fpu_mask |= 2 << pos; break;
+ default: break;
+ }
+ }
+ pos += 2;
+ if (pos >= 16) break;
+ }
+ print_file( file, indent, "NdrFcShort(0x%x),\n", fpu_mask ); /* floating point mask */
*offset += 2;
}
}
More information about the wine-cvs
mailing list