Issue 15454 - core.checkedint enhancement
Summary: core.checkedint enhancement
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: All All
: P4 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-16 08:28 UTC by Răzvan Ștefănescu
Modified: 2024-12-07 13:36 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Răzvan Ștefănescu 2015-12-16 08:28:48 UTC
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);
Comment 1 dlangBugzillaToGithub 2024-12-07 13:36:04 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/17319

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB