3 ms·
I suppose it would. However, RCR is a notoriously slow microcoded instruction in modern x86. You'd be better off with something like add rax, rbx ; lo + hi
by pbsd 11y ago
I suppose it would. However, RCR is a notoriously slow microcoded instruction in modern x86. You'd be better off with something like
add rax, rbx ; lo + hi
setc cl
shrd rax, rcx, 1
Or, better, the generic way to do it without carries: ((a ^ b) >> 1) + (a & b).