public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hp@axis.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: <binutils@sourceware.org>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH] cpu: cris: drop some unused vars
Date: Tue, 19 Dec 2023 04:09:04 +0100	[thread overview]
Message-ID: <20231219030904.BBDFD20425@pchp3.se.axis.com> (raw)
In-Reply-To: <20231219024423.25287-1-vapier@gentoo.org> (message from Mike Frysinger on Mon, 18 Dec 2023 21:44:23 -0500)

> From: Mike Frysinger <vapier@gentoo.org>
> Date: Mon, 18 Dec 2023 21:44:23 -0500

> These fix unused variable warnings in the generated sim.
> ---
>  cpu/cris.cpu                  | 4 ++--
>  sim/cris/semcrisv10f-switch.c | 2 --
>  sim/cris/semcrisv32f-switch.c | 2 --
>  3 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/cpu/cris.cpu b/cpu/cris.cpu
> index 97b44581e78b..2e8cb352b2b9 100644
> --- a/cpu/cris.cpu
> +++ b/cpu/cris.cpu
> @@ -2598,7 +2598,7 @@
>       "move ${Ps},${Rd-sfield}"
>       (+ Ps RFIX_MOVE_S_R MODE_REGISTER SIZE_FIXED Rd-sfield)
>       (sequence
> -       ((SI grno) (SI prno) (SI newval))
> +       ((SI prno) (SI newval))
>         (set prno (regno Ps))
>         ; CGEN-FIXME: Can't use the following and then "grno" below because
>         ; CGEN will emit a "tmp_grno" *also* in decodev32.c:crisv32f_decode

'k, but can you please "move" the removed declaration to the
comment?

Something like '; CGEN-FIXME: Can't declare (SI grno) and
then the following and then use "grno" below because'.  Else
it'll look even more odd with there being no "grno" at all.

If it's not obvious: IIRC, this refers to "(regno
Rd-sfield)" which would be more readable "decoded" as
"grno".  ...well, relatively more readable.

> @@ -3837,7 +3837,7 @@
>   "$Rs,$Rd"
>   (+ Rd MODE_REGISTER RFIX_BTST SIZE_FIXED Rs)
>   (sequence
> -   ((SI tmpd) (SI cnt))
> +   ((SI tmpd))

Either that, or add "(set cnt (sub 31 (and Rs 31))" with the
next line replaced by "(set tmpd (sll Rd cnt))".  At your
discretion.

No need to repost if you optionally fix those, commit at
your leisure.  Thanks!

brgds, H-P

  reply	other threads:[~2023-12-19  3:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19  2:44 Mike Frysinger
2023-12-19  3:09 ` Hans-Peter Nilsson [this message]
2023-12-19 10:45   ` Mike Frysinger

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=20231219030904.BBDFD20425@pchp3.se.axis.com \
    --to=hp@axis.com \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --cc=vapier@gentoo.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).