public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] sim: Add nanoMIPS port
Date: Wed, 4 May 2022 08:45:29 -0400	[thread overview]
Message-ID: <YnJ1adUF6jmVWOp3@vapier> (raw)
In-Reply-To: <20220429155813.388328-3-aleksandar.rikalo@syrmia.com>

[-- Attachment #1: Type: text/plain, Size: 3474 bytes --]

On 29 Apr 2022 17:58, Aleksandar Rikalo wrote:
> Co-Authored-By: Jaydeep Patil <jaydeep.patil@imgtec.com>
> Co-Authored-By: Matthew Fortune <matthew.fortune@imgtec.com>
> Co-Authored-By: Maciej W. Rozycki <macro@mips.com>
> Co-Authored-By: Stefan Markovic <stefan.markovic@mips.com>
> Co-Authored-By: Sara Graovac <sara.graovac@syrmia.com>
> Co-Authored-By: Dragan Mladjenovic <dragan.mladjenovic@syrmia.com>

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 = itable.h
>  
>  ## COMMON_POST_CONFIG_FRAG
>  
> +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_DEPS)
> +
> +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=mipsisa64r2
>  			;;
> +  nanomips*-*-elf*)
> +			sim_gen=MULTI
> +			sim_multi_configs="\
> +			  nanor6sim:nanomips64r6,nanomipsdsp:32,64,f:nanomipsisa64r6,nanomipsisa32r6"
> +			sim_multi_default=nanomipsisa64r6
> +			;;

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
>  
> +int is_nanomips = 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 = vaddr;
> +  address_word paddr;
> +  int uncached;
>  
>    if ((vaddr & 3) != 0)
>      SignalExceptionAddressStore ();
>    else
>      {
> -      const uword64 mask = 7;
> -      uword64 memval;
> -      unsigned int byte;
> -
> -      paddr = (paddr & ~mask) | ((paddr & mask) ^ (ReverseEndian << 2));
> -      byte = (vaddr & mask) ^ (BigEndianCPU << 2);
> -      memval = ((uword64) val) << (8 * byte);
> -      StoreMemory (AccessLength_WORD, memval, 0, paddr, vaddr,
> -		   isREAL);
> +      if (AddressTranslation (vaddr, isDATA, isSTORE, &paddr, &uncached,
> +			      isTARGET, isREAL))
> +	{
> +	  const uword64 mask = 7;
> +	  uword64 memval;
> +	  unsigned int byte;
> +
> +	  paddr = (paddr & ~mask) | ((paddr & mask) ^ (ReverseEndian << 2));
> +	  byte = (vaddr & mask) ^ (BigEndianCPU << 2);
> +	  memval = ((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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-05-04 12:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220429155813.388328-1-aleksandar.rikalo@syrmia.com>
2022-04-29 15:58 ` [PATCH 1/3] bfd: Add support for nanoMIPS architecture Aleksandar Rikalo
2022-05-01 22:56   ` Maciej W. Rozycki
2022-04-29 15:58 ` [PATCH 2/3] sim: Add nanoMIPS port Aleksandar Rikalo
2022-05-04 12:45   ` Mike Frysinger [this message]
2022-11-21 11:06   ` [PATCH v3 1/2] " Aleksandar Rikalo
2022-11-21 11:06     ` [PATCH v3 2/2] gdb: " Aleksandar Rikalo
2022-12-12  9:42       ` Mike Frysinger
2022-12-12  9:45       ` Mike Frysinger
2022-11-25 12:11     ` [PATCH v3 1/2] sim: " Mike Frysinger
2022-11-25 15:36       ` Aleksandar Rikalo
2022-12-12 11:11         ` Mike Frysinger
2022-04-29 15:58 ` [PATCH 3/3] gdb: " Aleksandar Rikalo
2022-04-29 16:15   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YnJ1adUF6jmVWOp3@vapier \
    --to=vapier@gentoo.org \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).