From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112641 invoked by alias); 24 Dec 2015 07:35:58 -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 112630 invoked by uid 89); 24 Dec 2015 07:35:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Less, sqrt, mathh, UD:math.h 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, 24 Dec 2015 07:35:55 +0000 Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id B4B2F33BE05; Thu, 24 Dec 2015 07:35:53 +0000 (UTC) Date: Thu, 24 Dec 2015 07:35:00 -0000 From: Mike Frysinger To: Yoshinori Sato Cc: gdb-patches@sourceware.org Subject: Re: [PATCH][RX] v2 instructions support Message-ID: <20151224073552.GH25803@vapier.lan> Mail-Followup-To: Yoshinori Sato , gdb-patches@sourceware.org References: <1450719297-15073-1-git-send-email-ysato@users.sourceforge.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Rgf3q3z9SdmXC6oT" Content-Disposition: inline In-Reply-To: <1450719297-15073-1-git-send-email-ysato@users.sourceforge.jp> X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg00471.txt.bz2 --Rgf3q3z9SdmXC6oT Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1635 On 22 Dec 2015 02:34, Yoshinori Sato wrote: > --- a/sim/rx/fpu.c > +++ b/sim/rx/fpu.c >=20=20 > +double sqrt(double x); never declare your own prototype for system funcs. include math.h instead. > +static FP_ExceptionCases ex_sqrt_tab[5][5] =3D { please constify this. you might have to update check_exceptions too. > + tprintf("sqrt(%g) =3D %g\n", da, sqrt(da)); space before the (. this comes up a few times in your patch, so please fix them all. > + /* Less than 0.49999 */ period at the end and two spaces: /* Less than 0.49999. */ this comes up a few times in your patch, so please fix them all. > + if (rx_big_endian) > + { > + put_be (buf, 8, acc.lo); > + } > + else > + { > + put_le (buf, 8, acc.lo); > + } no need for braces here > + for(i =3D 0; i < 2; i++) space before the ( > { > - if (tag) { printf (tag); tag =3D 0; } > - printf(" acc %016llx:", oldregs.r_acc); > - printf("%016llx", regs.r_acc); > - oldregs.r_acc =3D regs.r_acc; > + if (oldregs.r_acc[i].hi !=3D regs.r_acc[i].hi || > + oldregs.r_acc[i].lo !=3D regs.r_acc[i].lo) > + { > + if (tag) { printf (tag); tag =3D 0; } > + printf(" acc%d %08x%016lx:", i, oldregs.r_acc[i].hi, > + oldregs.r_acc[i].lo); > + printf("%08x%016lx", regs.r_acc[i].hi, > + oldregs.r_acc[i].lo); > + oldregs.r_acc[i] =3D regs.r_acc[i]; > + } i know you aren't writing this code, but please fix the style in the proces= s. > +#define MULADD(val, s) \ the trailing \ style in these macros is inconsistent. if you don't want to align them to 80 cols, then just put one space before them. -mike --Rgf3q3z9SdmXC6oT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWe6BYAAoJEEFjO5/oN/WBKRwP/RucF4cYC8zT+CBYfDPDMeHE NnUQPKecQC53OdfWGNM176uA9yVyfocfAZWyFO+TVf79BrbloTibk2xbexkKwKU3 fSUCIAPLWZ8pVUqK/HHO59bgd7LEDij0bYyhJxiFiwX3UhXA0L+Vat+K64irEMkl Anom8b6jJzCca1v6k0QcRjW7pp4to2mGZXS7qPBnmdV2DTvGrbGEdW0ViObk9ykg n7w21goEOqCRhJ728KukgC9eH774Ge4M4Q7mprTZoDOhtQlgVADQtObgCmi3w4Vv 4S103cEW/x0IbfFRdln+D9tbiPobYpKs01abS9NKx9HnkBzI+RZXcEFX5u4UFwSf q/6Jvp/X0z8OSmuXvQfqVL9/IADf607ivAVXOBB12361bw5QM3SgkgaBVU5/U4MV MKqxgKLQbBTCHtQqvNx5BQU6dObJUxleIWcNFeLMhFP74ScuIQTb1EUJj1eURLsj gEp9oJlwRrU7XCUcstnYA1Majl9z8Fr5BdoiwVh9tDXJ0zOgLoBJk87S4zIrUEtY 8ljdjuTuxDPsGjGWfZuTRFWRkbBodUnKMghGrI2Sa64GADgRq4uw115wl69fqBKb r3NYjyHi9jEFxfT/KTp5Y66pgWASN6Z0WfwUM4VBGIbO6qfmNgP7mtkLQ8eLUV3k nJU+BWT4Lb04CwjEf556 =L/rK -----END PGP SIGNATURE----- --Rgf3q3z9SdmXC6oT--