NORM ACC,XARn++/
−−
6-253
NORM ACC,XARn++/
−−
Normalize ACC and Modify Selected Auxiliary Register
.
SYNTAX OPTIONS
OPCODE
OBJMODE
RPT
CYC
NORM ACC,XARn++
1111 1111 0111 1nnn
X
Y
N+4
NORM ACC,XARn
−−
1111 1111 0111 0nnn
X
Y
N+4
Operands
ACC
Accumulator register
XARn
++/
−−
XAR0 to XAR7, auxiliary registers post incremented or decremented
Description
Normalize the signed content of the ACC register and modify the specified
auxiliary register (XAR0 to XAR7):
if(ACC != 0x0000 0000)
{
if((ACC(31) XOR ACC(30)) = 0)
{
ACC = ACC << 1, TC = 0;
if(XARn++ addressing mode) XARn += 1;
if(XARn−− addressing mode) XARn −= 1;
}
else
TC = 1;
}
else
TC = 1;
Note:
The NORM instruction normalizes a signed number in the ACC register by finding the
magnitude of the number. An XOR operation is performed on ACC bits 31 and 30. If the
bits are the same, then the content of the ACC register is logically shifted left by 1 to
eliminate the extra sign bit and the selected pointer is modified. If the bits are different,
the ACC is not shifted and the selected pointer is not modified. The selected pointer
does not access any memory location.
Flags and
Modes
Z
After the operation, the Z flag is set if the ACC value is zero, else Z is cleared.
N
After the operation, the N flag is set if bit 31 of the ACC is 1, else N is cleared.
TC
If the operation set TC, no normalization was needed (ACC did not need to
be modified). If the operation cleared TC, bits 31 and 30 were the same and,
as a result, the ACC register was logically shifted left by 1.
Repeat
This instruction is repeatable. If the operation follows a RPT instruction, then
the NORM instruction will be executed N+1 times. The state of the Z, N, and
TC flags will reflect the final result. Note: If you only want the NORM
instruction to execute until normalization is done, you can create a loop that
checks the value of the TC bit. When TC = 1, normalization is complete.
Содержание TMS320C28x
Страница 30: ...1 12...
Страница 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Страница 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Страница 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Страница 509: ...SUBL ACC P PM 6 352 SUBL ACC P PM ACC S B 11 M X 4 MOVH Y ACC 5 Store Q15 result into Y...
Страница 585: ...This page intentionally left blank 7 32 This page intentionally left blank...