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: [PATCH, i386]: Emit cld instruction when stringops are used


On Mon, Apr 28, 2008 at 1:16 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:

>  > This patch adds back generation of cld instructions when stringops are
>  > used in the function. cld insn is emitted as unspec volatile at the
>  > end of function prologue. Currently, patched gcc emits cld when
>  > "-mcld" is added to compile flags.
>
>  The discussion of this patch seems to have died down, and we were hoping
>  to get something like this into GCC 4.3.1.
>
>  I think the conclusion was that the approach of this patch (emit cld in
>  the prologue if the compiler generates code caring about the direction
>  flag, but inline asms need their own cld if they care about the direction
>  flag) is the right one.  There was less consensus on the need for a
>  configure option to turn this option on by default, but if there is one
>  then I think the right form is --enable-cld which turns it on by default
>  for 32-bit code only, if no explicit -mno-cld option was passed.

IIRC, Jan proposed better patch, where cld was placed in optimal
position via LCM.

Uros.


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