Mike Frysinger
3a4ee62868
sim: warnings: enable -Wimplicit-fallthrough=5
...
It caught some legitimate bugs, so clearly it's helpful.
2023-12-21 01:59:23 -05:00
Mike Frysinger
849bdf4ead
sim: sh: fix -Wimplicit-fallthrough warnings
...
These generate conditional insns where it tests, then fallsthru.
2023-12-21 01:59:23 -05:00
Mike Frysinger
85433eb331
sim: rx: fix -Wimplicit-fallthrough warnings
...
Replace some fall through comments with the attribute.
2023-12-21 01:59:23 -05:00
Mike Frysinger
e8aaac5fe6
sim: rl78: fix -Wimplicit-fallthrough warnings
...
Seems like this code was meant to fallthru.
2023-12-21 01:59:23 -05:00
Mike Frysinger
05b9feffff
sim: riscv: fix -Wimplicit-fallthrough warnings
2023-12-21 01:59:23 -05:00
Mike Frysinger
92a9d946da
sim: ppc: fix -Wimplicit-fallthrough warnings
...
Replace some fall through comments with the attribute.
2023-12-21 01:59:23 -05:00
Mike Frysinger
77b3c4f666
sim: or1k: fix -Wimplicit-fallthrough warnings
...
Replace some fall through comments with the attribute.
2023-12-21 01:59:23 -05:00
Mike Frysinger
28c06ff1a1
sim: mips: fix -Wimplicit-fallthrough warnings
...
Seems like these cases were meant to fallthru.
2023-12-21 01:59:23 -05:00
Mike Frysinger
80200ef6b4
sim: mcore: fix Wimplicit-fallthrough warnings
...
Seems like these decodes were intended to fallthru.
2023-12-21 01:59:23 -05:00
Mike Frysinger
452bfb00b5
sim: m68hc11: fix -Wimplicit-fallthrough warnings
...
Seems like these register operations intended on falling thru.
2023-12-21 01:59:22 -05:00
Mike Frysinger
aab7152186
sim: frv: fix -Wimplicit-fallthrough warnings
...
Replace some fall through comments with the attribute.
2023-12-21 01:59:22 -05:00
Mike Frysinger
fcad8e6ba7
sim: erc32: fix -Wimplicit-fallthrough warnings
...
Add the attribute where it seems to make sense.
2023-12-21 01:59:22 -05:00
Mike Frysinger
b356d0c5a0
sim: cris: fix -Wimplicit-fallthrough warnings
...
Replace some fall through comments with the attribute.
2023-12-21 01:59:22 -05:00
Mike Frysinger
f0e2dc75ce
sim: bfin: fix -Wimplicit-fallthrough warnings
...
Add the attribute to places where we want to fall thru.
2023-12-21 01:59:22 -05:00
Mike Frysinger
639bab3ca6
sim: avr: fix -Wimplicit-fallthrough warnings
...
Replace some fall through comments with the attribute.
2023-12-21 01:59:22 -05:00
Mike Frysinger
beb9aecf12
sim: arm: fix -Wimplicit-fallthrough warnings
...
Replace some fall through comments with the attribute.
2023-12-21 01:59:22 -05:00
Mike Frysinger
5e6951299a
sim: aarch64: fix -Wimplicit-fallthrough warnings
...
Replace some fall through comments with the attribute, and add some
default abort calls when the compiler can't figure out that the set
of values were already fully enumerated in the switch statement.
2023-12-21 01:59:22 -05:00
Mike Frysinger
9362022e95
sim: common: fix -Wimplicit-fallthrough warnings
...
Replace some fall through comments with the attribute.
2023-12-21 01:59:22 -05:00
Mike Frysinger
29f1ffea25
sim: add ATTRIBUTE_FALLTHROUGH for local code
...
We'll replace various /* fall through */ comments so compilers can
actually understand what the code is doing.
2023-12-21 01:59:22 -05:00
Mike Frysinger
d137b254d9
sim: signal: mark signal callback funcs as noreturn since they don't return
...
All funcs already call other funcs that don't return. The mips port is
the only exception because its generic exception handler can return in
the case of normal exceptions. So while the exceptions its signal handler
triggers doesn't return, we can't express that conditional logic. So add
some useless abort calls to make the compiler happy.
2023-12-21 01:59:22 -05:00
Mike Frysinger
f184f3a224
sim: sh: add missing breaks to bit processing
...
Doesn't seem like we want to cascade in this section when bit processing.
2023-12-21 01:46:04 -05:00
Mike Frysinger
4675df34be
sim: rx: mark abort func as noreturn since it doesn't
2023-12-21 01:45:15 -05:00
Mike Frysinger
c31d7253d2
sim: rx: add missing break to memory write
...
It doesn't seem like we want to keep executing the next block of code
after processing the request.
2023-12-21 01:44:13 -05:00
Mike Frysinger
4935610a57
sim: iq2000: add fallback for exit syscall
...
Make sure this syscall always exits regardless of the exit code.
2023-12-21 01:42:34 -05:00
Mike Frysinger
cc6aaa3149
sim: cr16: add missing break statement
...
Doesn't seem to make sense for this to fall through
(although I'm not an expert in this ISA).
2023-12-21 01:41:49 -05:00
Mike Frysinger
3cf7f9363d
sim: arm: add missing breaks to SWI processing
...
Seems unlikely we want the remove syscall to fallthrough into the
rename syscall since we can't rename files that have been removed.
2023-12-21 01:41:07 -05:00
Mike Frysinger
c5190830db
sim: common: mark engine restart as noreturn
...
This helps the compiler with optimization and fixes fallthru warnings.
2023-12-21 01:23:00 -05:00
Mike Frysinger
cbdfef872b
sim: ppc: phb: add missing break to address decoder
...
I don't know what this emulation does exactly, but it missing a break
statement seems kind of obvious based on the 32-bit case above it.
2023-12-21 01:21:18 -05:00
Mike Frysinger
5eba9ae8d5
sim: ppc: mark halt & restart funcs as noreturn
...
This helps the compiler with optimization and fixes fallthru warnings.
2023-12-21 01:20:44 -05:00
Mike Frysinger
95cd009f5d
sim: warnings: enable -Wduplicated-cond
2023-12-21 00:02:20 -05:00
Mike Frysinger
0960c785ac
sim: mn10300: fix LAST_TIMER_REG typo
...
The compiler pointed out that we're testing LAST_TIMER_REG and
LAST_COUNTER which are the same value ... and that's because we
set LAST_TIMER_REG to the wrong register. Fix the typo.
2023-12-21 00:02:18 -05:00
Mike Frysinger
2f84390fd4
sim: bfin: clean up astat reg name decode a little
...
The compiler pointed out we checked AZ twice. Sort by name to avoid
that in the future, and to make it clearer that we have coverage of
all the bits. And add the bits we were missing.
The order here doesn't matter as it's just turning a pointer into a
human readable string when store tracing is enabled.
2023-12-21 00:02:15 -05:00
Mike Frysinger
a4de6c88c9
sim: common: delete unused scache in some mloop paths
...
The scache vars aren't used by ports in the pbb & fast codepaths,
nor are they documented as inputs to the callbacks, so delete them
to avoid unused variable compiler warnings.
2023-12-20 22:13:28 -05:00
Mike Frysinger
09d4e6bb2f
sim: cgen: unify the genmloop logic a bit
...
Pull out the common parts of the genmloop invocation into the common
code. This will make it easier to add more, and make the per-port
differences a little more obvious.
2023-12-20 21:24:40 -05:00
Mike Frysinger
06f05f3585
sim: frv: enable warnings in memory.c
...
Fix one minor pointer-sign warning to enable warnings in general
for this file. Reading the data as signed and then returning it
as unsigned should be functionally the same in this case.
2023-12-19 20:19:52 -05:00
Mike Frysinger
e875d98ee5
sim: common: delete unused argbuf in generated mloop code
...
This function only uses prev_abuf, not abuf, and doesn't inline code
from the various ports on the fly, so abuf will never be used.
2023-12-19 06:54:56 -05:00
Mike Frysinger
e7198a4305
sim: v850: fix -Wunused-variable warnings
2023-12-19 05:51:11 -05:00
Mike Frysinger
67df132b65
sim: sh: fix -Wunused-variable warnings
2023-12-19 05:51:11 -05:00
Mike Frysinger
5daeb7f67a
sim: moxie: fix -Wunused-variable warnings
2023-12-19 05:51:11 -05:00
Mike Frysinger
eade758025
sim: msp430: fix -Wunused-variable warnings
2023-12-19 05:51:11 -05:00
Mike Frysinger
7704565d2f
sim: mn10300: fix -Wunused-variable warnings
2023-12-19 05:51:11 -05:00
Mike Frysinger
bb2f91823f
sim: mips: fix -Wunused-variable warnings
2023-12-19 05:51:11 -05:00
Mike Frysinger
96967be368
sim: microblaze: fix -Wunused-variable warnings
2023-12-19 05:51:10 -05:00
Mike Frysinger
2705c08342
sim: mcore: fix -Wunused-variable warnings
2023-12-19 05:51:10 -05:00
Mike Frysinger
568b2f90c7
sim: m32r: fix -Wunused-variable warnings
2023-12-19 05:51:10 -05:00
Mike Frysinger
9340c17241
sim: lm32: fix -Wunused-variable warnings
2023-12-19 05:51:10 -05:00
Mike Frysinger
ef2022265b
sim: iq2000: fix -Wunused-variable warnings
2023-12-19 05:51:10 -05:00
Mike Frysinger
04a33b24eb
sim: h8300: fix -Wunused-variable warnings
2023-12-19 05:51:10 -05:00
Mike Frysinger
8bc2893fb4
sim: ft32: fix -Wunused-variable warnings
2023-12-19 05:51:10 -05:00
Mike Frysinger
cd3f716d9a
sim: frv: fix -Wunused-variable warnings
2023-12-19 05:51:10 -05:00