PowerPC LE setjmp/longjmp
authorAnton Blanchard <anton@au1.ibm.com>
Sat, 17 Aug 2013 09:04:40 +0000 (18:34 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 4 Oct 2013 01:07:59 +0000 (10:37 +0930)
commitbe1e5d311342e08ae1f8013342df27b7ded2c156
treeccf1ca254c3aa1392262c72de0b960eb1ec7ec21
parentfef13a78ea30d4c26d6bab48d731ebe864ee31b0
PowerPC LE setjmp/longjmp
http://sourceware.org/ml/libc-alpha/2013-08/msg00089.html

Little-endian fixes for setjmp/longjmp.  When writing these I noticed
the setjmp code corrupts the non volatile VMX registers when using an
unaligned buffer.  Anton fixed this, and also simplified it quite a
bit.

The current code uses boilerplate for the case where we want to store
16 bytes to an unaligned address.  For that we have to do a
read/modify/write of two aligned 16 byte quantities.  In our case we
are storing a bunch of back to back data (consective VMX registers),
and only the start and end of the region need the read/modify/write.

[BZ #15723]
* sysdeps/powerpc/jmpbuf-offsets.h: Comment fix.
* sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Correct
_dl_hwcap access for little-endian.
* sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise.  Don't
destroy vmx regs when saving unaligned.
* sysdeps/powerpc/powerpc64/__longjmp-common.S: Correct CR load.
* sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise CR save.  Don't
destroy vmx regs when saving unaligned.
ChangeLog
sysdeps/powerpc/jmpbuf-offsets.h
sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S
sysdeps/powerpc/powerpc32/fpu/setjmp-common.S
sysdeps/powerpc/powerpc64/__longjmp-common.S
sysdeps/powerpc/powerpc64/setjmp-common.S