1
0
mirror of https://github.com/golang/go synced 2024-11-23 12:20:12 -07:00
go/src
Michael Munday 2c1b5130aa cmd/compile: add math/bits.{Add,Sub}64 intrinsics on s390x
This CL adds intrinsics for the 64-bit addition and subtraction
functions in math/bits. These intrinsics use the condition code
to propagate the carry or borrow bit.

To make the carry chains more efficient I've removed the
'clobberFlags' property from most of the load and store
operations. Originally these ops did clobber flags when using
offsets that didn't fit in a signed 20-bit integer, however
that is no longer true.

As with other platforms the intrinsics are faster when executed
in a chain rather than a loop because currently we need to spill
and restore the carry bit between each loop iteration. We may
be able to reduce the need to do this on s390x (e.g. by using
compare-and-branch instructions that do not clobber flags) in the
future.

name           old time/op  new time/op  delta
Add64          1.21ns ± 2%  2.03ns ± 2%  +67.18%  (p=0.000 n=7+10)
Add64multiple  2.98ns ± 3%  1.03ns ± 0%  -65.39%  (p=0.000 n=10+9)
Sub64          1.23ns ± 4%  2.03ns ± 1%  +64.85%  (p=0.000 n=10+10)
Sub64multiple  3.73ns ± 4%  1.04ns ± 1%  -72.28%  (p=0.000 n=10+8)

Change-Id: I913bbd5e19e6b95bef52f5bc4f14d6fe40119083
Reviewed-on: https://go-review.googlesource.com/c/go/+/174303
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2019-05-03 10:41:15 +00:00
..
archive
bufio
builtin
bytes strings, bytes: add ToValidUTF8 2019-05-01 18:31:47 +00:00
cmd cmd/compile: add math/bits.{Add,Sub}64 intrinsics on s390x 2019-05-03 10:41:15 +00:00
compress
container
context
crypto crypto/cipher: disable broken js/wasm test from nodejs v8 to v12 upgrade 2019-05-02 23:12:11 +00:00
database/sql database/sql: add NullInt32 2019-04-26 21:54:41 +00:00
debug all: add new GOOS=illumos, split out of GOOS=solaris 2019-04-30 16:59:13 +00:00
encoding encoding/gob: adding missing fuzz skip to one of the fuzz tests 2019-04-30 18:20:58 +00:00
errors errors: fix comment referencing the Wrapper interface 2019-05-02 04:44:36 +00:00
expvar
flag
fmt
go sort: simplify bootstrap 2019-05-02 20:30:31 +00:00
hash
html html: add a Fuzz function 2019-04-30 15:48:46 +00:00
image
index/suffixarray index/suffixarray: add 32-bit implementation 2019-05-01 15:19:07 +00:00
internal internal/cpu: add detection for the new ECDSA and EDDSA capabilities on s390x 2019-04-30 23:31:26 +00:00
io
log
math math/big: document Int.String 2019-05-03 03:25:26 +00:00
mime
net net/http: skip flaky TestTransportMaxConnsPerHost for now 2019-05-02 21:46:14 +00:00
os os,time: fix tests on iOS 2019-05-01 13:53:44 +00:00
path
plugin
reflect reflect: MakeFunc: allow assignment conversions on values returned from the wrapped function 2019-05-02 22:17:31 +00:00
regexp
runtime runtime: look for idle p to run current goroutine when switching to GC or traceReader 2019-05-01 16:10:05 +00:00
sort sort: simplify bootstrap 2019-05-02 20:30:31 +00:00
strconv strconv: Document ParseFloat's special cases 2019-04-29 11:07:31 +00:00
strings strings, bytes: add ToValidUTF8 2019-05-01 18:31:47 +00:00
sync
syscall syscall: on wasm, do not use typed array asynchronously 2019-04-30 22:41:20 +00:00
testdata
testing testing: delay flag registration; move to an Init function 2019-04-29 19:54:30 +00:00
text all: remove a few unused parameters 2019-04-29 13:31:54 +00:00
time os,time: fix tests on iOS 2019-05-01 13:53:44 +00:00
unicode all: update to Unicode 11 2019-04-25 20:33:22 +00:00
unsafe
vendor vendor: pull in text@v0.3.2 2019-04-26 19:27:51 +00:00
all.bash
all.bat
all.rc
bootstrap.bash bootstrap.bash: preserve file times when copying 2019-04-27 14:36:00 +00:00
buildall.bash
clean.bash
clean.bat
clean.rc
cmp.bash
go.mod vendor: pull in text@v0.3.2 2019-04-26 19:27:51 +00:00
go.sum vendor: pull in text@v0.3.2 2019-04-26 19:27:51 +00:00
iostest.bash
make.bash
make.bat
Make.dist
make.rc
naclmake.bash
nacltest.bash
race.bash
race.bat
run.bash
run.bat
run.rc