This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libgfortran] fix for i386-darwin


On Thu, Mar 30, 2006 at 07:11:59PM +0200, François-Xavier Coudert wrote:
> +#ifdef __APPLE__
> +      cw_sse |= (_FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM | _FPU_MASK_OM
> +                | _FPU_MASK_UM | _FPU_MASK_PM ) << 7;
> +      if (options.fpe & GFC_FPE_INVALID) cw_sse &= ~(_FPU_MASK_IM << 7);
> +      if (options.fpe & GFC_FPE_DENORMAL) cw_sse &= ~(_FPU_MASK_DM << 7);
> +      if (options.fpe & GFC_FPE_ZERO) cw_sse &= ~(_FPU_MASK_ZM << 7);
> +      if (options.fpe & GFC_FPE_OVERFLOW) cw_sse &= ~(_FPU_MASK_OM << 7);
> +      if (options.fpe & GFC_FPE_UNDERFLOW) cw_sse &= ~(_FPU_MASK_UM << 7);
> +      if (options.fpe & GFC_FPE_PRECISION) cw_sse &= ~(_FPU_MASK_PM << 7);
> +      asm volatile ("ldmxcsr %0" : : "m" (cw_sse));
> +#else
>        if (options.fpe & GFC_FPE_INVALID) cw_sse |= 1 << 7;
>        if (options.fpe & GFC_FPE_DENORMAL) cw_sse |= 1 << 8;
>        if (options.fpe & GFC_FPE_ZERO) cw_sse |= 1 << 9;
> @@ -100,5 +111,6 @@
>        if (options.fpe & GFC_FPE_UNDERFLOW) cw_sse |= 1 << 11;
>        if (options.fpe & GFC_FPE_PRECISION) cw_sse |= 1 << 12;
>        asm volatile ("ldmxcsr %0" : : "m" (cw_sse));
> +#endif

What are you trying to fix here?  It's not like Apple has
some special brand of the ldmxcsr instruction...


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]