This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

S/390: Use build_va_arg_indirect_ref


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]