_addcarry_u64
Classification
Other, Arithmetic, CPUID Test: None
Header File
Instruction
ADC r64, r64
Synopsis
_addcarry_u64(unsigned char c_in, unsigned __int64 a, unsigned __int64 b, unsigned __int64 * out);
Description
Add unsigned 64-bit integers "a" and "b" with unsigned 8-bit carry-in "c_in" (carry flag), and store the unsigned 64-bit result in "out", and the carry-out in "dst" (carry or overflow flag).
Operation
tmp[64:0] := a[63:0] + b[63:0] + (c_in > 0 ? 1 : 0)
MEM[out+63:out] := tmp[63:0]
dst[0] := tmp[64]
dst[7:1] := 0