Added inspection to warn about unexpected condition code unaffecting instructions before conditional instructions.

Extended documentation.
Bugfix in M68kDeadWriteInspection.
This commit is contained in:
2021-08-05 18:42:32 +02:00
parent 2abb5af8b0
commit 1dcf288d27
7 changed files with 221 additions and 6 deletions
@@ -0,0 +1,18 @@
<html>
<body>
Usually, it is expected that an instruction checking the condition codes or using
the condition codes is preceded by an instruction that actually affects the condition
codes. This inspection checks that this is the case.
For example, the 'movea' and 'adda' instructions (which can be (and are!) often written
as 'move' and 'add') do not affect the condition codes and a conditional branch
will not work as expected.
However, this does not need to be a programming error. Advanced coders sometimes
make use of the fact that instructions do not change condition codes and thus
optimize the order of execution.
<!-- tooltip end -->
Analysis is terminated at the next global label, macrocall or preprocessor statement.
</body>
</html>