[Issue 24412] No predefined version for 64bit ?!

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 27 12:38:59 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24412

--- Comment #4 from Manu <turkeyman at gmail.com> ---
> It usually is, so people tend to use it that way.  

But it's not actually the same thing, and people using it that way have likely
written a bug...

> Are you programming for the Nintendo 64 perhaps? :)

I do have a lifetime of experience writing software for such 64bit systems with
32bit pointers. They are a real thing that exists.

> [...] or query a specific ISA [...]

Yes, in C++ we wrangle this information ourselves from whatever material the
compiler makes available to determine the facts. Everyone has such a global
header file that does this wrangling. I'm specifically looking to avoid that
here.

> Is this to provide your own alternative 64-bit emulation when there's no 'native' 64-bit math?

Exactly; if there are no 64bit registers, it can be the case that some
alternative algorithm is superior. There do exist algorithms that only work
efficiently with 64bits.

> [...] consider WebAssembly without wasm64 [...] would 'D_64bitRegister' be set in that case?

Maybe not define it for webasm since 32bit machines can run web browsers too. I
mean, you're running in a web browser; your concern about maximising
architectural perf is already forfeit.
It's difficult to imagine a case where this could be used where it's a
compatibility issue; it's basically for optimisation opportunities, and nothing
else.

--


More information about the Digitalmars-d-bugs mailing list