Commit b0fadda7 by Geoffrey Keating Committed by Geoffrey Keating

rs6000.c (rs6000_va_arg): No need to special-case altivec operands.

	* config/rs6000/rs6000.c (rs6000_va_arg): No need to special-case
	altivec operands.

From-SVN: r75960
parent e0a21ab9
2004-01-15 Geoffrey Keating <geoffk@apple.com>
* config/rs6000/rs6000.c (rs6000_va_arg): No need to special-case
altivec operands.
2004-01-15 Kazu Hirata <kazu@cs.umass.edu> 2004-01-15 Kazu Hirata <kazu@cs.umass.edu>
* c-common.h: Fix comment formatting. * c-common.h: Fix comment formatting.
......
...@@ -4678,29 +4678,7 @@ rs6000_va_arg (tree valist, tree type) ...@@ -4678,29 +4678,7 @@ rs6000_va_arg (tree valist, tree type)
return expand_expr (t, NULL_RTX, VOIDmode, EXPAND_NORMAL); return expand_expr (t, NULL_RTX, VOIDmode, EXPAND_NORMAL);
} }
else else
{ return std_expand_builtin_va_arg (valist, type);
/* Altivec arguments must be aligned to a 128-bit boundary. */
if (TARGET_ALTIVEC_ABI && ALTIVEC_VECTOR_MODE (TYPE_MODE (type)))
{
tree vtype = TREE_TYPE (valist);
tree new_valist, modify;
/* Round address up to multiple of 16. Computes
(addr+15)&~0xf. */
new_valist = fold (build (BIT_AND_EXPR, vtype,
fold (build (PLUS_EXPR, vtype, valist,
build_int_2 (15, 0))),
build_int_2 (~15, -1)));
/* Update valist. */
modify = build (MODIFY_EXPR, TREE_TYPE (valist), valist,
new_valist);
TREE_SIDE_EFFECTS (modify) = 1;
expand_expr (modify, const0_rtx, VOIDmode, EXPAND_NORMAL);
}
return std_expand_builtin_va_arg (valist, type);
}
} }
f_gpr = TYPE_FIELDS (TREE_TYPE (va_list_type_node)); f_gpr = TYPE_FIELDS (TREE_TYPE (va_list_type_node));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment