From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15773 invoked by alias); 19 Apr 2015 06:54:35 -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 15761 invoked by uid 89); 19 Apr 2015 06:54:33 -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,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; Sun, 19 Apr 2015 06:54:32 +0000 Received: from vapier (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id 5C5F1340DFF; Sun, 19 Apr 2015 06:54:30 +0000 (UTC) Date: Sun, 19 Apr 2015 06:54:00 -0000 From: Mike Frysinger To: Jiri Gaisler Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v5 5/9] sim/erc32: Add support for LEON3 processor emulation. Message-ID: <20150419065429.GE17952@vapier> Mail-Followup-To: Jiri Gaisler , gdb-patches@sourceware.org References: <1428093356-7296-1-git-send-email-jiri@gaisler.se> <1428093356-7296-6-git-send-email-jiri@gaisler.se> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dFWYt1i2NyOo1oI9" Content-Disposition: inline In-Reply-To: <1428093356-7296-6-git-send-email-jiri@gaisler.se> X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00721.txt.bz2 --dFWYt1i2NyOo1oI9 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 3434 On 03 Apr 2015 22:35, Jiri Gaisler wrote: > --- /dev/null > +++ b/sim/erc32/README.leon3 > > +The following registers are implemeted: "implemented" might want to run a spell checker over the whole file +Cypress C601 and C602. The simulator is cycle true, i.e a simulator time = is "cycle accurate" ? > --- a/sim/erc32/erc32.c > +++ b/sim/erc32/erc32.c > > +memory_read_asi (int32 asi, uint32 addr, uint32 *data, int32 sz, int32 *= ws) > +{ > + return memory_read (addr, data, sz, ws); correct indentation level is 2 spaces here > +static int > +memory_write_asi (int32 asi, uint32 addr, uint32 *data, int32 sz, int32 = *ws) > +{ > + return memory_write (addr, data, sz, ws); 2 spaces > + if (length =3D=3D 4) { > + memory_read (addr, &w4, length, &ws); > + memcpy(data, &w4, length); can you scan your patches and make sure you're using space before the ( > + else if ( 17 =3D=3D rd ) { > + if (sparclite) > + sregs->asr17 =3D (rs1 ^ operand2); > + } > + else if ( 19 =3D=3D rd ) { drop the spaces with these if statements: else if (17 =3D=3D rd) { > +/* Vendors */ please scan all the new code to make sure the comment style is GNU > --- a/sim/erc32/sis.h > +++ b/sim/erc32/sis.h > @@ -154,6 +154,29 @@ struct irqcell { > int32 arg; > }; >=20=20 > +struct memsys { > + void (*init_sim) (void); > + void (*reset) (void); > + void (*error_mode) (uint32 pc); > + void (*sim_halt) (void); > + void (*exit_sim) (void); > + void (*init_stdio) (void); > + void (*restore_stdio) (void); > + int (*memory_iread) (uint32 addr, uint32 *data, int32 *ws); > + int (*memory_read) (uint32 addr, uint32 *data, > + int32 sz, int32 *ws); > + int (*memory_read_asi) (int32 asi, uint32 addr, uint32 *data, > + int32 sz, int32 *ws); > + int (*memory_write) (uint32 addr, uint32 *data, > + int32 sz, int32 *ws); > + int (*memory_write_asi) (int32 asi, uint32 addr, uint32 *dat= a, > + int32 sz, int32 *ws); > + int (*sis_memory_write) (uint32 addr, > + const unsigned char *data, uint32 length); > + int (*sis_memory_read) (uint32 addr, char *data, > + uint32 length); > + void (*boot_init) (void); > +}; >=20=20 > #define OK 0 > #define TIME_OUT 1 > @@ -235,23 +260,7 @@ extern void set_fsr (uint32 fsr); > extern void usage (void); > extern void gen_help (void); >=20=20 > -struct memsys { > - void (*init_sim) (void); > - void (*reset) (void); > - void (*error_mode) (uint32 pc); > - void (*sim_halt) (void); > - void (*exit_sim) (void); > - void (*init_stdio) (void); > - void (*restore_stdio) (void); > - int (*memory_iread) (uint32 addr, uint32 *data, int32 *ws); > - int (*memory_read) (int32 asi, uint32 addr, uint32 *data, > - int32 sz, int32 *ws); > - int (*memory_write) (int32 asi, uint32 addr, uint32 *data, > - int32 sz, int32 *ws); > - int (*sis_memory_write) (uint32 addr, > - const unsigned char *data, uint32 length); > - int (*sis_memory_read) (uint32 addr, char *data, > - uint32 length); > -}; you just added this struct in a previous patch. if it wasn't in the right= =20 place, then please squash this move into that patch instead. -mike --dFWYt1i2NyOo1oI9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVM1EkAAoJEEFjO5/oN/WBC/wQALGp5AlqKn3e3QRMcxp+xxTt E/y7Bygi87PXFRwKKrCAAYxgj1Dz3sEgRbVhTRsy2Fo7VrEkuYBjY2sprkPyZVfD 6V5S+DC/fBeIC5+V+7TPOC14WVmPTuUT6DN1aTwRVJQUwd2I6vyLDVAmiJeoFATj KaNIhSDxAv898BJL1Ym+idfnCwkL+kobSuPn0GtW7CqY3APiwZ/Jj2mFmC7eiX3A m/tVSHJuWZ9A6c5ajoEb2tLboY+zLBT/KF7+0IqoqydwZjp9mVZNJTEZNTZ4dTwr WCnO3EFzswc7tYMLUt7TM4pi6TmMwXlhgxgPYrB2OVi4W+ajIvPIHlq//F5gUvbb YqhfT+8dSRM7PoyqJBEqNMApxlF8bjLQJU7wGCjqgCy9l1FvzSFeP6nS0ErIQFaz dqBgq3uw5mHV6C+ElUujd9QguyfHeQ1h5jTa9dk/MKxVeKpHX4Aae7+13BwzDn0w FpCq7O1cLDHA7DUQse69Wl5BKFCaoZCleWTSZkX0Yr7ezaC6lCvNdZzLwuM4DuaL sCzZwETcbofUQVjqEWgKx0NjBKU7U466fs1kq2H+tEa7Wpw/jtqFxfPjYhAYbM91 c7XPgsznYbxK13IAqjoSKF+8BtCiRPahFYZAXRnCfV1j+GFuoAXXP9iBMiUT6bm7 SU46z4zaZlygNlrluUaD =W6DW -----END PGP SIGNATURE----- --dFWYt1i2NyOo1oI9--