Page MenuHomeFreeBSD

D61544.1794748816.diff
No OneTemporary

Authored By
Unknown
Size
831 B
Referenced Files
None
Subscribers
None

D61544.1794748816.diff

diff --git a/sys/powerpc/powerpc/altivec.c b/sys/powerpc/powerpc/altivec.c
--- a/sys/powerpc/powerpc/altivec.c
+++ b/sys/powerpc/powerpc/altivec.c
@@ -39,8 +39,10 @@
#include <sys/limits.h>
#include <machine/altivec.h>
+#include <machine/cpufunc.h>
#include <machine/pcb.h>
#include <machine/psl.h>
+#include <machine/spr.h>
static void
save_vec_int(struct thread *td)
@@ -80,6 +82,7 @@
*/
__asm __volatile("mfvscr 0; vspltw 0,0,3; stvewx 0,0,%0"
:: "b"(&pcb->pcb_vec.vscr));
+ pcb->pcb_vec.vrsave = mfspr(SPR_VRSAVE);
/*
* Disable vector unit again
@@ -126,6 +129,8 @@
msr = mfmsr();
mtmsr(msr | PSL_VEC);
+ mtspr(SPR_VRSAVE, pcb->pcb_vec.vrsave);
+
/*
* Restore VSCR by first loading it into a vector and then into VSCR.
* (this needs to done before loading the user's vector registers

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 15, 1:20 PM (23 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41742648
Default Alt Text
D61544.1794748816.diff (831 B)

Event Timeline