diff mbox

[i386] : Fix of a possible use of prior set variables

Message ID CAEwic4YeXyJSNsbAtatTiZoPEKJVscYioURQ=gayw6TX+0DSww@mail.gmail.com
State New
Headers show

Commit Message

Kai Tietz Aug. 4, 2011, 6:50 p.m. UTC
Hello,

This patch resets for x64_64 windows abi the content of
ix86_varargs_gpr_size and  ix86_varargs_fpr_size to zero.
Those variable might contain wrong values from prior use of sysv-abi va_list.

ChangeLog

2011-08-04  Kai Tietz  <ktietz@redhat.com>

        * config/i386/i386.c (setup_incoming_varargs_ms_64): Set
        ix86_varargs_gpr_size and ix86_varargs_fpr_size to zero.

Tested for x86_64-w64-mingw32.  Ok for apply?

Regards,
Kai

Comments

Richard Henderson Aug. 4, 2011, 6:58 p.m. UTC | #1
On 08/04/2011 11:50 AM, Kai Tietz wrote:
>         * config/i386/i386.c (setup_incoming_varargs_ms_64): Set
>         ix86_varargs_gpr_size and ix86_varargs_fpr_size to zero.

Ok.


r~
diff mbox

Patch

Index: i386.c
===================================================================
--- i386.c      (revision 177408)
+++ i386.c      (working copy)
@@ -7502,6 +7502,11 @@ 
 static void
 setup_incoming_varargs_ms_64 (CUMULATIVE_ARGS *cum)
 {
+  /* Reset to zero, as there might be a sysv vaarg used
+     before.  */
+  ix86_varargs_gpr_size = 0;
+  ix86_varargs_fpr_size = 0;
+
   alias_set_type set = get_varargs_alias_set ();
   int i;