go/src/go
Martin Möhrmann c9130cae9a runtime/internal/math: add multiplication with overflow check
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: Keith Randall <khr@golang.org>
2018-10-15 17:58:06 +00:00
..
ast ast: refer to "embedded" rather than "anonymous" fields in 2018-06-26 19:40:44 +00:00
build runtime/internal/math: add multiplication with overflow check 2018-10-15 17:58:06 +00:00
constant all: fix a bunch of misspellings 2018-10-06 15:40:03 +00:00
doc go/doc: add new mode bit PreserveAST to control clearing of data in AST 2018-10-10 23:40:18 +00:00
format doc: explain minor change to gofmt in go1.11 2018-07-20 19:59:12 +00:00
importer go/importer,os/exec: use testenv.GoToolPath 2018-01-10 20:24:15 +00:00
internal go/internal/gccgo: remove unused test file 2018-09-27 04:45:17 +00:00
parser all: fix a bunch of misspellings 2018-10-06 15:40:03 +00:00
printer all: fix a bunch of misspellings 2018-10-06 15:40:03 +00:00
scanner go/scanner: don't return token.INVALID for ".." sequence 2018-10-11 20:26:55 +00:00
token go/token: add (*File).LineStart, which returns Pos for a given line 2018-09-10 18:29:25 +00:00
types go/types: remove a test case and update comment 2018-10-12 16:57:39 +00:00