Good morning (or good evening),
I was reading some legacy code in my company and I found the following intrinsic was used:
_addcarry_u64
However, I have to port this code on a platform that does not support it. After some research, I stumbled upon a Clang builtin that seemed to do the exact same job:
__builtin_addcll
It has the same arguments (not in the same order but still), however, since there is little to no documentation about it even on Clang website, I have no clue if they truly are the same or not, especially since return types or argument order is not the same.
I tried to use a macro to remap already used arguments however it did not work (I know it's dirty).
#define _addcarry_u64(carryIn, src1, src2, carryOut) __builtin_addcll(src1, src2, carryIn, carryOut)
I feel I will have to wrap it in a function for it to work correctly (still I'm not sure it would work)
Can anyone point me to a documentation or to anything that could solve my problem?