Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177565261
D61544.1794748280.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
831 B
Referenced Files
None
Subscribers
None
D61544.1794748280.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 15, 1:11 PM (23 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41742648
Default Alt Text
D61544.1794748280.diff (831 B)
Attached To
Mode
D61544: powerpc: save and restore VRSAVE with the vector state
Attached
Detach File
Event Timeline