title: C# - any way to use _addcarry_u64 intrinsic?
body: <p>I'm trying to prototype an unsigned BigInteger type with fixed byte size. The general idea is to have a struct with a fixed buffer of UInt64 parts.</p>
  
  <p>In order to do addition of those big integers efficiently, I could use a C# equivalent of the <a href="https://scc.ustc.edu.cn/zlsc/tc4600/intel/2015.1.133/compiler_c/GUID-93E27B31-FDA6-4026-A2C4-98BF238349E9.htm" rel="nofollow noreferrer">_addcarry_u64</a> intrinsic function, as supported by MSVC or ICC in the C++ world.
  So far, I unfortunately couldn't find a baked-in equivalent in .NET Core 2.1.</p>
  
  <p>Is there any equivalent in the C# world already (maybe with .NET Core 3.0 intrinsics? I can't test that on my machine unfortunately)?</p>
  
  <p>Alternatively, is there any reasonable way for a custom implementation?
  The only way I can think of would be to generate Assembly for these instructions, but then again, the only ways I've seen to invoke Assembly at all from C# is via PInvoke, and - to be tested - but I'd strongly suppose the overhead of that will be considerable larger than the performance to be gained from the intrinsic in the first place.</p>
  
  <p>Thanks</p>