FreeBSD Bugzilla – Attachment 135070 Details for
Bug 179857
Fix for math/gsl on PowerPC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.94 KB, created by
Justin Hibbits
on 2013-06-23 03:00:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Justin Hibbits
Created:
2013-06-23 03:00:00 UTC
Size:
1.94 KB
patch
obsolete
>--- ieee-utils/fp-freebsd.c.old 2013-06-22 10:07:01.000000000 -0700 >+++ ieee-utils/fp-freebsd.c 2013-06-22 18:43:24.000000000 -0700 >@@ -24,23 +24,37 @@ > int > gsl_ieee_set_mode (int precision, int rounding, int exception_mask) > { >+#ifndef __ppc__ > fp_prec_t prec = 0 ; >+#endif > fp_except_t mode = 0 ; > fp_rnd_t rnd = 0 ; > > switch (precision) > { > case GSL_IEEE_SINGLE_PRECISION: >+#ifdef __ppc__ >+ GSL_ERROR ("powerpc only supports default precision rounding", GSL_EUNSUP); >+#else > prec = FP_PS; > fpsetprec(prec); >+#endif > break ; > case GSL_IEEE_DOUBLE_PRECISION: >+#ifdef __ppc__ >+ GSL_ERROR ("powerpc only supports default precision rounding", GSL_EUNSUP); >+#else > prec = FP_PD; > fpsetprec(prec); >+#endif > break ; > case GSL_IEEE_EXTENDED_PRECISION: >+#ifdef __ppc__ >+ GSL_ERROR ("powerpc only supports default precision rounding", GSL_EUNSUP); >+#else > prec = FP_PE; > fpsetprec(prec); >+#endif > break ; > } > >@@ -69,13 +83,27 @@ > > /* Turn on all the exceptions apart from 'inexact' */ > >- mode = FP_X_INV | FP_X_DNML | FP_X_DZ | FP_X_OFL | FP_X_UFL ; >+ mode = FP_X_INV | FP_X_DZ | FP_X_OFL | FP_X_UFL ; >+#ifndef __ppc__ >+ mode |= FP_X_DNML; >+#endif > > if (exception_mask & GSL_IEEE_MASK_INVALID) > mode &= ~ FP_X_INV ; > > if (exception_mask & GSL_IEEE_MASK_DENORMALIZED) >+#ifdef __ppc__ >+ { >+ /* Do nothing */ >+ } >+ else >+ { >+ GSL_ERROR ("powerpc does not support the denormalized operand exception. " >+ "Use 'mask-denormalized' to work around this.", GSL_EUNSUP) ; >+ } >+#else > mode &= ~ FP_X_DNML ; >+#endif > > if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) > mode &= ~ FP_X_DZ ; >@@ -88,7 +116,11 @@ > > if (exception_mask & GSL_IEEE_TRAP_INEXACT) > { >+#ifdef __ppc__ >+ GSL_ERROR ("powerpc does not support traps for inexact operations", GSL_EUNSUP) ; >+#else > mode |= FP_X_IMP ; >+#endif > } > else > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 179857
: 135070