powerpc/setjmp: Fix 64-bit buffer alignment
The rlwinm is a word-size instruction which clears the remaining 32 bits of a 64-bit register. Use clrrdi in 64-bit configurations.
This commit is contained in:
parent
59b8ee7d70
commit
5c79aa4b22
|
@ -8,11 +8,19 @@
|
|||
FUNC_START(setjmp)
|
||||
#ifdef __ALTIVEC__
|
||||
addi 3,3,15 # align Altivec to 16 byte boundary
|
||||
#if __powerpc64__
|
||||
clrrdi 3,3,4
|
||||
#else
|
||||
rlwinm 3,3,0,0,27
|
||||
#endif
|
||||
#else
|
||||
addi 3,3,7 # align to 8 byte boundary
|
||||
#if __powerpc64__
|
||||
clrrdi 3,3,3
|
||||
#else
|
||||
rlwinm 3,3,0,0,28
|
||||
#endif
|
||||
#endif
|
||||
#if __SPE__
|
||||
/* If we are E500, then save 64-bit registers. */
|
||||
evstdd 1,0(3) # offset 0
|
||||
|
@ -193,11 +201,19 @@ FUNC_END(setjmp)
|
|||
FUNC_START(longjmp)
|
||||
#ifdef __ALTIVEC__
|
||||
addi 3,3,15 # align Altivec to 16 byte boundary
|
||||
#if __powerpc64__
|
||||
clrrdi 3,3,4
|
||||
#else
|
||||
rlwinm 3,3,0,0,27
|
||||
#endif
|
||||
#else
|
||||
addi 3,3,7 # align to 8 byte boundary
|
||||
#if __powerpc64__
|
||||
clrrdi 3,3,3
|
||||
#else
|
||||
rlwinm 3,3,0,0,28
|
||||
#endif
|
||||
#endif
|
||||
#if __SPE__
|
||||
/* If we are E500, then restore 64-bit registers. */
|
||||
evldd 1,0(3) # offset 0
|
||||
|
|
Loading…
Reference in New Issue