When will you implement cent and ucent?
max haughton
maxhaton at gmail.com
Thu Mar 31 22:35:46 UTC 2022
On Thursday, 31 March 2022 at 22:30:48 UTC, kinke wrote:
> On Thursday, 31 March 2022 at 18:40:52 UTC, deadalnix wrote:
>> Honestly, I don't care if DMD forward the operation to
>> something in druntime, that would at least allow me to have
>> good codegen on LDC/GDC.
>
> With LDC's support for inline LLVM IR
> (https://wiki.dlang.org/LDC_inline_IR), I think we can quite
> easily have a much better `core.int128` solution for LDC at
> least. Coupled with LLVM's compiler-rt builtins library, which
> should provide performant library fallbacks for targets with
> limited hardware support. So that a druntime `Cent` solution
> should be on-par with clang's `__int128`.
>
> The existing generic software implementation is still useful
> for CTFE.
It's still quite ugly compared to just implementing cent properly
e.g. lack of VRP and implicit conversions make the library
approach a bit meh.
More information about the Digitalmars-d
mailing list