powerpc: Fix VSX register number on __strncpy_power9 [BZ #29197]
commit0218463dd8265ed937622f88ac68c7d984fe0cfc
authorMatheus Castanho <msc@linux.ibm.com>
Tue, 7 Jun 2022 13:27:26 +0000 (7 10:27 -0300)
committerMatheus Castanho <msc@linux.ibm.com>
Tue, 7 Jun 2022 18:07:25 +0000 (7 15:07 -0300)
treea253402c7ff3c83a003d9a2dda48c239eac8ddb5
parenteea282d9c665392d6959f6d7112ba4bef27701c9
powerpc: Fix VSX register number on __strncpy_power9 [BZ #29197]

__strncpy_power9 initializes VR 18 with zeroes to be used throughout the
code, including when zero-padding the destination string. However, the
v18 reference was mistakenly being used for stxv and stxvl, which take a
VSX vector as operand. The code ended up using the uninitialized VSR 18
register by mistake.

Both occurrences have been changed to use the proper VSX number for VR 18
(i.e. VSR 50).

Tested on powerpc, powerpc64 and powerpc64le.

Signed-off-by: Kewen Lin <linkw@gcc.gnu.org>
sysdeps/powerpc/powerpc64/le/power9/strncpy.S