public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] cpu: or1k: drop unused l.swa flag
@ 2023-12-19  2:30 Mike Frysinger
  2023-12-21  3:26 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2023-12-19  2:30 UTC (permalink / raw)
  To: binutils; +Cc: gdb-patches

The "flag" argument isn't set/used in this insn, so drop it.
This fixes an unused variable warning in the generated sim.
---
 cpu/or1korbis.cpu     | 2 +-
 sim/or1k/sem-switch.c | 1 -
 sim/or1k/sem.c        | 1 -
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/cpu/or1korbis.cpu b/cpu/or1korbis.cpu
index a8002a371858..b4ecb84ab413 100644
--- a/cpu/or1korbis.cpu
+++ b/cpu/or1korbis.cpu
@@ -717,7 +717,7 @@
      ((MACH ORBIS-MACHS))
      "l.swa ${simm16-split}($rA),$rB"
      (+ OPC_SWA rA rB simm16)
-     (sequence ((SI addr) (BI flag))
+     (sequence ((SI addr))
 	       (set addr (load-store-addr rA simm16-split 4))
 	       (set sys-sr-f (and atomic-reserve (eq addr atomic-address)))
 	       (if sys-sr-f
diff --git a/sim/or1k/sem-switch.c b/sim/or1k/sem-switch.c
index b63add8817b7..dccc65a0ec14 100644
--- a/sim/or1k/sem-switch.c
+++ b/sim/or1k/sem-switch.c
@@ -1056,7 +1056,6 @@ if (EQSI (ANDSI (tmp_addr, 268435452), CPU (h_atomic_address))) {
 
 {
   SI tmp_addr;
-  BI tmp_flag;
   tmp_addr = or1k32bf_make_load_store_addr (current_cpu, GET_H_GPR (FLD (f_r2)), EXTSISI (FLD (f_simm16_split)), 4);
   {
     USI opval = ANDBI (CPU (h_atomic_reserve), EQSI (tmp_addr, CPU (h_atomic_address)));
diff --git a/sim/or1k/sem.c b/sim/or1k/sem.c
index 95c474dc478b..973590d41154 100644
--- a/sim/or1k/sem.c
+++ b/sim/or1k/sem.c
@@ -933,7 +933,6 @@ SEM_FN_NAME (or1k32bf,l_swa) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
 
 {
   SI tmp_addr;
-  BI tmp_flag;
   tmp_addr = or1k32bf_make_load_store_addr (current_cpu, GET_H_GPR (FLD (f_r2)), EXTSISI (FLD (f_simm16_split)), 4);
   {
     USI opval = ANDBI (CPU (h_atomic_reserve), EQSI (tmp_addr, CPU (h_atomic_address)));
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] cpu: or1k: drop unused l.swa flag
  2023-12-19  2:30 [PATCH] cpu: or1k: drop unused l.swa flag Mike Frysinger
@ 2023-12-21  3:26 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2023-12-21  3:26 UTC (permalink / raw)
  To: binutils; +Cc: gdb-patches, shorne, blue, stefan.kristiansson

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

add some or1k maintainers ...
-mike

On 18 Dec 2023 21:30, Mike Frysinger wrote:
> The "flag" argument isn't set/used in this insn, so drop it.
> This fixes an unused variable warning in the generated sim.
> ---
>  cpu/or1korbis.cpu     | 2 +-
>  sim/or1k/sem-switch.c | 1 -
>  sim/or1k/sem.c        | 1 -
>  3 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/cpu/or1korbis.cpu b/cpu/or1korbis.cpu
> index a8002a371858..b4ecb84ab413 100644
> --- a/cpu/or1korbis.cpu
> +++ b/cpu/or1korbis.cpu
> @@ -717,7 +717,7 @@
>       ((MACH ORBIS-MACHS))
>       "l.swa ${simm16-split}($rA),$rB"
>       (+ OPC_SWA rA rB simm16)
> -     (sequence ((SI addr) (BI flag))
> +     (sequence ((SI addr))
>  	       (set addr (load-store-addr rA simm16-split 4))
>  	       (set sys-sr-f (and atomic-reserve (eq addr atomic-address)))
>  	       (if sys-sr-f
> diff --git a/sim/or1k/sem-switch.c b/sim/or1k/sem-switch.c
> index b63add8817b7..dccc65a0ec14 100644
> --- a/sim/or1k/sem-switch.c
> +++ b/sim/or1k/sem-switch.c
> @@ -1056,7 +1056,6 @@ if (EQSI (ANDSI (tmp_addr, 268435452), CPU (h_atomic_address))) {
>  
>  {
>    SI tmp_addr;
> -  BI tmp_flag;
>    tmp_addr = or1k32bf_make_load_store_addr (current_cpu, GET_H_GPR (FLD (f_r2)), EXTSISI (FLD (f_simm16_split)), 4);
>    {
>      USI opval = ANDBI (CPU (h_atomic_reserve), EQSI (tmp_addr, CPU (h_atomic_address)));
> diff --git a/sim/or1k/sem.c b/sim/or1k/sem.c
> index 95c474dc478b..973590d41154 100644
> --- a/sim/or1k/sem.c
> +++ b/sim/or1k/sem.c
> @@ -933,7 +933,6 @@ SEM_FN_NAME (or1k32bf,l_swa) (SIM_CPU *current_cpu, SEM_ARG sem_arg)
>  
>  {
>    SI tmp_addr;
> -  BI tmp_flag;
>    tmp_addr = or1k32bf_make_load_store_addr (current_cpu, GET_H_GPR (FLD (f_r2)), EXTSISI (FLD (f_simm16_split)), 4);
>    {
>      USI opval = ANDBI (CPU (h_atomic_reserve), EQSI (tmp_addr, CPU (h_atomic_address)));
> -- 
> 2.43.0
> 

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-21  3:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-19  2:30 [PATCH] cpu: or1k: drop unused l.swa flag Mike Frysinger
2023-12-21  3:26 ` Mike Frysinger

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).