LDC asm for int128

2019-09-09 Thread Newbie2019 via Digitalmars-d-learn
I want to translate this c code into d (build with ldc), so I can use -flto and inline with other code. uint64_t _wymum(uint64_t A, uint64_t B){ __uint128_t r = A ; r *= B; return (r>>64)^r; } Do i need ASM or is there a easy way to implement it ?

Re: LDC asm for int128

2019-09-10 Thread a11e99z via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 06:18:05 UTC, Newbie2019 wrote: I want to translate this c code into d (build with ldc), so I can use -flto and inline with other code. uint64_t _wymum(uint64_t A, uint64_t B){ __uint128_t r = A ; r *= B; return (r>>64)^r; } Do i need A

Re: LDC asm for int128

2019-09-10 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 10 September 2019 at 06:18:05 UTC, Newbie2019 wrote: I want to translate this c code into d (build with ldc), so I can use -flto and inline with other code. uint64_t _wymum(uint64_t A, uint64_t B){ __uint128_t r = A ; r *= B; return (r>>64)^r; } Do i need A