The future of Int128 support in D language
Iain Buclaw
ibuclaw at gdcproject.org
Mon Jan 9 16:51:45 UTC 2023
On Sunday, 8 January 2023 at 17:36:07 UTC, Johan wrote:
>
> I like that you splitted the implementation into a separate
> file, that's a good idea.
>
> GDC also can benefit of a specialized implementation. Probably
> good to ask Iain of how best to approach these specializations
> (i.e. what files, how to forward to the specialized
> implementation from the upstream druntime file, ...)
>
> -Johan
Actually, I had implemented core.int128 as compiler-recognized
intrinsics that do the necessary conversion to/from native on the
fly.
I ran into some problems when testing this on SPARC though (to
name one non-x86 target that I use for sanity checking new
code-gen features). Never found the time to get to the bottom of
what was causing it to crash, so left it as a TBD patch set.
I suspect I am going wrong somewhere with all the concatenated
`*cast(cent*)&c` and `*cast(core.int128.Cent*)&c` going on all
around the place when you chain these functions together with
UFCS. Maybe should investigate using a `union` instead, but not
enough bandwidth to do that at the moment.
More information about the Digitalmars-d
mailing list