From 6f1fc56833bf8b4adbda44d003490b4ff7a4f258 Mon Sep 17 00:00:00 2001 From: Patrick Plenefisch Date: Sun, 9 Oct 2022 13:59:52 -0400 Subject: [PATCH] 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 --- tools/pioasm/python_output.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/pioasm/python_output.cpp b/tools/pioasm/python_output.cpp index e932baf..32a50bb 100644 --- a/tools/pioasm/python_output.cpp +++ b/tools/pioasm/python_output.cpp @@ -255,7 +255,7 @@ struct python_output : public output_format { if (source.empty() || dest.empty() || operation == 3) { invalid = true; } - if (dest == source && (arg1 == 1 || arg2 == 2)) { + if (dest == source && (arg1 == 1 || arg2 == 2) && operation == 0) { op("nop"); op_guts(""); } else {