pioasm: python output incorrectly rendered mov x, ~x as nop() (#1053)

This affects all move operations where source and destination are the same
but with an operation applied, ex: mov y, ::y, mov osr, ~osr, etc
This commit is contained in:
Patrick Plenefisch 2022-10-09 13:59:52 -04:00 committed by GitHub
parent 24bb3627cf
commit 6f1fc56833
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,7 +255,7 @@ struct python_output : public output_format {
if (source.empty() || dest.empty() || operation == 3) { if (source.empty() || dest.empty() || operation == 3) {
invalid = true; invalid = true;
} }
if (dest == source && (arg1 == 1 || arg2 == 2)) { if (dest == source && (arg1 == 1 || arg2 == 2) && operation == 0) {
op("nop"); op("nop");
op_guts(""); op_guts("");
} else { } else {