fix pioasm python output (#694) (#695)

Issue:
    irq wait 0
    irq 0
are translated as:
    irq(wait, 0)                          # 0
    irq(nowait, 0)                        # 1
wait/nowait are incorrect, should be block or ommited (alt: noblock).

After change:
    irq(block, 0)                         # 0
    irq(0)                                # 1
This commit is contained in:
Michael Olson 2022-01-08 19:55:23 +00:00 committed by GitHub
parent 215f77b836
commit d831eff5a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd. * Copyright (c) 2021 Raspberry Pi (Trading) Ltd.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -283,9 +283,7 @@ struct python_output : public output_format {
if (arg1 & 0x2u) { if (arg1 & 0x2u) {
guts += "clear, "; guts += "clear, ";
} else if (arg1 & 0x1u) { } else if (arg1 & 0x1u) {
guts += "wait, "; guts += "block, ";
} else {
guts += "nowait, ";
} }
auto irq = std::to_string(arg2 & 7u); auto irq = std::to_string(arg2 & 7u);
if (arg2 & 0x10u) { if (arg2 & 0x10u) {