PERFORCE change 32340 for review
Peter Wemm
peter at FreeBSD.org
Sun Jun 1 16:58:39 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=32340
Change 32340 by peter at peter_hammer on 2003/06/01 16:57:47
save fpu state
Affected files ...
.. //depot/projects/hammer/lib/libc_r/uthread/pthread_private.h#8 edit
Differences ...
==== //depot/projects/hammer/lib/libc_r/uthread/pthread_private.h#8 (text+ko) ====
@@ -95,8 +95,14 @@
#define SET_STACK_SJB(sjb, stk) (sjb)[0]._sjb[2] = (long)(stk)
#define SET_STACK_UC(ucp, stk) (ucp)->uc_mcontext.mc_rsp = (long)(stk)
#define FP_SAVE_UC(ucp) do { \
+ char *fdata; \
+ fdata = (char *) (ucp)->uc_mcontext.mc_fpstate; \
+ __asm__("fxsave %0": :"m"(*fdata)); \
} while (0)
#define FP_RESTORE_UC(ucp) do { \
+ char *fdata; \
+ fdata = (char *) (ucp)->uc_mcontext.mc_fpstate; \
+ __asm__("fxrstor %0": :"m"(*fdata)); \
} while (0)
#define SET_RETURN_ADDR_JB(jb, ra) (jb)[0]._jb[0] = (long)(ra)
#elif defined(__alpha__)
More information about the p4-projects
mailing list