Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #9980 from Pokechu22/dsp-disassembly-lsr-asr
DSPDisassembler: Fix LSR/ASR formatting
  • Loading branch information
Tilka committed Jul 31, 2021
2 parents d4cd289 + f3f466a commit 71bf9d6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/Core/Core/DSP/DSPDisassembler.cpp
Expand Up @@ -105,8 +105,9 @@ std::string DSPDisassembler::DisassembleParameters(const DSPOPCTemplate& opc, u1
// LSL, LSR, ASL, ASR
if (opc.params[j].mask == 0x003f)
{
// 6-bit sign extension
buf += fmt::format("#{}", (val & 0x20) != 0 ? (val | 0xFFFFFFC0) : val);
// Left and right shifts function essentially as a single shift by a 7-bit signed value,
// but are split into two intructions for clarity.
buf += fmt::format("#{}", (val & 0x20) != 0 ? (64 - val) : val);
}
else
{
Expand Down

0 comments on commit 71bf9d6

Please sign in to comment.