• Martin Möhrmann's avatar
    runtime/internal/math: add multiplication with overflow check · c9130cae
    Martin Möhrmann authored
    This CL adds a new internal math package for use by the runtime.
    The new package exports a MulUintptr function with uintptr arguments
    a and b and returns uintptr(a*b) and whether the full-width product
    x*y does overflow the uintptr value range (uintptr(x*y) != x*y).
    
    Uses of MulUinptr in the runtime and intrinsics for performance
    will be added in followup CLs.
    
    Updates #21588
    
    Change-Id: Ia5a02eeabc955249118e4edf68c67d9fc0858058
    Reviewed-on: https://go-review.googlesource.com/c/91755
    Run-TryBot: Martin Möhrmann <moehrmann@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    c9130cae
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...