When will you implement cent and ucent?
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Mon Apr 11 08:15:09 UTC 2022
On Monday, 11 April 2022 at 07:44:04 UTC, user1234 wrote:
> On Monday, 11 April 2022 at 07:24:41 UTC, Ola Fosheim Grøstad
> wrote:
>> Intel/AMD have some instructions intended for higher precision
>> math ([ADX](https://en.wikipedia.org/wiki/Intel_ADX),
>> [MULX](https://en.wikipedia.org/wiki/X86_Bit_manipulation_instruction_set#BMI2)). They also have some instructions meant to be used for crypto, e.g. [CLMUL](https://en.wikipedia.org/wiki/CLMUL_instruction_set).
>
> LLVM 128 type (named `i128`) on x86_64 produces standard
> instructions, e.g more or less the D library implementation
> with better code gen, [example].
>
> [example]: https://godbolt.org/z/vfYhc3bTn
Thanks, it appears to use "MULX" if you specify the compiler
option `-mattr=bmi2` or a `-mcpu=haswell`.
More information about the Digitalmars-d
mailing list