Failure introduced by the sahf patch(es) (was: Re: [Bug fortran/29975] [meta-bugs] ICEs with CP2K)

H. J. Lu hjl@lucon.org
Wed Mar 14 16:11:00 GMT 2007


On Wed, Mar 14, 2007 at 04:23:34PM +0100, Uros Bizjak wrote:
> On 3/14/07, FX Coudert <fxcoudert@gmail.com> wrote:
> 
> >> there seems to be a new gcc error on CP2K:
> >>
> >> gfortran -c -O3 -ftree-loop-linear -ftree-vectorize -ffast-math -
> >> march=opteron
> >> -msse2 fparser.f90
> >>
> >> /tmp/ccNk6D7G.s: Assembler messages:
> >> /tmp/ccNk6D7G.s:820: Error: suffix or operands invalid for `sahf'
> >
> >There has been a recent addition to add this "sahf" to the
> >instructions used by the i386 back-end.
> 
> This is mine, but from asm dump:
> 
> .L120:
>        fprem
>        fnstsw  %ax
>        sahf
>        jp      .L120
>        fstp    %st(1)
>        xorpd   %xmm2, %xmm2
> 
> This is perfectly good asm for MOD() a.k.a. fmod() function.

64bit sahf was enabled by

http://sourceware.org/ml/binutils/2004-11/msg00313.html

I think we should either use .byte with a commment and check if
assembler supports 64bit sahf if we want to generate 64bit sahf.


H.J.



More information about the Gcc-patches mailing list