Extensions
Forms
1 (1 Legacy)
Data
Intel XED v2026.08.23

DAA turns the binary sum of two packed BCD bytes in AL, each holding two decimal digits, into the packed BCD sum. An ADD of 58h and 47h leaves 9Fh: the low digit is above 9, so DAA adds 6 (A5h), and AL was above 99h, so it adds 60h, leaving 05h with CF set, which is 105 written in decimal. The two tests use AL and CF as they were before DAA: the low digit is corrected when it exceeds 9 or AF reports a carry out of it, the high one when AL exceeded 99h or CF reports a carry out of the byte. AF and CF then say which corrections were made, SF, ZF and PF follow the result, and OF is undefined.

A longer number is added a byte at a time from the low end, ADD then ADC for each further byte, with a DAA after each, CF carrying the decimal carry to the next byte. DAS is the same for a subtraction, AAA the unpacked form with one digit per byte.

The manuals’ wording

AMD’s Volume 3 says that AF and CF are left alone where no correction is made, and Intel’s pseudocode clears them; it comes to the same, since a set AF or CF forces its correction. Both give OF as undefined.

Not in 64-bit mode

Opcode 27 raises #UD in 64-bit mode, and the fixture has no case for DAA for that reason: the probe runs there and lists the form as not run. GNU as 2.44 and Clang 23 refuse daa in 64-bit code, and GCC 14 and Clang 23 have no intrinsic for it. Packed BCD of up to 18 digits converts to and from binary in one instruction each with x87’s FBLD and FBSTP, which 64-bit mode kept. AMD’s Zen 5 guide lists DAA as microcoded, without a latency.

Forms

Every encoding of DAA that Intel XED knows, one row per XED instruction form (iform). How to read the notation.
InstructionEncodingRequires
DAA not in 64-bit mode DAA27Base instruction set

Operation

What the forms do, in pseudocode that our tests run against results recorded on real processors. How to read.

a = al
c = cf
r = a
if (a & 0xF) > 9 or af:          # the low digit overflowed
    r += 6
    af = 1
else:
    af = 0
if a > 0x99 or c:                # the high digit, by AL and CF as they
    r += 0x60                    # were before the instruction
    cf = 1
else:
    cf = 0
al = r
sf = r >> 7 & 1
zf = (r & 0xFF) == 0
pf = parity(r)
of = UNDEFINED

Not run on a processor: the instruction does not exist in 64-bit mode, where the probe runs.

Operands

What each form reads and writes, as Intel XED records it: the operands of its syntax, in order, and the implicit ones that the syntax does not name. How to read.
OperandKindAction
DAA not in 64-bit mode
ALimplicitread, write
RFLAGSimplicitread, write

Flags

T tested, M modified, U undefined; blank: not affected. How to read.
OFSFZFAFPFCF
All forms
UMMTMMTM

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.

CPUID requirements and processors of the XED ISA sets above. Alternatives are separated by “or”; processors follow XED’s chip model, whose AMD processors end with Zen 2, and the CPU data of this site for Zen 3 to Zen 6.
ISA setCPUIDProcessors
I86

No CPUID bit: part of the base instruction set.

Every x86-64 processor in XED’s model and Zen 3 to Zen 6

More General-purpose instructions

All 109 General-purpose instructions

Sources

  1. Intel XED v2026.08.23 (commit 0bcb6237345c): forms, encodings, operands, flags, exception classes, attributes, ISA sets, CPUID bits and chip model.
  2. The CPU data of x86-64.net: Zen 3 to Zen 6, from GCC’s -march feature sets and AMD’s Processor Programming References, which the page of each processor cites.
  3. Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026): Volume 2A, page 3-258 (DAA)
  4. AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and System Instructions (24594, rev. 3.39, October 2026)
  5. Software Optimization Guide for the AMD Zen5 Microarchitecture (58455, rev. 1.00, August 2024), Wayback Machine copy of AMD's ZIP

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.