9.7.2.1. Extended-Precision Arithmetic Instructions: add.cc
add.cc
Add two values with carry-out.
Syntax
ptx
add.cc.type d, a, b;
.type = { .u32, .s32, .u64, .s64 };Description
Performs integer addition and writes the carry-out value into the condition code register.
Semantics
ptx
d = a + b;
carry-out written to CC.CFNotes
No integer rounding modifiers.
No saturation.
Behavior is the same for unsigned and signed integers.
PTX ISA Notes
32-bit add.cc introduced in PTX ISA version 1.2.
64-bit add.cc introduced in PTX ISA version 4.3.
Target ISA Notes
32-bit add.cc is supported on all target architectures.
64-bit add.cc requires sm_20 or higher.
Examples
ptx
@p add.cc.u32 x1,y1,z1; // extended-precision addition of
@p addc.cc.u32 x2,y2,z2; // two 128-bit values
@p addc.cc.u32 x3,y3,z3;
@p addc.u32 x4,y4,z4;