sh.c (sh_media_init_builtins): Call build_function_type_list instead of build_functio...
authorNathan Froyd <froydnj@codesourcery.com>
Tue, 3 May 2011 15:49:22 +0000 (15:49 +0000)
committerNathan Froyd <froydnj@gcc.gnu.org>
Tue, 3 May 2011 15:49:22 +0000 (15:49 +0000)
* config/sh/sh.c (sh_media_init_builtins): Call
build_function_type_list instead of build_function_type.

From-SVN: r173318

gcc/ChangeLog
gcc/config/sh/sh.c

index 386fd8afc95a967f9261d52aceef6a2cd121f2bf..531d4faf07a89ba3b464bd49ceb102c7bae0da9b 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
+
+       * config/sh/sh.c (sh_media_init_builtins): Call
+       build_function_type_list instead of build_function_type.
+
 2011-05-03  Nathan Froyd  <froydnj@codesourcery.com>
 
        * config/sparc/sparc.c (sparc_file_end): Call
index 6d0e2131392262d2c64856cbddfc0e47bbeeb9b9..d799782181e730a74473a9c1f391e26cc93434d5 100644 (file)
@@ -11231,6 +11231,7 @@ sh_media_init_builtins (void)
       else
        {
          int has_result = signature_args[signature][0] != 0;
+         tree args[3];
 
          if ((signature_args[signature][1] & 8)
              && (((signature_args[signature][1] & 1) && TARGET_SHMEDIA32)
@@ -11239,7 +11240,8 @@ sh_media_init_builtins (void)
          if (! TARGET_FPU_ANY
              && FLOAT_MODE_P (insn_data[d->icode].operand[0].mode))
            continue;
-         type = void_list_node;
+         for (i = 0; i < (int) ARRAY_SIZE (args); i++)
+           args[i] = NULL_TREE;
          for (i = 3; ; i--)
            {
              int arg = signature_args[signature][i];
@@ -11257,9 +11259,10 @@ sh_media_init_builtins (void)
                arg_type = void_type_node;
              if (i == 0)
                break;
-             type = tree_cons (NULL_TREE, arg_type, type);
+             args[i-1] = arg_type;
            }
-         type = build_function_type (arg_type, type);
+         type = build_function_type_list (arg_type, args[0], args[1],
+                                          args[2], NULL_TREE);
          if (signature < SH_BLTIN_NUM_SHARED_SIGNATURES)
            shared[signature] = type;
        }