sim: riscv: Fix build fail since INSN_CLASS_A was removed.

Message ID 20240509005402.1137-1-nelson@rivosinc.com
State New
Headers
Series sim: riscv: Fix build fail since INSN_CLASS_A was removed. |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed

Commit Message

Nelson Chu May 9, 2024, 12:54 a.m. UTC
  Updated INSN_CLASS_A to INSN_CLASS_ZAAMO and INSN_CLASS_ZALRSC since the
former was removed and sepearted into the latter two by the commit,
c144f638337944101131d9fe6de4ab908f6d4c2d

sim/
	* riscv/sim-main.c (execute_one): Updated INSN_CLASS_A to
	INSN_CLASS_ZAAMO and INSN_CLASS_ZALRSC since the former
	was removed and sepearted into the latter two.
---
 sim/riscv/sim-main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Tom Tromey May 9, 2024, 2:11 p.m. UTC | #1
>>>>> "Nelson" == Nelson Chu <nelson@rivosinc.com> writes:

Nelson> Updated INSN_CLASS_A to INSN_CLASS_ZAAMO and INSN_CLASS_ZALRSC since the
Nelson> former was removed and sepearted into the latter two by the commit,
Nelson> c144f638337944101131d9fe6de4ab908f6d4c2d

Considering that Bernd sent the identical patch, I think this is ok.
Approved-By: Tom Tromey <tom@tromey.com>

Tom
  
Nelson Chu May 9, 2024, 2:25 p.m. UTC | #2
Thanks, I think it would be good to apply the fix from Bernd, since I'm not
the expert and regular contributor of gdb ;)

Nelson

On Thu, May 9, 2024 at 10:12 PM Tom Tromey <tom@tromey.com> wrote:

> >>>>> "Nelson" == Nelson Chu <nelson@rivosinc.com> writes:
>
> Nelson> Updated INSN_CLASS_A to INSN_CLASS_ZAAMO and INSN_CLASS_ZALRSC
> since the
> Nelson> former was removed and sepearted into the latter two by the commit,
> Nelson> c144f638337944101131d9fe6de4ab908f6d4c2d
>
> Considering that Bernd sent the identical patch, I think this is ok.
> Approved-By: Tom Tromey <tom@tromey.com>
>
> Tom
>
  
Tom Tromey May 9, 2024, 2:26 p.m. UTC | #3
>>>>> "Nelson" == Nelson Chu <nelson@rivosinc.com> writes:

Nelson> Thanks, I think it would be good to apply the fix from Bernd,
Nelson> since I'm not the expert and regular contributor of gdb ;)

Either way is fine by me.  Thanks again.

Tom
  
Bernd Edlinger May 9, 2024, 3:06 p.m. UTC | #4
On 5/9/24 16:26, Tom Tromey wrote:
>>>>>> "Nelson" == Nelson Chu <nelson@rivosinc.com> writes:
> 
> Nelson> Thanks, I think it would be good to apply the fix from Bernd,
> Nelson> since I'm not the expert and regular contributor of gdb ;)
> 
> Either way is fine by me.  Thanks again.
> 

Okay, I've pushed it now as b75187cd948

Thanks
Bernd.
  

Patch

diff --git a/sim/riscv/sim-main.c b/sim/riscv/sim-main.c
index 41973d9dd06..378e6f1dc69 100644
--- a/sim/riscv/sim-main.c
+++ b/sim/riscv/sim-main.c
@@ -1299,7 +1299,8 @@  execute_one (SIM_CPU *cpu, unsigned_word iw, const struct riscv_opcode *op)
 
   switch (op->insn_class)
     {
-    case INSN_CLASS_A:
+    case INSN_CLASS_ZAAMO:
+    case INSN_CLASS_ZALRSC:
       return execute_a (cpu, iw, op);
     case INSN_CLASS_C:
       /* Check whether model with C extension is selected.  */