mirror of
https://github.com/golang/go
synced 2024-11-17 15:54:39 -07:00
internal/bytealg: fix Separator length check for Index/ppc64le
Modified condition in the ASM implementation of indexbody to determine if separator length crosses 16 bytes to BGT from BGE to avoid incorrectly crossing a page. Also fixed IndexString to invoke indexbodyp9 when on the POWER9 platform Change-Id: I0602a797cc75287990eea1972e9e473744f6f5a9 Reviewed-on: https://go-review.googlesource.com/c/go/+/356849 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> Trust: Keith Randall <khr@golang.org>
This commit is contained in:
parent
8b0bea993d
commit
6ec9a1da2d
@ -85,7 +85,7 @@ TEXT ·IndexString<ABIInternal>(SB),NOSPLIT|NOFRAME,$0-40
|
||||
MOVBZ internal∕cpu·PPC64+const_offsetPPC64HasPOWER9(SB), R7
|
||||
CMP R7, $1
|
||||
BNE power8
|
||||
BR indexbody<>(SB)
|
||||
BR indexbodyp9<>(SB)
|
||||
|
||||
#endif
|
||||
power8:
|
||||
@ -152,7 +152,7 @@ loadge16:
|
||||
ANDCC $15, R5, R9 // Find byte offset of sep
|
||||
ADD R9, R6, R10 // Add sep len
|
||||
CMP R10, $16 // Check if sep len+offset > 16
|
||||
BGE sepcross16 // Sep crosses 16 byte boundary
|
||||
BGT sepcross16 // Sep crosses 16 byte boundary
|
||||
|
||||
RLDICR $0, R5, $59, R8 // Adjust addr to 16 byte container
|
||||
VLOADSWAP(R8, R0, V0, V0_)// Load 16 bytes @R8 into V0
|
||||
@ -490,7 +490,7 @@ loadge16:
|
||||
ANDCC $15, R5, R9 // Find byte offset of sep
|
||||
ADD R9, R6, R10 // Add sep len
|
||||
CMP R10, $16 // Check if sep len+offset > 16
|
||||
BGE sepcross16 // Sep crosses 16 byte boundary
|
||||
BGT sepcross16 // Sep crosses 16 byte boundary
|
||||
|
||||
RLDICR $0, R5, $59, R8 // Adjust addr to 16 byte container
|
||||
LXVB16X (R8)(R0), V0_ // Load 16 bytes @R8 into V0
|
||||
|
Loading…
Reference in New Issue
Block a user