diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-06-16 19:25:25 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-06-16 19:33:28 -0400 |
| commit | d8c3f09c9fcf2f152a4cf6977ab3385092877187 (patch) | |
| tree | ae70334a7f1be2062de025a6fd8d7560f58a5825 /Source/Core/Common/GekkoDisassembler.cpp | |
| parent | 0cde8ab9e8563b4e5d2343da37a4abf4a3b3c41e (diff) | |
Common/GekkoDisassembler: Amend disassembly of operations expecting a character literal
Due to the lack of cast here, this will actually print out the ascii
value, rather than the character itself, due to promoting to integral
values. Instead, we can eliminate the use of character operands and just
print the value itself directly, given it's equivalent behavior with
less code.
Diffstat (limited to 'Source/Core/Common/GekkoDisassembler.cpp')
| -rw-r--r-- | Source/Core/Common/GekkoDisassembler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/Common/GekkoDisassembler.cpp b/Source/Core/Common/GekkoDisassembler.cpp index c1cec303a1..2a77d9d985 100644 --- a/Source/Core/Common/GekkoDisassembler.cpp +++ b/Source/Core/Common/GekkoDisassembler.cpp @@ -504,7 +504,7 @@ void GekkoDisassembler::cmpi(u32 in, int uimm) i = (int)PPCGETCRD(in); if (i != 0) { - m_operands += fmt::format("cr{}, ", '0' + i); + m_operands += fmt::format("cr{}, ", i); } m_operands += imm(in, uimm, 2, false); @@ -716,7 +716,7 @@ void GekkoDisassembler::cmp(u32 in) i = (int)PPCGETCRD(in); if (i != 0) - m_operands += fmt::format("cr{},", static_cast<char>('0' + i)); + m_operands += fmt::format("cr{},", i); m_operands += ra_rb(in); } @@ -1220,7 +1220,7 @@ void GekkoDisassembler::ps(u32 inst) int i = (int)PPCGETCRD(inst); if (i != 0) - m_operands += fmt::format("cr{}, ", '0' + i); + m_operands += fmt::format("cr{}, ", i); m_operands += fmt::format("p{}, p{}", FA, FB); return; } |
