]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: riscv: Fix build issue due to recent binutils commit
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 9 May 2024 05:58:08 +0000 (07:58 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 9 May 2024 15:04:14 +0000 (17:04 +0200)
The commit c144f6383379 removed INSN_CLASS_A and
added INSN_CLASS_ZAAMO and INSN_CLASS_ZALRSC instead,
which broke the build of the sim for riscv targets.

Fix that by using the new INSN_CLASS types.

Fixes: c144f6383379 ("RISC-V: Support B, Zaamo and Zalrsc extensions.")
Approved-By: Tom Tromey <tom@tromey.com>
sim/riscv/sim-main.c

index 41973d9dd06ec233cdb03785a2d231c73ef3580b..378e6f1dc69850e5b1ccbc9d2fc5b0b8f6935385 100644 (file)
@@ -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.  */