docs/DSP: NEG can set overflow and carry

This commit is contained in:
Pokechu22 2021-08-18 16:33:19 -07:00
parent 602163b623
commit 9ef388f1c3
1 changed files with 9 additions and 2 deletions

View File

@ -3516,12 +3516,19 @@ A ``-'' indicates that the flag retains its previous value, a ``0'' indicates th
\end{DSPOpcodeDescription} \end{DSPOpcodeDescription}
\begin{DSPOpcodeOperation} \begin{DSPOpcodeOperation}
$acD = -$acD $acD = 0 - $acD
FLAGS($acD) FLAGS($acD)
$pc++ $pc++
\end{DSPOpcodeOperation} \end{DSPOpcodeOperation}
\DSPOpcodeFlags{-}{-}{X}{X}{X}{X}{0}{0} \begin{DSPOpcodeNote}
\item The carry flag is set only if \Register{\$acD} was zero.
The overflow flag is set only if \Register{\$acD} was \Value{0x8000000000} (the minimum value),
as \Code{-INT\_MIN} is \Code{INT\_MIN} in two's complement.
In both of these cases, the value of \Register{\$acD} after the operation is the same as it was before.
\end{DSPOpcodeNote}
\DSPOpcodeFlags{X}{-}{X}{X}{X}{X}{X}{X}
\end{DSPOpcode} \end{DSPOpcode}
\begin{DSPOpcode}{NOT} \begin{DSPOpcode}{NOT}