Commit dd570237 authored by Anton Blanchard's avatar Anton Blanchard Committed by Michael Ellerman

powerpc: Improve comment explaining why we modify VRSAVE

The comment explaining why we modify VRSAVE is misleading, glibc
does rely on the behaviour. Update the comment.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Reviewed-by: default avatarCyril Bur <cyrilbur@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 1a1cee84
...@@ -70,10 +70,11 @@ _GLOBAL(load_up_altivec) ...@@ -70,10 +70,11 @@ _GLOBAL(load_up_altivec)
MTMSRD(r5) /* enable use of AltiVec now */ MTMSRD(r5) /* enable use of AltiVec now */
isync isync
/* Hack: if we get an altivec unavailable trap with VRSAVE /*
* set to all zeros, we assume this is a broken application * While userspace in general ignores VRSAVE, glibc uses it as a boolean
* that fails to set it properly, and thus we switch it to * to optimise userspace context save/restore. Whenever we take an
* all 1's * altivec unavailable exception we must set VRSAVE to something non
* zero. Set it to all 1s. See also the programming note in the ISA.
*/ */
mfspr r4,SPRN_VRSAVE mfspr r4,SPRN_VRSAVE
cmpwi 0,r4,0 cmpwi 0,r4,0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment