Commit b78cb618 by Richard Henderson Committed by Richard Henderson

re PR target/45027 (FAIL: c-c++-common/dfp/pr36800.c)

	PR target/45027
	* config/i386/i386.c (setup_incoming_varargs_64): Force the use
	of V4SFmode for the SSE saves; increase stack alignment if needed.
	(ix86_gimplify_va_arg): Don't increase stack alignment here.

From-SVN: r162429
parent 2e290598
2010-07-22 Richard Henderson <rth@redhat.com>
PR target/45027
* config/i386/i386.c (setup_incoming_varargs_64): Force the use
of V4SFmode for the SSE saves; increase stack alignment if needed.
(ix86_gimplify_va_arg): Don't increase stack alignment here.
2010-07-22 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/45028
......
......@@ -7073,7 +7073,7 @@ setup_incoming_varargs_64 (CUMULATIVE_ARGS *cum)
/* FPR size of varargs save area. We don't need it if we don't pass
anything in SSE registers. */
if (cum->sse_nregs && cfun->va_list_fpr_size)
if (TARGET_SSE && cfun->va_list_fpr_size)
ix86_varargs_fpr_size = X86_64_SSE_REGPARM_MAX * 16;
else
ix86_varargs_fpr_size = 0;
......@@ -7112,12 +7112,13 @@ setup_incoming_varargs_64 (CUMULATIVE_ARGS *cum)
emit_jump_insn (gen_cbranchqi4 (test, XEXP (test, 0), XEXP (test, 1),
label));
/* If we've determined that we're only loading scalars (and not
vector data) then we can store doubles instead. */
if (crtl->stack_alignment_needed < 128)
smode = DFmode;
else
smode = V4SFmode;
/* ??? If !TARGET_SSE_TYPELESS_STORES, would we perform better if
we used movdqa (i.e. TImode) instead? Perhaps even better would
be if we could determine the real mode of the data, via a hook
into pass_stdarg. Ignore all that for now. */
smode = V4SFmode;
if (crtl->stack_alignment_needed < GET_MODE_ALIGNMENT (smode))
crtl->stack_alignment_needed = GET_MODE_ALIGNMENT (smode);
max = cum->sse_regno + cfun->va_list_fpr_size / 16;
if (max > X86_64_SSE_REGPARM_MAX)
......@@ -7549,8 +7550,7 @@ ix86_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
arg_boundary = MAX_SUPPORTED_STACK_ALIGNMENT;
/* Care for on-stack alignment if needed. */
if (arg_boundary <= 64
|| integer_zerop (TYPE_SIZE (type)))
if (arg_boundary <= 64 || size == 0)
t = ovf;
else
{
......@@ -7561,9 +7561,8 @@ ix86_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
t = build2 (BIT_AND_EXPR, TREE_TYPE (t), t,
size_int (-align));
t = fold_convert (TREE_TYPE (ovf), t);
if (crtl->stack_alignment_needed < arg_boundary)
crtl->stack_alignment_needed = arg_boundary;
}
gimplify_expr (&t, pre_p, NULL, is_gimple_val, fb_rvalue);
gimplify_assign (addr, t, pre_p);
......
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