This is the mail archive of the gcc@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]

Re: i386 FP comparsion bug (and sollution)


>   > This usually works well.
>   > Problem is, that reg-stack pass should emit some swap/mov?f patterns
>   > between condition and jump.
> "should"?  Or do you mean "could"?
Well according of my knowedge "should" = "could" so I really don't know :)
But reg-stack actually emits them sometimes.
> 
> Either way no instruction should ever be emitted between a cc0 setter and its
> associated conditional jump.  They must be consecutive in the RTL stream on
> the x86 (and any machine which defines HAVE_cc0.
> 
> So, if regstack is emitting insns between the cc0 setter and the cc0 user, then
> that's a bug.
Yes, it is bug. But why do not turn it to feature?
Reg-stack is last pass of optimizer, so no one after it should be confused
except the final pass. I believe I've fixed the finall pass and emiting
swaps after condition allows to emit better code.
I was looking for way to fix reg-stack pass and it seemed for me to be too
complex and result in worse code, so thats why I've choosed this solution.

Honza
> 
> jeff

-- 
                       OK. Lets make a signature file.
+-------------------------------------------------------------------------+
|        Jan Hubicka (Jan Hubi\v{c}ka in TeX) hubicka@freesoft.cz         |
|         Czech free software foundation: http://www.freesoft.cz          |
|AA project - the new way for computer graphics - http://www.ta.jcu.cz/aa |
|  homepage: http://www.paru.cas.cz/~hubicka/, games koules, Xonix, fast  |
|  fractal zoomer XaoS, index of Czech GNU/Linux/UN*X documentation etc.  | 
+-------------------------------------------------------------------------+


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