Table of Contents

Advertisement

Instruction Overview
Functional Description
The Dreg form of the Absolute Value instruction calculates the absolute
value of a 32-bit register and stores it into a 32-bit
lator form of this instruction takes the absolute value of a 40-bit input
value in a register and produces a 40-bit result. Calculation is done
according to the following rules.
• If the input value is positive or zero, copy it unmodified to the
destination.
• If the input value is negative, subtract it from zero and store the
result in the destination. Saturation is automatically performed
with the instruction, so taking the absolute value of the larg-
est-magnitude negative number returns the largest-magnitude
positive number.
The
operation can also be performed on both Accumulators by a sin-

ABS

gle instruction.
Flags Affected
This instruction affects flags as follows.
is set if result is zero; cleared if nonzero. In the case of two
AZ
simultaneous operations,
is cleared.
AN
is set if the maximum negative value is saturated to the maximum
V
positive value and the
is set if
VS
is set if result overflows and the
AV0
overflow.
is set if
AV0S
15-4
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
represents the logical "OR" of the two.
AZ
dest_reg
is set; unaffected otherwise.
V
is set; unaffected otherwise.
AV0
dest_reg
is a
; cleared if no saturation.
Dreg
is
dest_reg
A0
. The accumu-
; cleared if no

Advertisement

Table of Contents
loading

This manual is also suitable for:

Adsp-bf56x blackfin

Table of Contents