]> Cypherpunks repositories - gostls13.git/commit
math/big: remove the s390x assembly for shlVU and shrVU
authorJonathan Albrecht <jonathan.albrecht@ibm.com>
Wed, 2 Dec 2020 15:44:10 +0000 (10:44 -0500)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 3 Dec 2020 18:43:06 +0000 (18:43 +0000)
commitb1369d5862bc78eaa902ae637c874e6a6133f1f9
tree0f48af29d38da328a8b88c27950a321f6abb8032
parentdda2991c2ea0c5914714469c4defc2562a907230
math/big: remove the s390x assembly for shlVU and shrVU

The s390x assembly for shlVU does a forward copy when the shift amount s
is 0. This causes corruption of the result z when z is aliased to the
input x.

This fix removes the s390x assembly for both shlVU and shrVU so the pure
go implementations will be used.

Test cases have been added to the existing TestShiftOverlap test to
cover shift values of 0, 1 and (_W - 1).

Fixes #42838

Change-Id: I75ca0e98f3acfaa6366a26355dcd9dd82499a48b
Reviewed-on: https://go-review.googlesource.com/c/go/+/274442
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Trust: Robert Griesemer <gri@golang.org>
src/math/big/arith_s390x.s
src/math/big/arith_test.go