Skip to content

Commit 6f1fc56

Browse files
authored
pioasm: python output incorrectly rendered mov x, ~x as nop() (earlephilhower#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
1 parent 24bb362 commit 6f1fc56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/pioasm/python_output.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ struct python_output : public output_format {
255255
if (source.empty() || dest.empty() || operation == 3) {
256256
invalid = true;
257257
}
258-
if (dest == source && (arg1 == 1 || arg2 == 2)) {
258+
if (dest == source && (arg1 == 1 || arg2 == 2) && operation == 0) {
259259
op("nop");
260260
op_guts("");
261261
} else {

0 commit comments

Comments
 (0)