mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-14 15:51:29 +02:00
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.
This commit is contained in:
parent
0cde8ab9e8
commit
d8c3f09c9f
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user