mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-08-07 17:02:52 +03:00
small pioasm improvements (#2224)
- fix disassembly of `wait jmppin` - fix incorrect error message - make python output emit `word(x)` for all unsupported instructions
This commit is contained in:
@@ -56,7 +56,9 @@ std::string disassemble(uint inst, uint sideset_bits_including_opt, bool sideset
|
||||
if (arg2 & 0x1cu) {
|
||||
invalid = true;
|
||||
} else if (arg2) {
|
||||
guts = "jmppin " + std::to_string(arg2 & 3u);
|
||||
guts = "jmppin + " + std::to_string(arg2 & 3u);
|
||||
} else {
|
||||
guts = "jmppin";
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -131,7 +133,7 @@ std::string disassemble(uint inst, uint sideset_bits_including_opt, bool sideset
|
||||
op("mov");
|
||||
std::string guts = dest + ", ";
|
||||
if (operation == 1) {
|
||||
guts += "!";
|
||||
guts += "~";
|
||||
} else if (operation == 2) {
|
||||
guts += "::";
|
||||
}
|
||||
@@ -193,6 +195,9 @@ std::string disassemble(uint inst, uint sideset_bits_including_opt, bool sideset
|
||||
}
|
||||
delay &= ((1u << (5 - sideset_bits_including_opt)) - 1u);
|
||||
ss << std::left << std::setw(4) << (delay ? ("[" + std::to_string(delay) + "]") : "");
|
||||
return ss.str();
|
||||
// remove trailing spaces
|
||||
auto str = ss.str();
|
||||
str.erase(str.find_last_not_of(' ')+1);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user