mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-04 23:29:17 +00:00
Merge pull request #9980 from Pokechu22/dsp-disassembly-lsr-asr
DSPDisassembler: Fix LSR/ASR formatting
This commit is contained in:
commit
71bf9d622a
1 changed files with 3 additions and 2 deletions
|
@ -105,8 +105,9 @@ std::string DSPDisassembler::DisassembleParameters(const DSPOPCTemplate& opc, u1
|
||||||
// LSL, LSR, ASL, ASR
|
// LSL, LSR, ASL, ASR
|
||||||
if (opc.params[j].mask == 0x003f)
|
if (opc.params[j].mask == 0x003f)
|
||||||
{
|
{
|
||||||
// 6-bit sign extension
|
// Left and right shifts function essentially as a single shift by a 7-bit signed value,
|
||||||
buf += fmt::format("#{}", (val & 0x20) != 0 ? (val | 0xFFFFFFC0) : val);
|
// but are split into two intructions for clarity.
|
||||||
|
buf += fmt::format("#{}", (val & 0x20) != 0 ? (64 - val) : val);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue