summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Leonard <d@cvs.openbsd.org>1999-01-10 22:59:34 +0000
committerDavid Leonard <d@cvs.openbsd.org>1999-01-10 22:59:34 +0000
commit53dc382d6829fef41f54072178953eeef7dc6919 (patch)
tree2de8442854d0a34d4c0cad482de399e23474f397 /lib
parentdef0d6c22617b70f7bbe487bbd31c9e3a66c48c8 (diff)
use <machine/reg>
Diffstat (limited to 'lib')
-rw-r--r--lib/libc_r/arch/i386/uthread_machdep.h10
-rw-r--r--lib/libpthread/arch/i386/uthread_machdep.h10
2 files changed, 12 insertions, 8 deletions
diff --git a/lib/libc_r/arch/i386/uthread_machdep.h b/lib/libc_r/arch/i386/uthread_machdep.h
index 088ff200509..652f32d4285 100644
--- a/lib/libc_r/arch/i386/uthread_machdep.h
+++ b/lib/libc_r/arch/i386/uthread_machdep.h
@@ -1,20 +1,22 @@
/*
* OpenBSD/i386 machine-dependent thread macros
*
- * $OpenBSD: uthread_machdep.h,v 1.2 1998/11/09 03:13:13 d Exp $
+ * $OpenBSD: uthread_machdep.h,v 1.3 1999/01/10 22:59:33 d Exp $
*/
+#include <machine/reg.h>
+
/* save the floating point state of a thread */
#define _thread_machdep_save_float_state(thr) \
{ \
- char *fdata = (char*)((thr)->_machdep.saved_fp); \
+ char *fdata = (char*)(&(thr)->_machdep.saved_fp); \
__asm__("fsave %0"::"m" (*fdata)); \
}
/* restore the floating point state of a thread */
#define _thread_machdep_restore_float_state(thr) \
{ \
- char *fdata = (char*)((thr)->_machdep.saved_fp); \
+ char *fdata = (char*)(&(thr)->_machdep.saved_fp); \
__asm__("frstor %0"::"m" (*fdata)); \
}
@@ -33,6 +35,6 @@
#define _thread_machdep_setjmp(a) setjmp(a)
struct _machdep_struct {
- char saved_fp[108];
+ struct fpreg saved_fp;
};
diff --git a/lib/libpthread/arch/i386/uthread_machdep.h b/lib/libpthread/arch/i386/uthread_machdep.h
index 088ff200509..652f32d4285 100644
--- a/lib/libpthread/arch/i386/uthread_machdep.h
+++ b/lib/libpthread/arch/i386/uthread_machdep.h
@@ -1,20 +1,22 @@
/*
* OpenBSD/i386 machine-dependent thread macros
*
- * $OpenBSD: uthread_machdep.h,v 1.2 1998/11/09 03:13:13 d Exp $
+ * $OpenBSD: uthread_machdep.h,v 1.3 1999/01/10 22:59:33 d Exp $
*/
+#include <machine/reg.h>
+
/* save the floating point state of a thread */
#define _thread_machdep_save_float_state(thr) \
{ \
- char *fdata = (char*)((thr)->_machdep.saved_fp); \
+ char *fdata = (char*)(&(thr)->_machdep.saved_fp); \
__asm__("fsave %0"::"m" (*fdata)); \
}
/* restore the floating point state of a thread */
#define _thread_machdep_restore_float_state(thr) \
{ \
- char *fdata = (char*)((thr)->_machdep.saved_fp); \
+ char *fdata = (char*)(&(thr)->_machdep.saved_fp); \
__asm__("frstor %0"::"m" (*fdata)); \
}
@@ -33,6 +35,6 @@
#define _thread_machdep_setjmp(a) setjmp(a)
struct _machdep_struct {
- char saved_fp[108];
+ struct fpreg saved_fp;
};