From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id B5FF9385626D for ; Wed, 4 May 2022 12:45:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B5FF9385626D Received: by smtp.gentoo.org (Postfix, from userid 559) id 77FC734193A; Wed, 4 May 2022 12:45:01 +0000 (UTC) Date: Wed, 4 May 2022 08:45:29 -0400 From: Mike Frysinger To: Aleksandar Rikalo Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/3] sim: Add nanoMIPS port Message-ID: Mail-Followup-To: Aleksandar Rikalo , gdb-patches@sourceware.org References: <20220429155813.388328-1-aleksandar.rikalo@syrmia.com> <20220429155813.388328-3-aleksandar.rikalo@syrmia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eXdLO9RwWJqZuY5M" Content-Disposition: inline In-Reply-To: <20220429155813.388328-3-aleksandar.rikalo@syrmia.com> X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2022 12:45:07 -0000 --eXdLO9RwWJqZuY5M Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 29 Apr 2022 17:58, Aleksandar Rikalo wrote: > Co-Authored-By: Jaydeep Patil > Co-Authored-By: Matthew Fortune > Co-Authored-By: Maciej W. Rozycki > Co-Authored-By: Stefan Markovic > Co-Authored-By: Sara Graovac > Co-Authored-By: Dragan Mladjenovic is everyone's copyright papers in place ? > --- a/sim/configure > +++ b/sim/configure you seem to be missing the change to the source of this file. this is generated, so you shouldn't be editing this. > --- a/sim/common/sim-bits.h > +++ b/sim/common/sim-bits.h looks fine > --- a/sim/mips/Makefile.in > +++ b/sim/mips/Makefile.in > @@ -79,6 +80,20 @@ SIM_EXTRA_DEPS =3D itable.h > =20 > ## COMMON_POST_CONFIG_FRAG > =20 > +interp.o: $(srcdir)/interp.c sim-main.h itable.h > + > +m16run.o: sim-main.h m16_idecode.h m32_idecode.h m16run.c $(SIM_EXTRA_DE= PS) > + > +micromipsrun.o: sim-main.h micromips16_idecode.h micromips32_idecode.h \ > + micromips_m32_idecode.h micromipsrun.c $(SIM_EXTRA_DEPS) > + > +nms.o: $(srcdir)/nms.c $(srcdir)/sim-main.h > + > +multi-run.o: multi-include.h tmp-mach-multi > + > +../igen/igen: > + cd ../igen && $(MAKE) we deleted all this stuff. don't add it back. > --- a/sim/mips/configure.ac > +++ b/sim/mips/configure.ac > @@ -106,6 +106,12 @@ case "${target}" in > mipsisa64r6:mips64r6:32,64,f:mipsisa32r6,mipsisa64r6" > sim_multi_default=3Dmipsisa64r2 > ;; > + nanomips*-*-elf*) > + sim_gen=3DMULTI > + sim_multi_configs=3D"\ > + nanor6sim:nanomips64r6,nanomipsdsp:32,64,f:nanomipsisa64r6,nanomips= isa32r6" > + sim_multi_default=3Dnanomipsisa64r6 > + ;; seems odd that you're using a new "nanomips*" tuple instead of existing "mips*" space. but i guess if you've convinced everyone else that this isn't wrong, then sim/ will just follow. > --- a/sim/mips/interp.c > +++ b/sim/mips/interp.c > =20 > +int is_nanomips =3D 0; do not declare globals. state goes in sim_cpu. > @@ -1531,21 +1535,26 @@ store_word (SIM_DESC sd, > uword64 vaddr, > signed_word val) > { > - address_word paddr =3D vaddr; > + address_word paddr; > + int uncached; > =20 > if ((vaddr & 3) !=3D 0) > SignalExceptionAddressStore (); > else > { > - const uword64 mask =3D 7; > - uword64 memval; > - unsigned int byte; > - > - paddr =3D (paddr & ~mask) | ((paddr & mask) ^ (ReverseEndian << 2)= ); > - byte =3D (vaddr & mask) ^ (BigEndianCPU << 2); > - memval =3D ((uword64) val) << (8 * byte); > - StoreMemory (AccessLength_WORD, memval, 0, paddr, vaddr, > - isREAL); > + if (AddressTranslation (vaddr, isDATA, isSTORE, &paddr, &uncached, > + isTARGET, isREAL)) > + { > + const uword64 mask =3D 7; > + uword64 memval; > + unsigned int byte; > + > + paddr =3D (paddr & ~mask) | ((paddr & mask) ^ (ReverseEndian << 2)); > + byte =3D (vaddr & mask) ^ (BigEndianCPU << 2); > + memval =3D ((uword64) val) << (8 * byte); > + StoreMemory (uncached, AccessLength_WORD, memval, 0, paddr, vaddr, > + isREAL); > + } you seem to be reverting changes in mips/ that we made a while ago with no explanation. i'm giving up on reviewing at this point. you need to update your port to the current state of the world, not roll it back to code from 7 years ago. -mike --eXdLO9RwWJqZuY5M Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmJydWQACgkQQWM7n+g3 9YGacg//dpHIWoLbxjwGkhsflgrcHKNoG8I6PhnhZc9muEJaP5pysGI+eAB79glZ QjLWyuAINHY5GeTEVALP8afR5tejeVdOPwpml9b8YTvqCMZdWt/O0ZBdsWQA7t7z nlws+1V4gDsi4D3tNY8d909fi0HgQumwIeO6dLbv6pX5fT+NaI+EDJvMpA601E97 39xfBxEwWuXdmedOq5v5/hPfYUV3XmsTFdDnmzB7C/pEkyrTlQYKrY5zuVX56RMQ 7XNaMwSvLtFJRM605Poz/eMwXbVU4sd9MXjgvphwb5F7mGuWiJdsnpFI5hldZBYa 85SyV0qbm2k4q77qRp6/zgwAH2CORH7R3yjN0xb+osYKpTIrHtVTdwufCYgNHohP eMtY2cTzrOomMiYiVjNDsMsGlAtWOlMHGrASgwJ8Zn9gEZ2z6hoi/vXANy/heOoC 3FMf664EBqcF7Ac7zvJiCAsndIiuLjldRZ9Dx598fia+Op/W/Oa5QaXKsAR9/dXm 63Kki6RsvWohVatOEzV15vKrVzEZxjDQx5QZek7eQnnkvkdHdtCTe3bQ4vyHCpuA FZtKhSIopU93foeUu/SBcS7jd2fFi2jE3JLsS2xzVDAU0tNbwB0achTM/uf1IdX1 qTE+oKEvHfjJFGczPSFMJHXrgghXoRzc8bMMvQT95k9UIcCJpCE= =7upg -----END PGP SIGNATURE----- --eXdLO9RwWJqZuY5M--