From patchwork Wed Apr 20 19:26:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Froyd X-Patchwork-Id: 92283 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 5D1F3B6FBD for ; Thu, 21 Apr 2011 05:26:47 +1000 (EST) Received: (qmail 10668 invoked by alias); 20 Apr 2011 19:26:45 -0000 Received: (qmail 10658 invoked by uid 22791); 20 Apr 2011 19:26:44 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Apr 2011 19:26:26 +0000 Received: (qmail 20910 invoked from network); 20 Apr 2011 19:26:26 -0000 Received: from unknown (HELO codesourcery.com) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 20 Apr 2011 19:26:26 -0000 Date: Wed, 20 Apr 2011 15:26:17 -0400 From: Nathan Froyd To: gcc-patches@gcc.gnu.org Cc: nickc@redhat.com Subject: [PATCH] use build_function_type_list in the frv backend Message-ID: <20110420192617.GC6507@nightcrawler> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org As $SUBJECT suggests. Tested with cross to frv-elf. OK to commit? -Nathan * config/frv/frv.c (frv_init_builtins): Delete `endlink' variable. Call builtin_function_type_list instead of builtin_function_type. (UNARY, BINARY, TRINARY, QUAD): Likewise. diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c index 0913765..564baa0 100644 --- a/gcc/config/frv/frv.c +++ b/gcc/config/frv/frv.c @@ -8390,7 +8390,6 @@ static struct builtin_description bdesc_stores[] = static void frv_init_builtins (void) { - tree endlink = void_list_node; tree accumulator = integer_type_node; tree integer = integer_type_node; tree voidt = void_type_node; @@ -8405,24 +8404,18 @@ frv_init_builtins (void) tree iacc = integer_type_node; #define UNARY(RET, T1) \ - build_function_type (RET, tree_cons (NULL_TREE, T1, endlink)) + build_function_type_list (RET, T1, NULL_TREE) #define BINARY(RET, T1, T2) \ - build_function_type (RET, tree_cons (NULL_TREE, T1, \ - tree_cons (NULL_TREE, T2, endlink))) + build_function_type_list (RET, T1, T2, NULL_TREE) #define TRINARY(RET, T1, T2, T3) \ - build_function_type (RET, tree_cons (NULL_TREE, T1, \ - tree_cons (NULL_TREE, T2, \ - tree_cons (NULL_TREE, T3, endlink)))) + build_function_type_list (RET, T1, T2, T3, NULL_TREE) #define QUAD(RET, T1, T2, T3, T4) \ - build_function_type (RET, tree_cons (NULL_TREE, T1, \ - tree_cons (NULL_TREE, T2, \ - tree_cons (NULL_TREE, T3, \ - tree_cons (NULL_TREE, T4, endlink))))) + build_function_type_list (RET, T1, T2, T3, NULL_TREE) - tree void_ftype_void = build_function_type (voidt, endlink); + tree void_ftype_void = build_function_type_list (voidt, NULL_TREE); tree void_ftype_acc = UNARY (voidt, accumulator); tree void_ftype_uw4_uw1 = BINARY (voidt, uword4, uword1);