3DNow! — Conversions Instructions
Extending thepf2id
and
pi2fd
instructions, 3DNow!2 gives us 2 more type conversion instructions, for converting to and from 16-bit words.
pf2iw
converts a floating point value to a 16-bit signed integer. To top 16 bits of value are copies of the sign bit.
pi2fw
converts a 16-bit signed integer to a 32-bit floating point value. This instruction throws out data in the top 16-bits of each half, which makes it different from
pi2fd
.
While not strictly a conversion instruction, I couldn't justify a whole section for the
pswapd
instruction.
pswapd
stores the top and bottom 32-bits of a register or memory location in reverse order in a destination register. The top 32-bits are stored in the bottom half of the destination, and the bottom 32-bits are stored in the top half.
3DNow! — Accumulation Extensions
3DNow!2 gives us 2 morepfacc
-like instructions as well.
pfnacc
behaves just like
pfacc
, except instead of summing the pairs it subtracts them.
pfpnacc
is a bit more tricky. This instruction subtracts the top half of a register from the bottom half, and stores the result in the bottom half, and sums the top and bottom halves of a source register or memory location, storing the result in the top of the first register.