Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F176096387
D60754.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D60754.diff
View Options
diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c
--- a/sys/powerpc/powerpc/exec_machdep.c
+++ b/sys/powerpc/powerpc/exec_machdep.c
@@ -422,13 +422,21 @@
for (i = 0; i < 32; i++)
memcpy(&mcp->mc_fpreg[i], &pcb->pcb_fpu.fpr[i].fpr,
sizeof(double));
- }
- if (pcb->pcb_flags & PCB_VSX) {
- mcp->mc_flags |= _MC_VS_VALID;
- for (i = 0; i < 32; i++)
- memcpy(&mcp->mc_vsxfpreg[i],
- &pcb->pcb_fpu.fpr[i].vsr[2], sizeof(double));
+ /*
+ * The second halves of VSR0-31 in the PCB are current
+ * whenever the FP state is: VSX instructions cannot run
+ * without PCB_VSX, and save_fpu() stores them when it is
+ * set. Export them regardless of whether the thread owns
+ * VSX at this moment, or a signal delivered right after a
+ * sigreturn loses them.
+ */
+ if (cpu_features & PPC_FEATURE_HAS_VSX) {
+ mcp->mc_flags |= _MC_VS_VALID;
+ for (i = 0; i < 32; i++)
+ memcpy(&mcp->mc_vsxfpreg[i],
+ &pcb->pcb_fpu.fpr[i].vsr[2], sizeof(double));
+ }
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 17, 2:03 AM (3 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40910646
Default Alt Text
D60754.diff (1 KB)
Attached To
Mode
D60754: powerpc: keep the VSX halves of the FPRs across back-to-back signals
Attached
Detach File
Event Timeline
Log In to Comment