Displaying 2 results from an estimated 2 matches for "how_addcarry_u64".
2018 Dec 31
0
[cfe-dev] Portable multiplication 64 x 64 -> 128 for int128 reimplementation
...I'm not sure, but I think there currently does not exist any intrinsic to
> generate the top half of a 64x64=128 multiply, except for `_mulx_64`.
> If Clang stopped requiring `-mbmi2`, I would then expect the `_mulx_64`
> intrinsic to generate a regular MUL instruction; similar to
> how_addcarry_u64 generates ADCX/ADOX when available/useful and a regular
> ADC otherwise.
> MSVC calls this intrinsic `_umul128
> <https://docs.microsoft.com/en-us/cpp/intrinsics/umul128?view=vs-2017>`,
> and on MSVC it does generate a regular MUL instruction rather than forcing
> MULX.
>
&g...
2018 Dec 30
3
[cfe-dev] Portable multiplication 64 x 64 -> 128 for int128 reimplementation
_mulx_u64 only exists when the target is x86_64. That's still not very
portable. I'm not opposed to removing the bmi2 check, but gcc also has the
same check so it doesn't improve portability much.
~Craig
On Sat, Dec 29, 2018 at 4:44 PM Arthur O'Dwyer via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi Pawel,
>
> There is the _mulx_u64 intrinsic, but it