This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix target stdarg vs mudflap
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 11 Jul 2005 20:50:20 -0700
- Subject: fix target stdarg vs mudflap
It looks like someone introduced build_va_arg_indirect_ref, fixed
the standard routine used by i386, and various port maintainers
have trickled in their individual patches. Leaving these handful
of targets unfixed.
Tested on alpha-linux.
r~
* config/alpha/alpha.c (alpha_gimplify_va_arg_1): Use
build_va_arg_indirect_ref.
(alpha_gimplify_va_arg): Likewise.
* config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise.
* config/i860/i860.c (i860_gimplify_va_arg_expr): Likewise.
* config/mips/mips.c (mips_gimplify_va_arg_expr): Likewise.
* config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
* config/sh/sh.c (sh_gimplify_va_arg_expr): Likewise.
* config/stormy16/stormy16.c (xstormy16_expand_builtin_va_arg):
Likewise.
* config/xtensa/xtensa.c (xtensa_gimplify_va_arg_expr): Likewise.
Index: config/alpha/alpha.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
retrieving revision 1.431
diff -u -p -d -r1.431 alpha.c
--- config/alpha/alpha.c 9 Jul 2005 18:28:02 -0000 1.431
+++ config/alpha/alpha.c 12 Jul 2005 03:43:55 -0000
@@ -6238,7 +6238,7 @@ alpha_gimplify_va_arg_1 (tree type, tree
build (PLUS_EXPR, TREE_TYPE (offset), offset, t));
gimplify_and_add (t, pre_p);
- return build_fold_indirect_ref (addr);
+ return build_va_arg_indirect_ref (addr);
}
static tree
@@ -6279,7 +6279,7 @@ alpha_gimplify_va_arg (tree valist, tree
gimplify_and_add (t, pre_p);
if (indirect)
- r = build_fold_indirect_ref (r);
+ r = build_va_arg_indirect_ref (r);
return r;
}
Index: c4x/c4x.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/c4x/c4x.c,v
retrieving revision 1.173
diff -u -p -d -r1.173 c4x.c
--- c4x/c4x.c 3 Jul 2005 21:08:02 -0000 1.173
+++ c4x/c4x.c 11 Jul 2005 19:48:27 -0000
@@ -725,10 +725,10 @@ c4x_gimplify_va_arg_expr (tree valist, t
t = build (PREDECREMENT_EXPR, TREE_TYPE (valist), valist,
build_int_cst (NULL_TREE, int_size_in_bytes (type)));
t = fold_convert (build_pointer_type (type), t);
- t = build_fold_indirect_ref (t);
+ t = build_va_arg_indirect_ref (t);
if (indirect)
- t = build_fold_indirect_ref (t);
+ t = build_va_arg_indirect_ref (t);
return t;
}
Index: i860/i860.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i860/i860.c,v
retrieving revision 1.51
diff -u -p -d -r1.51 i860.c
--- i860/i860.c 25 Jun 2005 01:21:25 -0000 1.51
+++ i860/i860.c 11 Jul 2005 19:48:28 -0000
@@ -2036,8 +2036,8 @@ i860_gimplify_va_arg_expr (tree valist,
addr = fold_convert (type_ptr, addr);
if (indirect)
- addr = build_fold_indirect_ref (addr);
- return build_fold_indirect_ref (addr);
+ addr = build_va_arg_indirect_ref (addr);
+ return build_va_arg_indirect_ref (addr);
}
/* Compute a (partial) cost for rtx X. Return true if the complete
Index: mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.513
diff -u -p -d -r1.513 mips.c
--- mips/mips.c 25 Jun 2005 01:21:41 -0000 1.513
+++ mips/mips.c 11 Jul 2005 19:48:30 -0000
@@ -4186,11 +4186,11 @@ mips_gimplify_va_arg_expr (tree valist,
COND_EXPR_ELSE (addr) = t;
addr = fold_convert (build_pointer_type (type), addr);
- addr = build_fold_indirect_ref (addr);
+ addr = build_va_arg_indirect_ref (addr);
}
if (indirect)
- addr = build_fold_indirect_ref (addr);
+ addr = build_va_arg_indirect_ref (addr);
return addr;
}
Index: pa/pa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.c,v
retrieving revision 1.302
diff -u -p -d -r1.302 pa.c
--- pa/pa.c 10 Jul 2005 16:47:28 -0000 1.302
+++ pa/pa.c 11 Jul 2005 19:48:32 -0000
@@ -5834,10 +5834,10 @@ hppa_gimplify_va_arg_expr (tree valist,
}
t = fold_convert (ptr, t);
- t = build_fold_indirect_ref (t);
+ t = build_va_arg_indirect_ref (t);
if (indirect)
- t = build_fold_indirect_ref (t);
+ t = build_va_arg_indirect_ref (t);
return t;
}
Index: sh/sh.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.337
diff -u -p -d -r1.337 sh.c
--- sh/sh.c 6 Jul 2005 19:19:02 -0000 1.337
+++ sh/sh.c 11 Jul 2005 19:48:34 -0000
@@ -6811,7 +6811,7 @@ sh_gimplify_va_arg_expr (tree valist, tr
result = tmp;
if (pass_by_ref)
- result = build_fold_indirect_ref (result);
+ result = build_va_arg_indirect_ref (result);
return result;
}
Index: stormy16/stormy16.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/stormy16/stormy16.c,v
retrieving revision 1.79
diff -u -p -d -r1.79 stormy16.c
--- stormy16/stormy16.c 3 Jul 2005 21:08:10 -0000 1.79
+++ stormy16/stormy16.c 11 Jul 2005 19:48:35 -0000
@@ -1480,7 +1480,7 @@ xstormy16_expand_builtin_va_arg (tree va
gimplify_and_add (t, pre_p);
addr = fold_convert (build_pointer_type (type), addr);
- return build_fold_indirect_ref (addr);
+ return build_va_arg_indirect_ref (addr);
}
/* Initialize the variable parts of a trampoline. ADDR is an RTX for
Index: xtensa/xtensa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/xtensa/xtensa.c,v
retrieving revision 1.76
diff -u -p -d -r1.76 xtensa.c
--- xtensa/xtensa.c 25 Jun 2005 01:22:39 -0000 1.76
+++ xtensa/xtensa.c 11 Jul 2005 19:48:36 -0000
@@ -2303,8 +2303,8 @@ xtensa_gimplify_va_arg_expr (tree valist
addr = fold_convert (build_pointer_type (type), addr);
if (indirect)
- addr = build_fold_indirect_ref (addr);
- return build_fold_indirect_ref (addr);
+ addr = build_va_arg_indirect_ref (addr);
+ return build_va_arg_indirect_ref (addr);
}