From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92762 invoked by alias); 14 Apr 2016 14:41:04 -0000 Mailing-List: contact cgen-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sourceware.org Received: (qmail 92739 invoked by uid 89); 14 Apr 2016 14:41:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=BAYES_00,KAM_ASCII_DIVIDERS,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:cgen@so, cgen, HTo:U*cgen, H*Ad:U*cgen X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Apr 2016 14:40:53 +0000 Received: from ball (TREVOR.WV.CC.CMU.EDU [128.237.231.241]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id A94C8C07C for ; Thu, 14 Apr 2016 14:40:51 +0000 (UTC) Date: Thu, 14 Apr 2016 14:41:00 -0000 From: Trevor Saunders To: cgen@sourceware.org Subject: (patch) stop generating code that uses old style arguments Message-ID: <20160414144606.GB9695@ball> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2016-q2/txt/msg00001.txt.bz2 Hi, I wanted to enable -Wold-style-{declaration,definition} for all of binutils, and ran into cgen generating that style of definition, so here's a patch to fix that. Trev ChangeLog: 2016-04-14 Trevor Saunders * opc-itab.scm (asm_hash_insn_p): Stop using old style arguments. (dis_hash_insn_p): Likewise. (asm_hash_insn): Likewise. (dis_hash_insn): Likewise. * opc-opinst.scm (@arch@_cgen_init_opinst_table): Likewise. Index: opc-itab.scm =================================================================== RCS file: /cvs/src/src/cgen/opc-itab.scm,v retrieving revision 1.18 diff -u -p -r1.18 opc-itab.scm --- opc-itab.scm 3 Nov 2009 16:24:02 -0000 1.18 +++ opc-itab.scm 14 Apr 2016 14:32:21 -0000 @@ -412,15 +412,13 @@ static const CGEN_OPCODE @arch@_cgen_ins Targets are free to override CGEN_{ASM,DIS}_HASH_P in the .opc file. */ static int -asm_hash_insn_p (insn) - const CGEN_INSN *insn ATTRIBUTE_UNUSED; +asm_hash_insn_p (const CGEN_INSN *insn ATTRIBUTE_UNUSED) { return CGEN_ASM_HASH_P (insn); } static int -dis_hash_insn_p (insn) - const CGEN_INSN *insn; +dis_hash_insn_p (const CGEN_INSN *insn) { /* If building the hash table and the NO-DIS attribute is present, ignore. */ @@ -452,8 +450,7 @@ dis_hash_insn_p (insn) Targets are free to override CGEN_{ASM,DIS}_HASH in the .opc file. */ static unsigned int -asm_hash_insn (mnem) - const char * mnem; +asm_hash_insn (const char *mnem) { return CGEN_ASM_HASH (mnem); } @@ -462,9 +459,8 @@ asm_hash_insn (mnem) VALUE is the first base_insn_bitsize bits as an int in host order. */ static unsigned int -dis_hash_insn (buf, value) - const char * buf ATTRIBUTE_UNUSED; - CGEN_INSN_INT value ATTRIBUTE_UNUSED; +dis_hash_insn (const char *buf ATTRIBUTE_UNUSED, + CGEN_INSN_INT value ATTRIBUTE_UNUSED) { return CGEN_DIS_HASH (buf, value); } Index: opc-opinst.scm =================================================================== RCS file: /cvs/src/src/cgen/opc-opinst.scm,v retrieving revision 1.8 diff -u -p -r1.8 opc-opinst.scm --- opc-opinst.scm 5 Nov 2009 16:55:33 -0000 1.8 +++ opc-opinst.scm 14 Apr 2016 14:32:21 -0000 @@ -117,8 +117,7 @@ /* Function to call before using the operand instance table. */ void -@arch@_cgen_init_opinst_table (cd) - CGEN_CPU_DESC cd; +@arch@_cgen_init_opinst_table (CGEN_CPU_DESC cd) { int i; const CGEN_OPINST **oi = & @arch@_cgen_opinst_table[0];