i386.c (ix86_gimplify_va_arg): Fix type mismatch errors across operations.
* config/i386/i386.c (ix86_gimplify_va_arg): Fix type mismatch errors across operations. From-SVN: r92072
This commit is contained in:
parent
0ecbf41123
commit
56d76b697d
|
@ -1,3 +1,8 @@
|
|||
2004-12-12 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* config/i386/i386.c (ix86_gimplify_va_arg): Fix type mismatch
|
||||
errors across operations.
|
||||
|
||||
2004-12-12 Di-an Jan <dianj@freeshell.org>
|
||||
|
||||
* doc/passes.texi (Pass Manager): Correct list of source files.
|
||||
|
|
|
@ -3368,6 +3368,7 @@ ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p)
|
|||
sse_addr = create_tmp_var (ptr_type_node, "sse_addr");
|
||||
DECL_POINTER_ALIAS_SET (sse_addr) = get_varargs_alias_set ();
|
||||
}
|
||||
|
||||
/* First ensure that we fit completely in registers. */
|
||||
if (needed_intregs)
|
||||
{
|
||||
|
@ -3393,14 +3394,16 @@ ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p)
|
|||
if (needed_intregs)
|
||||
{
|
||||
/* int_addr = gpr + sav; */
|
||||
t = build2 (PLUS_EXPR, ptr_type_node, sav, gpr);
|
||||
t = fold_convert (ptr_type_node, gpr);
|
||||
t = build2 (PLUS_EXPR, ptr_type_node, sav, t);
|
||||
t = build2 (MODIFY_EXPR, void_type_node, int_addr, t);
|
||||
gimplify_and_add (t, pre_p);
|
||||
}
|
||||
if (needed_sseregs)
|
||||
{
|
||||
/* sse_addr = fpr + sav; */
|
||||
t = build2 (PLUS_EXPR, ptr_type_node, sav, fpr);
|
||||
t = fold_convert (ptr_type_node, fpr);
|
||||
t = build2 (PLUS_EXPR, ptr_type_node, sav, t);
|
||||
t = build2 (MODIFY_EXPR, void_type_node, sse_addr, t);
|
||||
gimplify_and_add (t, pre_p);
|
||||
}
|
||||
|
@ -3453,14 +3456,14 @@ ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p)
|
|||
if (needed_intregs)
|
||||
{
|
||||
t = build2 (PLUS_EXPR, TREE_TYPE (gpr), gpr,
|
||||
build_int_cst (NULL_TREE, needed_intregs * 8));
|
||||
build_int_cst (TREE_TYPE (gpr), needed_intregs * 8));
|
||||
t = build2 (MODIFY_EXPR, TREE_TYPE (gpr), gpr, t);
|
||||
gimplify_and_add (t, pre_p);
|
||||
}
|
||||
if (needed_sseregs)
|
||||
{
|
||||
t = build2 (PLUS_EXPR, TREE_TYPE (fpr), fpr,
|
||||
build_int_cst (NULL_TREE, needed_sseregs * 16));
|
||||
build_int_cst (TREE_TYPE (fpr), needed_sseregs * 16));
|
||||
t = build2 (MODIFY_EXPR, TREE_TYPE (fpr), fpr, t);
|
||||
gimplify_and_add (t, pre_p);
|
||||
}
|
||||
|
@ -3481,9 +3484,9 @@ ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p)
|
|||
{
|
||||
HOST_WIDE_INT align = FUNCTION_ARG_BOUNDARY (VOIDmode, type) / 8;
|
||||
t = build (PLUS_EXPR, TREE_TYPE (ovf), ovf,
|
||||
build_int_cst (NULL_TREE, align - 1));
|
||||
build_int_cst (TREE_TYPE (ovf), align - 1));
|
||||
t = build (BIT_AND_EXPR, TREE_TYPE (t), t,
|
||||
build_int_cst (NULL_TREE, -align));
|
||||
build_int_cst (TREE_TYPE (t), -align));
|
||||
}
|
||||
gimplify_expr (&t, pre_p, NULL, is_gimple_val, fb_rvalue);
|
||||
|
||||
|
@ -3491,7 +3494,7 @@ ix86_gimplify_va_arg (tree valist, tree type, tree *pre_p, tree *post_p)
|
|||
gimplify_and_add (t2, pre_p);
|
||||
|
||||
t = build2 (PLUS_EXPR, TREE_TYPE (t), t,
|
||||
build_int_cst (NULL_TREE, rsize * UNITS_PER_WORD));
|
||||
build_int_cst (TREE_TYPE (t), rsize * UNITS_PER_WORD));
|
||||
t = build2 (MODIFY_EXPR, TREE_TYPE (ovf), ovf, t);
|
||||
gimplify_and_add (t, pre_p);
|
||||
|
||||
|
|
Loading…
Reference in New Issue