How do I do a 64 bits mulhi in D?

Vladimir Panteleev thecybershadow.lists at gmail.com
Sun Nov 27 01:53:11 UTC 2022


On Sunday, 27 November 2022 at 01:26:36 UTC, deadalnix wrote:
> Mulhi is an instruction that is effectively available on any 64 
> bits CPU that multiply that effectively does the following:

For x86 I made this: 
https://github.com/cybershadow/ae/blob/master/utils/math/longmul.d

There's also a BSL-licensed copy in DustMite, used for polynomial 
hashing.

BTW, not that any of us are students new to D, but I think such 
questions would be better suitable for the D.learn group. E.g., 
Ali often asks questions about how to achieve non-trivial goals 
in D there.



More information about the Digitalmars-d mailing list