diff options
author | Archana R <aravind5@in.ibm.com> | 2021-10-19 04:11:46 -0500 |
---|---|---|
committer | Lynn Boger <laboger@linux.vnet.ibm.com> | 2021-10-21 15:45:05 +0000 |
commit | 6ec9a1da2d48fdc94093feb0ea3465129e11fc24 (patch) | |
tree | a4a261cb76b65760177ccee899a035a132976dd8 /src/internal | |
parent | 8b0bea993d452ef7861642a9c04bae213246ded1 (diff) | |
download | go-6ec9a1da2d48fdc94093feb0ea3465129e11fc24.tar.gz go-6ec9a1da2d48fdc94093feb0ea3465129e11fc24.zip |
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>
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/bytealg/index_ppc64x.s | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/internal/bytealg/index_ppc64x.s b/src/internal/bytealg/index_ppc64x.s index f587a8ae25..ab47495427 100644 --- a/src/internal/bytealg/index_ppc64x.s +++ b/src/internal/bytealg/index_ppc64x.s @@ -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 |