• 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
..
addr2line Loading commit data...
api Loading commit data...
asm Loading commit data...
buildid Loading commit data...
cgo Loading commit data...
compile Loading commit data...
cover Loading commit data...
dist Loading commit data...
doc Loading commit data...
fix Loading commit data...
go Loading commit data...
gofmt Loading commit data...
internal Loading commit data...
link Loading commit data...
nm Loading commit data...
objdump Loading commit data...
pack Loading commit data...
pprof Loading commit data...
test2json Loading commit data...
trace Loading commit data...
vendor Loading commit data...
vet Loading commit data...