alpha.c (alpha_va_arg): Handle TFmode, TCmode args, passed by reference.

* config/alpha/alpha.c (alpha_va_arg): Handle TFmode, TCmode args,
	passed by reference.

From-SVN: r42969
This commit is contained in:
Rainer Orth 2001-06-07 16:56:31 +00:00 committed by Rainer Orth
parent 561c1ae113
commit 09e983244e
2 changed files with 20 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2001-06-07 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config/alpha/alpha.c (alpha_va_arg): Handle TFmode, TCmode args,
passed by reference.
2001-06-07 Joseph S. Myers <jsm28@cam.ac.uk>
* doc/tm.texi (TARGET_SWITCHES, TARGET_OPTIONS): Adjust markup.

View File

@ -1,6 +1,6 @@
/* Subroutines used for code generation on the DEC Alpha.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000 Free Software Foundation, Inc.
2000, 2001 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GNU CC.
@ -4316,6 +4316,7 @@ alpha_va_arg (valist, type)
tree t;
tree offset_field, base_field, addr_tree, addend;
tree wide_type, wide_ofs;
int indirect = 0;
if (TARGET_OPEN_VMS)
return std_expand_builtin_va_arg (valist, type);
@ -4334,7 +4335,13 @@ alpha_va_arg (valist, type)
wide_ofs = save_expr (build1 (CONVERT_EXPR, wide_type, offset_field));
addend = wide_ofs;
if (FLOAT_TYPE_P (type))
if (TYPE_MODE (type) == TFmode || TYPE_MODE (type) == TCmode)
{
indirect = 1;
tsize = UNITS_PER_WORD;
}
else if (FLOAT_TYPE_P (type))
{
tree fpaddend, cond;
@ -4360,6 +4367,12 @@ alpha_va_arg (valist, type)
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
if (indirect)
{
addr = force_reg (Pmode, addr);
addr = gen_rtx_MEM (Pmode, addr);
}
return addr;
}