Instruction
PFSUB
Subtracts the packed singles of the second MMX operand from those of the first; 3DNow!.
An AMD extension: Intel processors never had it, and in XED's chip model no AMD processor after K10 has it either.
- Extensions
- Forms
- 2 (2 Legacy)
- Data
- Intel XED v2026.08.23
Forms
Data flow
Where the elements of the sources go, element 0 on the right; results that depend on a control value are drawn for an example. How to read.
Result single i comes from single i of mm1 and mm2. Result singles 1 to 0: a1-b1, a0-b0.
Operation
What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.
features = cpuid_leaf(0x80000001, 0)[3]
if not features >> 31 & 1:
fault(UD) # CPUID: no 3DNow!
for i in range(2):
a = mm1.f32[i]
b = src2.f32[i]
mm1.f32[i] = sub(a, b)
# sub: a + (-b) by 3DNow!'s rules: -0 - +0 = -0, an exact 0 takes
# a's sign, and a zero a gives -b, exponent 255 included
# x87: TOP = 0, all tags valid, bits 79:64 of mm1's register all onesRun on AMD Zen 5 (EPYC 9645): 2 cases. Its cases ran where CPUID reported no 3DNow!, and every one raised an exception.
Operands
| Operand | Kind | Action |
|---|---|---|
PFSUB mm, mm/m64 | ||
mm | explicit | read, write |
mm/m64 | explicit | read |
Flags
None: XED records no flag that the forms test or change.
CPUID and processors
Each form belongs to an XED ISA set. A form can be used when the processor reports every CPUID bit of one of its ISA set's alternatives.
| ISA set | CPUID | Processors |
|---|---|---|
3DNOW | 3DNow | K10 (Family 10h) |
More 3DNow! instructions
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model. - AMD64 Architecture Programmer's Manual, Volume 5: 64-Bit Media and x87 Floating-Point Instructions (26569, rev. 3.16, November 2021), Wayback Machine copy of AMD's PDF
- AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and System Instructions (24594, rev. 3.36, March 2024), Wayback Machine copy of AMD's PDF
The tables are derived from Intel XED, Copyright Intel Corporation, licensed under the Apache License 2.0; x86-64.net converted and reformatted them. The text is our own.