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]

[lto][patch] build on ppc-suse-linux


With this patch I built lto branch on powerpc-suse-linux
for C language (still have a problem with c++ :( ).
Looks like obvious.

Any comments?

Olga

2006-09-19  Olga Golovanevsky  <olga@il.ibm.com>

             * lto-function-out.c (output_expr_operand): Initialize new.

             * config/rs6000/rs6000.c (init_cumulative_args): Use stdarg_p.
             (rs6000_function_ok_for_sibcall):Reflect change from
           TREE_LIST to TREE_VEC.

Index: gcc/lto-function-out.c
===================================================================
--- gcc/lto-function-out.c    (revision 117034)
+++ gcc/lto-function-out.c    (working copy)
@@ -1042,7 +1042,7 @@ output_expr_operand (struct output_block
      bool new;
      output_record_start (ob, NULL, NULL, tag);

-     output_decl_index (ob->main_stream, ob->field_decl_hash_table,
+     new = output_decl_index (ob->main_stream, ob->field_decl_hash_table,
                     &ob->next_field_decl_index, expr);
      if (new)
        VEC_safe_push (tree, heap, ob->field_decls, expr);
@@ -1054,7 +1054,7 @@ output_expr_operand (struct output_block
      bool new;
      output_record_start (ob, NULL, NULL, tag);

-     output_decl_index (ob->main_stream, ob->fn_decl_hash_table,
+     new = output_decl_index (ob->main_stream, ob->fn_decl_hash_table,
                     &ob->next_fn_decl_index, expr);
      if (new)
        VEC_safe_push (tree, heap, ob->fn_decls, expr);
@@ -1067,7 +1067,7 @@ output_expr_operand (struct output_block
        bool new;
        output_record_start (ob, NULL, NULL, tag);

-       output_decl_index (ob->main_stream, ob->var_decl_hash_table,
+       new = output_decl_index (ob->main_stream, ob->var_decl_hash_table,
                       &ob->next_var_decl_index, expr);
        if (new)
          VEC_safe_push (tree, heap, ob->var_decls, expr);
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c      (revision 117034)
+++ gcc/config/rs6000/rs6000.c      (working copy)
@@ -4352,10 +4352,7 @@ init_cumulative_args (CUMULATIVE_ARGS *c
   cum->call_cookie = ((DEFAULT_ABI == ABI_V4 && libcall)
                  ? CALL_LIBCALL : CALL_NORMAL);
   cum->sysv_gregno = GP_ARG_MIN_REG;
-  cum->stdarg = fntype
-    && (TYPE_ARG_TYPES (fntype) != 0
-     && (TREE_VALUE (tree_last  (TYPE_ARG_TYPES (fntype)))
-         != void_type_node));
+  cum->stdarg = fntype && stdarg_p (fntype);

   cum->nargs_prototype = 0;
   if (incoming || cum->prototype)
@@ -13392,10 +13389,13 @@ rs6000_function_ok_for_sibcall (tree dec
     {
       if (TARGET_ALTIVEC_VRSAVE)
      {
-       for (type = TYPE_ARG_TYPES (TREE_TYPE (decl));
-            type; type = TREE_CHAIN (type))
+       int len = num_parm_types (TYPE_ARG_TYPES (TREE_TYPE (decl)));
+       int i;
+
+       for (i = 0; i < len; i++)
          {
-           if (TREE_CODE (TREE_VALUE (type)) == VECTOR_TYPE)
+           type = nth_parm_type (TYPE_ARG_TYPES (TREE_TYPE (decl)), i);
+           if (TREE_CODE (type) == VECTOR_TYPE)
            return false;
          }
      }




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