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:
Pokechu22 2022-05-22 17:33:12 -07:00
parent baf2c710ff
commit 7c63bd1893
3 changed files with 17 additions and 15 deletions

View File

@ -143,11 +143,12 @@ void Interpreter::cmpaxh(const UDSPInstruction opc)
ZeroWriteBackLog();
}
// CMPI $amD, #I
// CMPI $acD, #I
// 0000 001d 1000 0000
// iiii iiii iiii iiii
// Compares mid accumulator $acD.hm ($amD) with sign extended immediate value I.
// Although flags are being set regarding whole accumulator register.
// Compares accumulator with immediate. Comparison is executed
// 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
void Interpreter::cmpi(const UDSPInstruction opc)
@ -166,8 +167,8 @@ void Interpreter::cmpi(const UDSPInstruction opc)
// CMPIS $acD, #I
// 0000 011d iiii iiii
// Compares accumulator with short immediate. Comaprison is executed
// by subtracting short immediate (8bit sign extended) from mid accumulator
// Compares accumulator with short immediate. Comparison is executed
// by subtracting the short immediate (8-bit sign extended) from mid accumulator
// $acD.hm and computing flags based on whole accumulator $acD.
//
// flags out: x-xx xxxx
@ -489,7 +490,7 @@ void Interpreter::addaxl(const UDSPInstruction opc)
UpdateSR64Add(acc, acx, GetLongAcc(dreg));
}
// ADDI $amD, #I
// ADDI $acD, #I
// 0000 001d 0000 0000
// iiii iiii iiii iiii
// Adds immediate (16-bit sign extended) to mid accumulator $acD.hm.

View File

@ -220,11 +220,12 @@ void DSPEmitter::cmpaxh(const UDSPInstruction opc)
}
}
// CMPI $amD, #I
// CMPI $acD, #I
// 0000 001d 1000 0000
// iiii iiii iiii iiii
// Compares mid accumulator $acD.hm ($amD) with sign extended immediate value I.
// Although flags are being set regarding whole accumulator register.
// Compares accumulator with immediate. Comparison is executed
// 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
void DSPEmitter::cmpi(const UDSPInstruction opc)
@ -257,7 +258,7 @@ void DSPEmitter::cmpi(const UDSPInstruction opc)
// CMPIS $acD, #I
// 0000 011d iiii iiii
// 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.
//
// 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
// iiii iiii iiii iiii
// Adds immediate (16-bit sign extended) to mid accumulator $acD.hm.

View File

@ -1222,7 +1222,7 @@ A ``-'' indicates that the flag retains its previous value, a ``0'' indicates th
\end{DSPOpcodeBytefield}
\begin{DSPOpcodeFormat}
ADDI $amD, #I
ADDI $acD, #I
\end{DSPOpcodeFormat}
\begin{DSPOpcodeDescription}
@ -1958,12 +1958,12 @@ A ``-'' indicates that the flag retains its previous value, a ``0'' indicates th
\end{DSPOpcodeBytefield}
\begin{DSPOpcodeFormat}
CMPI $amD, #I
CMPI $acD, #I
\end{DSPOpcodeFormat}
\begin{DSPOpcodeDescription}
\item Compares mid accumulator \Register{\$acD.hm} (\Register{\$amD}) with sign-extended immediate value \Value{I}.
However, flags are set with regards to the whole accumulator register.
\item Compares accumulator with immediate. Comparison is performed by subtracting the immediate (16-bit sign-extended)
from mid accumulator \Register{\$acD.hm} and computing flags based on whole accumulator \Register{\$acD}.
\end{DSPOpcodeDescription}
\begin{DSPOpcodeOperation}