# HSUBPS
# Packed Single-FP Horizontal Subtract
Opcode | Mnemonic | Description |
---|---|---|
F2 0F 7D /r | HSUBPS xmm1, xmm2/m128 | Subtract horizontally packed SP FP numbers in xmm2/m128 from xmm1. |
# Description
Subtracts the single-precision floating-point value in the second dword of the destination operand from the first dword of the destination operand and stores the result in the first dword of the destination operand.
Subtracts the single-precision floating-point value in the fourth dword of the destination operand from the third dword of the destination operand and stores the result in the second dword of the destination operand.
Subtracts the single-precision floating-point value in the second dword of the source operand from the first dword of the source operand and stores the result in the third dword of the destination operand.
Subtracts the single-precision floating-point value in the fourth dword of the source operand from the third dword of the source operand and stores the result in the fourth dword of the destination operand.
# Operation
xmm1[0..31] = xmm1[0..31] - xmm1[32..63];
xmm1[32..63] = xmm1[64..95] - xmm1[96..127];
xmm1[64..95] = xmm2/m128[0..31] - xmm2/m128[32..63];
xmm1[96..127] = xmm2/m128[64..95] - xmm2/m128[96..127];
2
3
4
5
# Exceptions
When the source operand is a memory operand, the operand must be aligned on a 16-byte boundary or a general-protection exception (#GP) will be generated.
# Numeric Exceptions
Overflow, Underflow, Invalid, Precision, Denormal.
# Protected Mode Exceptions
# Real-Address Mode Exceptions
# Virtual-8086 Mode Exceptions
Instruction | Latency | Throughput | Execution Unit |
---|---|---|---|
CPUID | 0F3n | 0F3n | 0F3n |
HSUBPS | 13 | 4 | FP_ADD FP_MISC |