mirror of
https://github.com/dlang/dmd.git
synced 2025-04-25 12:40:11 +03:00
14 lines
342 B
Text
14 lines
342 B
Text
`core.int128`: Add `mul` and `udivmod` overloads for 64-bit operands
|
|
|
|
These map to a single x86_64 instruction and have accordingly been optimized via inline assembly.
|
|
|
|
---
|
|
import core.int128;
|
|
|
|
ulong a, b;
|
|
Cent product128 = mul(a, b);
|
|
|
|
ulong divisor64 = …;
|
|
ulong modulus64;
|
|
ulong quotient64 = udivmod(product128, divisor64, modulus64);
|
|
---
|