* S/390: Use build_va_arg_indirect_ref
@ 2004-10-12 20:40 Ulrich Weigand
0 siblings, 0 replies; only message in thread
From: Ulrich Weigand @ 2004-10-12 20:40 UTC (permalink / raw)
To: gcc-patches
Hello,
this changes the va_arg handling to use build_va_arg_indirect_ref,
fixing both the mudflap pass49-frag.c and the c-torture stdarg-2.c
test case failures.
Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux,
committed to mainline.
Bye,
Ulrich
ChangeLog:
* config/s390/s390.c (s390_va_start): Use build_va_arg_indirect_ref.
(s390_gimplify_va_arg): Likewise.
Index: gcc/config/s390/s390.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.c,v
retrieving revision 1.192
diff -c -p -r1.192 s390.c
*** gcc/config/s390/s390.c 11 Oct 2004 20:54:06 -0000 1.192
--- gcc/config/s390/s390.c 12 Oct 2004 18:41:21 -0000
*************** s390_va_start (tree valist, rtx nextarg
*** 7475,7481 ****
f_ovf = TREE_CHAIN (f_fpr);
f_sav = TREE_CHAIN (f_ovf);
! valist = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (valist)), valist);
gpr = build (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE);
fpr = build (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE);
ovf = build (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE);
--- 7475,7481 ----
f_ovf = TREE_CHAIN (f_fpr);
f_sav = TREE_CHAIN (f_ovf);
! valist = build_va_arg_indirect_ref (valist);
gpr = build (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE);
fpr = build (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE);
ovf = build (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE);
*************** s390_gimplify_va_arg (tree valist, tree
*** 7565,7571 ****
f_ovf = TREE_CHAIN (f_fpr);
f_sav = TREE_CHAIN (f_ovf);
! valist = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (valist)), valist);
gpr = build (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE);
fpr = build (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE);
ovf = build (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE);
--- 7565,7571 ----
f_ovf = TREE_CHAIN (f_fpr);
f_sav = TREE_CHAIN (f_ovf);
! valist = build_va_arg_indirect_ref (valist);
gpr = build (COMPONENT_REF, TREE_TYPE (f_gpr), valist, f_gpr, NULL_TREE);
fpr = build (COMPONENT_REF, TREE_TYPE (f_fpr), valist, f_fpr, NULL_TREE);
ovf = build (COMPONENT_REF, TREE_TYPE (f_ovf), valist, f_ovf, NULL_TREE);
*************** s390_gimplify_va_arg (tree valist, tree
*** 7700,7706 ****
{
t = build_pointer_type (build_pointer_type (type));
addr = fold_convert (t, addr);
! addr = build_fold_indirect_ref (addr);
}
else
{
--- 7700,7706 ----
{
t = build_pointer_type (build_pointer_type (type));
addr = fold_convert (t, addr);
! addr = build_va_arg_indirect_ref (addr);
}
else
{
*************** s390_gimplify_va_arg (tree valist, tree
*** 7708,7714 ****
addr = fold_convert (t, addr);
}
! return build_fold_indirect_ref (addr);
}
--- 7708,7714 ----
addr = fold_convert (t, addr);
}
! return build_va_arg_indirect_ref (addr);
}
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-12 20:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-12 20:40 S/390: Use build_va_arg_indirect_ref Ulrich Weigand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).