Initialise the FPSCR to a sane value.
This commit is contained in:
parent
3f4a1907c6
commit
11e9fa3a9b
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: _lwp.c,v 1.1 2003/01/19 23:05:01 scw Exp $ */
|
||||
/* $NetBSD: _lwp.c,v 1.2 2003/01/20 20:09:59 scw Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -40,6 +40,7 @@
|
|||
#include <ucontext.h>
|
||||
#include <lwp.h>
|
||||
#include <stdlib.h>
|
||||
#include <machine/fpu.h>
|
||||
|
||||
void
|
||||
_lwp_makecontext(ucontext_t *u, void (*start)(void *),
|
||||
|
@ -87,4 +88,9 @@ _lwp_makecontext(ucontext_t *u, void (*start)(void *),
|
|||
gr[_REG_TR(5)] = 0;
|
||||
gr[_REG_TR(6)] = 0;
|
||||
gr[_REG_TR(7)] = 0;
|
||||
|
||||
/*
|
||||
* Ensure the FPSCR is valid
|
||||
*/
|
||||
u->uc_mcontext.__fpregs.__fp_scr = SH5_FPSCR_DN_FLUSH_ZERO;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: makecontext.c,v 1.1 2003/01/19 23:05:02 scw Exp $ */
|
||||
/* $NetBSD: makecontext.c,v 1.2 2003/01/20 20:09:59 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2003 Wasabi Systems, Inc.
|
||||
|
@ -38,7 +38,7 @@
|
|||
#include <sys/cdefs.h>
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: makecontext.c,v 1.1 2003/01/19 23:05:02 scw Exp $");
|
||||
__RCSID("$NetBSD: makecontext.c,v 1.2 2003/01/20 20:09:59 scw Exp $");
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -47,6 +47,7 @@ __RCSID("$NetBSD: makecontext.c,v 1.1 2003/01/19 23:05:02 scw Exp $");
|
|||
#include "extern.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <machine/fpu.h>
|
||||
|
||||
void
|
||||
makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
|
||||
|
@ -94,6 +95,11 @@ makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
|
|||
gr[_REG_TR(6)] = 0;
|
||||
gr[_REG_TR(7)] = 0;
|
||||
|
||||
/*
|
||||
* Ensure the FPSCR is valid
|
||||
*/
|
||||
ucp->uc_mcontext.__fpregs.__fp_scr = SH5_FPSCR_DN_FLUSH_ZERO;
|
||||
|
||||
va_start(ap, argc);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue