This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [fortran, patch] IEEE intrinsic modules
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: FX Coudert <fxcoudert at gmail dot com>, Fortran List <fortran at gcc dot gnu dot org>
- Date: Thu, 5 Jun 2014 09:01:59 +0200
- Subject: Re: [fortran, patch] IEEE intrinsic modules
- Authentication-results: sourceware.org; auth=none
Hello!
> +int
> get_fpu_except_flags (void)
> {
> unsigned short cw;
> int excepts;
> int result = 0;
>
> - __asm__ __volatile__ ("fnstsw\t%0" : "=a" (cw));
> + __asm__ __volatile__ ("fnstsw\t%0" : "=m" (cw));
> excepts = cw;
>
> if (has_sse())
You can use "=am" constraint here, and the compiler will be free to
choose the most appropriate form.
Also, you should use __asm__ __volatile__ consistently in the headers.
Uros.