From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29212 invoked by alias); 26 Apr 2012 18:37:47 -0000 Received: (qmail 29154 invoked by uid 22791); 26 Apr 2012 18:37:46 -0000 X-SWARE-Spam-Status: No, hits=-5.5 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 Apr 2012 18:37:22 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3QIbIn9010494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 26 Apr 2012 14:37:18 -0400 Received: from host2.jankratochvil.net (ovpn-116-17.ams2.redhat.com [10.36.116.17]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3QIbEU8028098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 26 Apr 2012 14:37:16 -0400 Date: Thu, 26 Apr 2012 18:38:00 -0000 From: Jan Kratochvil To: "Maciej W. Rozycki" Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] microMIPS support Message-ID: <20120426183713.GA21029@host2.jankratochvil.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-04/txt/msg00949.txt.bz2 Hello Maciej, sure I have seen no MIPS arch bugs... On Tue, 24 Apr 2012 22:29:01 +0200, Maciej W. Rozycki wrote: [...] > +/* For backwards compatibility we default to MIPS16. This flag is > + overridden as soon as unambiguous ELF file flags tell us the > + compressed ISA encoding used. */ > +static const char mips_compression_mips16[] = "mips16"; > +static const char mips_compression_micromips[] = "micromips"; > +static const char *mips_compression_strings[] = { nitpick, be more readonly: static const char *const mips_compression_strings[] = { > + mips_compression_mips16, > + mips_compression_micromips, > + NULL > +}; [...] > +/* Return one iff MSYM refers to standard ISA code. */ > + > static int > -msymbol_is_special (struct minimal_symbol *msym) > +msymbol_is_mips (struct minimal_symbol *msym) > +{ > + return !(MSYMBOL_TARGET_FLAG_1 (msym) | MSYMBOL_TARGET_FLAG_2 (msym)); (a) | -> || (b) I have found here it is best to expand logical expressions for the patch readers, despite author may see it more logical with the parentheses. return !MSYMBOL_TARGET_FLAG_1 (msym) && !MSYMBOL_TARGET_FLAG_2 (msym); > +} [...] > @@ -686,8 +779,8 @@ mips_ax_pseudo_register_push_stack (stru > return 0; > } > > -/* Table to translate MIPS16 register field to actual register number. */ > -static int mips16_to_32_reg[8] = { 16, 17, 2, 3, 4, 5, 6, 7 }; > +/* Table to translate 3-bit register field to actual register number. */ > +static int mips_reg3_to_reg[8] = { 16, 17, 2, 3, 4, 5, 6, 7 }; It can be const. Thanks, Jan