Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151761327
D27453.id.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
D27453.id.diff
View Options
Index: head/sys/powerpc/include/cpufunc.h
===================================================================
--- head/sys/powerpc/include/cpufunc.h
+++ head/sys/powerpc/include/cpufunc.h
@@ -163,21 +163,21 @@
mtspr(TBR_TBWL, (uint32_t)(time & 0xffffffff));
}
-
static __inline register_t
mffs(void)
{
- register_t value;
+ uint64_t value;
__asm __volatile ("mffs 0; stfd 0,0(%0)"
:: "b"(&value));
- return (value);
+ return ((register_t)value);
}
static __inline void
-mtfsf(register_t value)
+mtfsf(uint64_t value)
{
+
__asm __volatile ("lfd 0,0(%0); mtfsf 0xff,0"
:: "b"(&value));
}
Index: head/sys/powerpc/powerpc/exec_machdep.c
===================================================================
--- head/sys/powerpc/powerpc/exec_machdep.c
+++ head/sys/powerpc/powerpc/exec_machdep.c
@@ -239,14 +239,13 @@
usfp = (void *)((sp - rndfsize) & ~0xFul);
}
- /*
+ /*
* Set Floating Point facility to "Ignore Exceptions Mode" so signal
- * handler can run.
+ * handler can run.
*/
if (td->td_pcb->pcb_flags & PCB_FPU)
tf->srr1 = tf->srr1 & ~(PSL_FE0 | PSL_FE1);
-
/*
* Set up the registers to return to sigcode.
*
@@ -334,10 +333,10 @@
if (error != 0)
return (error);
- /*
+ /*
* Save FPU state if needed. User may have changed it on
- * signal handler
- */
+ * signal handler
+ */
if (uc.uc_mcontext.mc_srr1 & PSL_FP)
save_fpu(td);
Index: head/sys/powerpc/powerpc/fpu.c
===================================================================
--- head/sys/powerpc/powerpc/fpu.c
+++ head/sys/powerpc/powerpc/fpu.c
@@ -209,7 +209,6 @@
save_fpu_int(td);
}
-
/*
* Clear Floating-Point Status and Control Register
*/
@@ -217,19 +216,18 @@
cleanup_fpscr()
{
register_t msr;
- msr = mfmsr();
- mtmsr(msr | PSL_FP | PSL_VSX);
+ msr = mfmsr();
+ mtmsr(msr | PSL_FP);
mtfsf(0);
isync();
mtmsr(msr);
}
-
/*
- * * Returns the current fp exception
- * */
+ * Get the current fp exception
+ */
u_int
get_fpu_exception(struct thread *td)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 11, 12:05 PM (3 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31289470
Default Alt Text
D27453.id.diff (1 KB)
Attached To
Mode
D27453: [PowerPC] Floating-point exception trap followup
Attached
Detach File
Event Timeline
Log In to Comment