From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7404 invoked by alias); 5 Mar 2015 17:35:25 -0000 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 Received: (qmail 7391 invoked by uid 89); 5 Mar 2015 17:35:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 05 Mar 2015 17:35:24 +0000 Received: from vapier (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id DC4E234072E; Thu, 5 Mar 2015 17:35:21 +0000 (UTC) Date: Thu, 05 Mar 2015 17:35:00 -0000 From: Mike Frysinger To: Jiri Gaisler Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v3 10/14] sim/erc32: Add support for LEON3 processor emulation. Message-ID: <20150305173521.GB6730@vapier> Mail-Followup-To: Jiri Gaisler , gdb-patches@sourceware.org References: <1425244244-27709-1-git-send-email-jiri@gaisler.se> <1425244244-27709-11-git-send-email-jiri@gaisler.se> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="R3G7APHDIzY6R/pk" Content-Disposition: inline In-Reply-To: <1425244244-27709-11-git-send-email-jiri@gaisler.se> X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00159.txt.bz2 --R3G7APHDIzY6R/pk Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-length: 682 On 01 Mar 2015 22:10, Jiri Gaisler wrote: > + if (sregs.psr & 0x080) asi = 11; else asi = 10; please unwrap all the new if statements although in cases like this you could just use the tertiary operator: asi = (sregs.psr & 0x080) ? 11 : 10; > + return(memory_read(addr, data, sz, ws)); return isn't a func, so it shouldn't be written like one: return memory_read(...); applies to multiple places in this patch. > +static uint32 apbppmem[32*2]; /* 32-entry APB PP AREA */ space around the * op. applies to multiple places in this patch. > +static void > +error_mode(pc) > + uint32 pc; > +{ when writing new functions, avoid old func styles -mike --R3G7APHDIzY6R/pk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJU+JPZAAoJEEFjO5/oN/WBLPgP/j543ubNPP/kT9LXbPLhsw64 UHt90YpxpV678Xli088QyT+3K0zuklug+WbgEZKOAYE+vmojkbe3afxZsjP/F1xl 4lkqxg8GBu0IQz61uhyZulkf3LaBa3nc/qxSSrhuGoBN6SaY8zlp2t1jne94kv1o d/WcGCmoPshpK2t1Ppxrv7IBZB8E5j259iG43Pbmxpt6yP283q3x7ALBXvV0p6DQ gv734ga4RbqeLEYyphS9V7Y/UkC9Qc4L/OqbRe3RLpYVi3pipqQywEYVmvQKC7ES 9PYyHxQrJDrPmEOocu9GF3qh+YQSS9TCXpB0j/IslrYIxPaqewnMWpWWH13lo162 80cgXTrEREgkhTC0vAcAQ2yP+jMJL7XjqxeRPqVNs9vpKg7Q5aWUF/j83pFede6y YIbTBNBx00r5NODUVkhEcYV4QXnzjYV/8P3pNvY3aQ3QWxAeOxgAmT4IUuRpl6UB heac++5Ssfk1m/8B9V0ngfIueewepsMDY1RhHOARSu9oXqF/zT2gbNf64XdpW8Yx b4ucki+qZjPA4rm/3rSuUWI1PzijixmiPxMiOcZdOpqmtydtUpct+KzXHN0BqDqD l1q3MCbTdWlRIHx9aY9MNl4xzoZGtXY8JkJgQdYC1RXoZ7zi4+b9V3IKWoDarxAe l+mCWfa9K1YBx3vQSoKZ =wzh+ -----END PGP SIGNATURE----- --R3G7APHDIzY6R/pk--