]> Cypherpunks repositories - gostls13.git/commit
internal/bytealg: fix bug in index function for ppc64le/power9
authorArchana R <aravind5@in.ibm.com>
Fri, 28 Oct 2022 07:42:39 +0000 (02:42 -0500)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Mon, 31 Oct 2022 12:52:07 +0000 (12:52 +0000)
commit6774ddfec758ecf2cc64d58392c438dd64660a00
treeb48128b5261ca6bd8e511334c67ede2d9f76e007
parente09bbaec69a8ff960110e13eabb3bef5331ecb0c
internal/bytealg: fix bug in index function for ppc64le/power9

The index function was not handling certain corner cases where there
were two more bytes to be examined in the tail end of the string to
complete the comparison. Fix code to ensure that when the string has
to be shifted two more times the correct bytes are examined.
Also hoisted vsplat to V10 so that all paths use the correct value.
Some comments had incorrect register names and corrected the same.
Added the strings that were failing to strings test for verification.

Fixes #56457

Change-Id: Idba7cbc802e3d73c8f4fe89309871cc8447792f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/446135
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Archana Ravindar <ravindararchana@gmail.com>
src/internal/bytealg/index_ppc64x.s
src/strings/strings_test.go