| |||
| Home > NEON and VFP Programming > VFP instructions > VABS, VNEG, and VSQRT | |||
Floating-point absolute value, negate, and square root.
These instructions can be scalar, vector, or mixed.
Vop{cond}.F32Sd,Sm
Vop{cond}.F64Dd,Dm
where:
opis one of ABS, NEG, or SQRT.
condis an optional condition code.
Sd, Smare the single-precision registers for the result and operand.
Dd, Dmare the double-precision registers for the result and operand.
The VABS instruction takes the contents of or Sm,
clears the sign bit, and places the result in Dm or Sd.
This gives the absolute value.Dd
The VNEG instruction takes the contents of or Sm,
changes the sign bit, and places the result in Dm or Sd.
This gives the negation of the value.Dd
The VSQRT instruction takes the square root of
the contents of or Sm,
and places the result in Dm or Sd.Dd
In the case of a VABS and VNEG instruction,
if the operand is a NaN, the sign bit is determined in each case
as above, but no exception is produced.
VABS and VNEG instructions cannot
produce any exceptions.
VSQRT instructions can produce Invalid Operation
or Inexact exceptions.
Using the Assembler: