Patchwork [alpha] : Variable arguments handling broken by r190229

login
register
mail settings
Submitter Uros Bizjak
Date Aug. 11, 2012, 2:43 p.m.
Message ID <CAFULd4ZBj4pWj9Fz-4hPpfxU5wgCKgdURmmgZotCMJYQrR-Lpw@mail.gmail.com>
Download mbox | patch
Permalink /patch/176690/
State New
Headers show

Comments

Uros Bizjak - Aug. 11, 2012, 2:43 p.m.
Hello!

We have to apply the same DECL_UID change as in tree-stdarg.c to
alpha_stdarg_optimize_hook.

2012-08-11  Uros Bizjak  <ubizjak@gmail.com>

	* config/alpha/alpha.c (alpha_stdarg_optimize_hook): Shift DECL_UID
	in the va_list_vars bitmap by num_ssa_names.

Tested on alphaev68-pc-linux-gnu, committed to mainline SVN as obvious.

Uros.

Patch

Index: config/alpha/alpha.c
===================================================================
--- config/alpha/alpha.c	(revision 190311)
+++ config/alpha/alpha.c	(working copy)
@@ -5942,7 +5942,7 @@ 
 
   base = get_base_address (base);
   if (TREE_CODE (base) != VAR_DECL
-      || !bitmap_bit_p (si->va_list_vars, DECL_UID (base)))
+      || !bitmap_bit_p (si->va_list_vars, DECL_UID (base) + num_ssa_names))
     return false;
 
   offset = gimple_op (stmt, 1 + offset_arg);
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 190315)
+++ ChangeLog	(working copy)
@@ -1,5 +1,10 @@ 
 2012-08-11  Uros Bizjak  <ubizjak@gmail.com>
 
+	* config/alpha/alpha.c (alpha_stdarg_optimize_hook): Shift DECL_UID
+	in the va_list_vars bitmap by num_ssa_names.
+
+2012-08-11  Uros Bizjak  <ubizjak@gmail.com>
+
 	* config/i386/sse.md (xop integer multiply/add insns): Use
 	register_operand for operand 3 predicate.
 	(xop_phadd<u>bq):  Fix vec_select selectors.