1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-10-12 19:04:54 +03:00

powerpc: Fix VSCR position in ucontext (bug 24088)

This patch fix VSCR position on ucontext. VSCR was read in the wrong
position on ucontext structure because it was ignoring the machine
endianess.

	[BZ #24088]
	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h (vscr_t): Added
	ifdef to fix read of VSCR.
	* sysdeps/powerpc/powerpc64/Makefile [$subdir == stdlib]: Add
	tst-ucontext-ppc64-vscr.c to test list.
	* sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c: New test file.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
This commit is contained in:
Rogerio Alves
2018-11-05 10:18:38 -06:00
committed by Tulio Magno Quites Machado Filho
parent 5494af04ad
commit 0bc9bdf159
4 changed files with 102 additions and 0 deletions

View File

@@ -98,8 +98,13 @@ typedef double fpregset_t[__NFPREG];
a whole quadword speedup save/restore. */
typedef struct _libc_vscr
{
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
unsigned int __pad[3];
unsigned int __ctx(vscr_word);
#else
unsigned int __ctx(vscr_word);
unsigned int __pad[3];
#endif
} vscr_t;
/* Container for Altivec/VMX registers and status.