mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 07:39:26 +01:00
docs/DSP: Fix inconsistency with ADDI and CMPI
We don't have anything called $amD, though we do have $acsD. However, these instructions affect flags based on the whole accumulator, so it's better to just use $acD.
This commit is contained in:
parent
baf2c710ff
commit
7c63bd1893
@ -143,11 +143,12 @@ void Interpreter::cmpaxh(const UDSPInstruction opc)
|
|||||||
ZeroWriteBackLog();
|
ZeroWriteBackLog();
|
||||||
}
|
}
|
||||||
|
|
||||||
// CMPI $amD, #I
|
// CMPI $acD, #I
|
||||||
// 0000 001d 1000 0000
|
// 0000 001d 1000 0000
|
||||||
// iiii iiii iiii iiii
|
// iiii iiii iiii iiii
|
||||||
// Compares mid accumulator $acD.hm ($amD) with sign extended immediate value I.
|
// Compares accumulator with immediate. Comparison is executed
|
||||||
// Although flags are being set regarding whole accumulator register.
|
// by subtracting the immediate (16-bit sign extended) from mid accumulator
|
||||||
|
// $acD.hm and computing flags based on whole accumulator $acD.
|
||||||
//
|
//
|
||||||
// flags out: x-xx xxxx
|
// flags out: x-xx xxxx
|
||||||
void Interpreter::cmpi(const UDSPInstruction opc)
|
void Interpreter::cmpi(const UDSPInstruction opc)
|
||||||
@ -166,8 +167,8 @@ void Interpreter::cmpi(const UDSPInstruction opc)
|
|||||||
|
|
||||||
// CMPIS $acD, #I
|
// CMPIS $acD, #I
|
||||||
// 0000 011d iiii iiii
|
// 0000 011d iiii iiii
|
||||||
// Compares accumulator with short immediate. Comaprison is executed
|
// Compares accumulator with short immediate. Comparison is executed
|
||||||
// by subtracting short immediate (8bit sign extended) from mid accumulator
|
// by subtracting the short immediate (8-bit sign extended) from mid accumulator
|
||||||
// $acD.hm and computing flags based on whole accumulator $acD.
|
// $acD.hm and computing flags based on whole accumulator $acD.
|
||||||
//
|
//
|
||||||
// flags out: x-xx xxxx
|
// flags out: x-xx xxxx
|
||||||
@ -489,7 +490,7 @@ void Interpreter::addaxl(const UDSPInstruction opc)
|
|||||||
UpdateSR64Add(acc, acx, GetLongAcc(dreg));
|
UpdateSR64Add(acc, acx, GetLongAcc(dreg));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ADDI $amD, #I
|
// ADDI $acD, #I
|
||||||
// 0000 001d 0000 0000
|
// 0000 001d 0000 0000
|
||||||
// iiii iiii iiii iiii
|
// iiii iiii iiii iiii
|
||||||
// Adds immediate (16-bit sign extended) to mid accumulator $acD.hm.
|
// Adds immediate (16-bit sign extended) to mid accumulator $acD.hm.
|
||||||
|
@ -220,11 +220,12 @@ void DSPEmitter::cmpaxh(const UDSPInstruction opc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// CMPI $amD, #I
|
// CMPI $acD, #I
|
||||||
// 0000 001d 1000 0000
|
// 0000 001d 1000 0000
|
||||||
// iiii iiii iiii iiii
|
// iiii iiii iiii iiii
|
||||||
// Compares mid accumulator $acD.hm ($amD) with sign extended immediate value I.
|
// Compares accumulator with immediate. Comparison is executed
|
||||||
// Although flags are being set regarding whole accumulator register.
|
// by subtracting the immediate (16-bit sign extended) from mid accumulator
|
||||||
|
// $acD.hm and computing flags based on whole accumulator $acD.
|
||||||
//
|
//
|
||||||
// flags out: x-xx xxxx
|
// flags out: x-xx xxxx
|
||||||
void DSPEmitter::cmpi(const UDSPInstruction opc)
|
void DSPEmitter::cmpi(const UDSPInstruction opc)
|
||||||
@ -257,7 +258,7 @@ void DSPEmitter::cmpi(const UDSPInstruction opc)
|
|||||||
// CMPIS $acD, #I
|
// CMPIS $acD, #I
|
||||||
// 0000 011d iiii iiii
|
// 0000 011d iiii iiii
|
||||||
// Compares accumulator with short immediate. Comparison is executed
|
// Compares accumulator with short immediate. Comparison is executed
|
||||||
// by subtracting short immediate (8bit sign extended) from mid accumulator
|
// by subtracting the short immediate (8-bit sign extended) from mid accumulator
|
||||||
// $acD.hm and computing flags based on whole accumulator $acD.
|
// $acD.hm and computing flags based on whole accumulator $acD.
|
||||||
//
|
//
|
||||||
// flags out: x-xx xxxx
|
// flags out: x-xx xxxx
|
||||||
@ -686,7 +687,7 @@ void DSPEmitter::addaxl(const UDSPInstruction opc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ADDI $amD, #I
|
// ADDI $acD, #I
|
||||||
// 0000 001d 0000 0000
|
// 0000 001d 0000 0000
|
||||||
// iiii iiii iiii iiii
|
// iiii iiii iiii iiii
|
||||||
// Adds immediate (16-bit sign extended) to mid accumulator $acD.hm.
|
// Adds immediate (16-bit sign extended) to mid accumulator $acD.hm.
|
||||||
|
@ -1222,7 +1222,7 @@ A ``-'' indicates that the flag retains its previous value, a ``0'' indicates th
|
|||||||
\end{DSPOpcodeBytefield}
|
\end{DSPOpcodeBytefield}
|
||||||
|
|
||||||
\begin{DSPOpcodeFormat}
|
\begin{DSPOpcodeFormat}
|
||||||
ADDI $amD, #I
|
ADDI $acD, #I
|
||||||
\end{DSPOpcodeFormat}
|
\end{DSPOpcodeFormat}
|
||||||
|
|
||||||
\begin{DSPOpcodeDescription}
|
\begin{DSPOpcodeDescription}
|
||||||
@ -1958,12 +1958,12 @@ A ``-'' indicates that the flag retains its previous value, a ``0'' indicates th
|
|||||||
\end{DSPOpcodeBytefield}
|
\end{DSPOpcodeBytefield}
|
||||||
|
|
||||||
\begin{DSPOpcodeFormat}
|
\begin{DSPOpcodeFormat}
|
||||||
CMPI $amD, #I
|
CMPI $acD, #I
|
||||||
\end{DSPOpcodeFormat}
|
\end{DSPOpcodeFormat}
|
||||||
|
|
||||||
\begin{DSPOpcodeDescription}
|
\begin{DSPOpcodeDescription}
|
||||||
\item Compares mid accumulator \Register{\$acD.hm} (\Register{\$amD}) with sign-extended immediate value \Value{I}.
|
\item Compares accumulator with immediate. Comparison is performed by subtracting the immediate (16-bit sign-extended)
|
||||||
However, flags are set with regards to the whole accumulator register.
|
from mid accumulator \Register{\$acD.hm} and computing flags based on whole accumulator \Register{\$acD}.
|
||||||
\end{DSPOpcodeDescription}
|
\end{DSPOpcodeDescription}
|
||||||
|
|
||||||
\begin{DSPOpcodeOperation}
|
\begin{DSPOpcodeOperation}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user