aboutsummaryrefslogtreecommitdiffstats
path: root/erts/configure.in
diff options
context:
space:
mode:
authorMartti Kuparinen <[email protected]>2010-06-22 12:08:54 +0300
committerBjörn Gustavsson <[email protected]>2010-08-13 11:09:10 +0200
commit2fb2a1e0b6f85f87035d5b160c330cea584e01fd (patch)
tree827f121b327d5fd008963ba5d4c19e484d181856 /erts/configure.in
parent871fdb232d7facc58c202ef81634a12fbdcfefb4 (diff)
downloadotp-2fb2a1e0b6f85f87035d5b160c330cea584e01fd.tar.gz
otp-2fb2a1e0b6f85f87035d5b160c330cea584e01fd.tar.bz2
otp-2fb2a1e0b6f85f87035d5b160c330cea584e01fd.zip
Add support for NetBSD
These are the current NetBSD pkgsrc patches.
Diffstat (limited to 'erts/configure.in')
-rw-r--r--erts/configure.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 157163fe0b..2c15b3ce19 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -2668,7 +2668,7 @@ static __inline__ int check_fpe(double f)
* Implement SIGFPE handler based on CPU/OS combination
*/
-#if (defined(__linux__) && (defined(__i386__) || defined(__x86_64__) || defined(__sparc__) || defined(__powerpc__))) || (defined(__DARWIN__) && (defined(__i386__) || defined(__x86_64__) || defined(__ppc__))) || (defined(__FreeBSD__) && (defined(__i386__) || defined(__x86_64__))) || (defined(__OpenBSD__) && defined(__x86_64__)) || (defined(__sun__) && defined(__x86_64__))
+#if (defined(__linux__) && (defined(__i386__) || defined(__x86_64__) || defined(__sparc__) || defined(__powerpc__))) || (defined(__DARWIN__) && (defined(__i386__) || defined(__x86_64__) || defined(__ppc__))) || (defined(__FreeBSD__) && (defined(__i386__) || defined(__x86_64__))) || ((defined(__OpenBSD__) || defined(__NetBSD__)) && defined(__x86_64__)) || (defined(__sun__) && defined(__x86_64__))
#if defined(__linux__) && defined(__i386__)
#if !defined(X86_FXSR_MAGIC)
@@ -2782,6 +2782,11 @@ static void fpe_sig_action(int sig, siginfo_t *si, void *puc)
struct fxsave64 *fxsave = uc->sc_fpstate;
fxsave->fx_mxcsr = 0x1F80;
fxsave->fx_fsw &= ~0xFF;
+#elif defined(__NetBSD__) && defined(__x86_64__)
+ mcontext_t *mc = &uc->uc_mcontext;
+ struct fxsave64 *fxsave = (struct fxsave64 *)&mc->__fpregs;
+ fxsave->fx_mxcsr = 0x1F80;
+ fxsave->fx_fsw &= ~0xFF;
#elif defined(__sun__) && defined(__x86_64__)
mcontext_t *mc = &uc->uc_mcontext;
struct fpchip_state *fpstate = &mc->fpregs.fp_reg_set.fpchip_state;