]> git.ipfire.org Git - thirdparty/glibc.git/commit
powerpc: Fix VSX register number on __strncpy_power9 [BZ #29197]
authorMatheus Castanho <msc@linux.ibm.com>
Tue, 7 Jun 2022 13:27:26 +0000 (10:27 -0300)
committerMatheus Castanho <msc@linux.ibm.com>
Tue, 7 Jun 2022 18:42:14 +0000 (15:42 -0300)
commit82c7441f04e3c2a653ee29672731e040a1799c6b
tree5400a6785e25b46750aeaafa06b539b089e36afd
parent69f16619e7119e26d70c00ac8b8750ed350147a3
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>
(cherry picked from commit 0218463dd8265ed937622f88ac68c7d984fe0cfc)
sysdeps/powerpc/powerpc64/le/power9/strncpy.S