Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core.checkedint enhancement #17319

Open
dlangBugzillaToGithub opened this issue Dec 16, 2015 · 0 comments
Open

core.checkedint enhancement #17319

dlangBugzillaToGithub opened this issue Dec 16, 2015 · 0 comments
Labels

Comments

@dlangBugzillaToGithub
Copy link

Răzvan Ștefănescu reported this on 2015-12-16T08:28:48Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=15454

Description

Change the overflow type of muls and mulu from bool to the underlying integer type. Since these functions are intended to be treated as intrinsics, the overflow can be easily obtained directly from the x86 mul / arm umull instruction.

pure nothrow @nogc @safe uint mulu(uint x, uint y, ref uint overflow); 
pure nothrow @nogc @safe ulong mulu(ulong x, ulong y, ref ulong overflow);
pure nothrow @nogc @safe int muls(int x, int y, ref int overflow); 
pure nothrow @nogc @safe long muls(long x, long y, ref long overflow);
@thewilsonator thewilsonator added Severity:Enhancement Druntime Specific to druntime and removed enhancement labels Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants