[PATCH/committed,12/20] sim: mcore: fix Wimplicit-fallthrough warnings

Message ID 20231221070127.19142-12-vapier@gentoo.org
State New
Headers
Series [PATCH/committed,01/20] sim: signal: mark signal callback funcs as noreturn since they don't return |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply

Commit Message

Mike Frysinger Dec. 21, 2023, 7:01 a.m. UTC
  Seems like these decodes were intended to fallthru.
---
 sim/mcore/interp.c | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c
index b0c2cc2b3177..d24af0d94720 100644
--- a/sim/mcore/interp.c
+++ b/sim/mcore/interp.c
@@ -1105,6 +1105,7 @@  step_once (SIM_DESC sd, SIM_CPU *cpu)
 	    fprintf (stderr,
 		     "func call: r2 = %x r3 = %x r4 = %x r5 = %x r6 = %x r7 = %x\n",
 		     gr[2], gr[3], gr[4], gr[5], gr[6], gr[7]);
+	  ATTRIBUTE_FALLTHROUGH;
 	case 0x70:					/* jmpi */
 	  pc = rlat ((pc + ((inst & 0xFF) << 2)) & 0xFFFFFFFC);
 	  memops++;
@@ -1192,6 +1193,7 @@  step_once (SIM_DESC sd, SIM_CPU *cpu)
 	case 0xF8: case 0xF9: case 0xFA: case 0xFB:
 	case 0xFC: case 0xFD: case 0xFE: case 0xFF:	/* bsr */
 	  gr[15] = pc;
+	  ATTRIBUTE_FALLTHROUGH;
 	case 0xF0: case 0xF1: case 0xF2: case 0xF3:
 	case 0xF4: case 0xF5: case 0xF6: case 0xF7:	/* br */
 	  {