From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13700 invoked by alias); 3 Jan 2013 11:16:30 -0000 Received: (qmail 13677 invoked by uid 22791); 3 Jan 2013 11:16:29 -0000 X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from tx2ehsobe003.messaging.microsoft.com (HELO tx2outboundpool.messaging.microsoft.com) (65.55.88.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Jan 2013 11:16:22 +0000 Received: from mail254-tx2-R.bigfish.com (10.9.14.236) by TX2EHSOBE007.bigfish.com (10.9.40.27) with Microsoft SMTP Server id 14.1.225.23; Thu, 3 Jan 2013 11:16:21 +0000 Received: from mail254-tx2 (localhost [127.0.0.1]) by mail254-tx2-R.bigfish.com (Postfix) with ESMTP id 5E69B1300277; Thu, 3 Jan 2013 11:16:21 +0000 (UTC) X-Forefront-Antispam-Report: CIP:59.163.77.45;KIP:(null);UIP:(null);IPV:NLI;H:KCHJEXHC01.kpit.com;RD:59.163.77.45.static.vsnl.net.in;EFVD:NLI X-SpamScore: -4 X-BigFish: VPS-4(zz936eI154dI4015I1447Izz1de0h1202h1e76h1d1ah1d2ahzz8275bhz2dh2a8h668h839h944hd25hf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h14ddh1504h1537h153bh15d0h162dh1631h1758h1155h) Received: from mail254-tx2 (localhost.localdomain [127.0.0.1]) by mail254-tx2 (MessageSwitch) id 1357211779117512_24112; Thu, 3 Jan 2013 11:16:19 +0000 (UTC) Received: from TX2EHSMHS032.bigfish.com (unknown [10.9.14.238]) by mail254-tx2.bigfish.com (Postfix) with ESMTP id 0F688170007F; Thu, 3 Jan 2013 11:16:19 +0000 (UTC) Received: from KCHJEXHC01.kpit.com (59.163.77.45) by TX2EHSMHS032.bigfish.com (10.9.99.132) with Microsoft SMTP Server (TLS) id 14.1.225.23; Thu, 3 Jan 2013 11:16:18 +0000 Received: from KCHJEXMB02.kpit.com ([169.254.2.126]) by KCHJEXHC01.kpit.com ([172.10.15.73]) with mapi id 14.02.0247.003; Thu, 3 Jan 2013 16:46:15 +0530 From: Kaushik Phatak To: nick clifton , Tom Tromey CC: Pedro Alves , "binutils@sourceware.org" , "gdb-patches@sourceware.org" , Joel Brobecker Subject: RE: [RFA] New port: CR16: BFD Changes required by the gdb port Date: Thu, 03 Jan 2013 11:16:00 -0000 Message-ID: References: <50CB6CA4.1060901@redhat.com> <50E431EF.5030904@redhat.com> In-Reply-To: <50E431EF.5030904@redhat.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: kpitcummins.com Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2013-01/txt/msg00020.txt.bz2 Hi Nick, Thanks for the review and commit. Tom Tromey > make_instruction,match_opcode): Added function prototypes. > What about these? Yes, I agree. These functions are used by the tdep files as well, so a pref= ix here would be useful. Please find below a patch that adds similar prefix for make_instruction and match_opcode. I have re-based this against gdb-7.5.50.20130103. Also fixed a minor typo (doewsn't -> doesn't) Please review and let me know if ok. Thanks, Kaushik 2013-01-03 Kaushik Phatak include/opcode/ChangeLog * cr16.h (cr16_match_opcode,cr16_make_instruction): Added prefix 'cr16_'. =09 diff -uprN gdb_src.orig/include/opcode/cr16.h gdb_src/include/opcode/cr16.h --- gdb_src.orig/include/opcode/cr16.h 2013-01-02 18:43:36.000000000 +0530 +++ gdb_src/include/opcode/cr16.h 2013-01-03 15:53:35.000000000 +0530 @@ -445,7 +445,7 @@ extern ULONGLONG cr16_allWords; extern ins cr16_currInsn; =20 /* Prototypes for function in cr16-dis.c. */ -extern void make_instruction (void); -extern int match_opcode (void); +extern void cr16_make_instruction (void); +extern int cr16_match_opcode (void); =20 #endif /* _CR16_H_ */ diff -uprN gdb_src.orig/opcodes/cr16-dis.c gdb_src/opcodes/cr16-dis.c --- gdb_src.orig/opcodes/cr16-dis.c 2013-01-02 18:43:35.000000000 +0530 +++ gdb_src/opcodes/cr16-dis.c 2013-01-03 16:25:42.000000000 +0530 @@ -315,10 +315,10 @@ build_mask (void) /* Search for a matching opcode. Return 1 for success, 0 for failure. */ =20 int -match_opcode (void) +cr16_match_opcode (void) { unsigned long mask; - /* The instruction 'constant' opcode doewsn't exceed 32 bits. */ + /* The instruction 'constant' opcode doesn't exceed 32 bits. */ unsigned long doubleWord =3D (cr16_words[1] + (cr16_words[0] << 16)) & 0xffffffff; =20 @@ -743,7 +743,7 @@ print_arguments (ins *currentInsn, bfd_v /* Build the instruction's arguments. */ =20 void -make_instruction (void) +cr16_make_instruction (void) { int i; unsigned int shift; @@ -813,7 +813,7 @@ print_insn_cr16 (bfd_vma memaddr, struct /* Retrieve the encoding from current memory location. */ get_words_at_PC (memaddr, info); /* Find a matching opcode in table. */ - is_decoded =3D match_opcode (); + is_decoded =3D cr16_match_opcode (); /* If found, print the instruction's mnemonic and arguments. */ if (is_decoded > 0 && (cr16_words[0] << 16 || cr16_words[1]) !=3D 0) { @@ -825,7 +825,7 @@ print_insn_cr16 (bfd_vma memaddr, struct if (((cr16_currInsn.nargs =3D get_number_of_operands ()) !=3D 0) && ! (IS_INSN_MNEMONIC ("b"))) info->fprintf_func (info->stream, "\t"); - make_instruction (); + cr16_make_instruction (); /* For push/pop/pushrtn with RA instructions. */ if ((INST_HAS_REG_LIST) && ((cr16_words[0] >> 7) & 0x1)) cr16_currInsn.nargs +=3D1;