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 v2, i386]: Fix PR 36079 [4.3/4.4 Regression] cld instruction is not emitted anymore.


On Wed, May 21, 2008 at 09:53:35AM +0200, Paolo Bonzini wrote:
> >	PR target/36079
> >	* configure.ac: Handle --enable-cld.
> >	* configure: Regenerated.
> >	* config.gcc: Add USE_IX86_CLD to tm_defines for x86 targets.
> >	* config/i386/i386.h (struct machine_function): Add needs_cld field.
> >	(ix86_current_function_needs_cld): New define.
> >	* config/i386/i386.md (UNSPEC_CLD): New unspec volatile constant.
> >	(cld): New isns pattern.
> >	(strmov_singleop, rep_mov, strset_singleop, rep_stos, cmpstrnqi_nz_1,
> >	cmpstrnqi_1, strlenqi_1): Set ix86_current_function_needs_cld flag.
> >	* config/i386/i386.opt (mcld): New option.
> >	* config/i386/i386.c (ix86_expand_prologue): Emit cld insn if
> >	TARGET_CLD and ix86_current_function_needs_cld.
> >	(override_options): Use -mcld by default for 32-bit code if
> >	USE_IX86_CLD.
> >
> >OK for 4.3 branch?

It should go to trunk too.

> Build parts are ok for 4.3 and trunk, except that you could merge the 
> case statement you added with the one before it (yes, that involves a 
> small duplication).  Those parts are preapproved with this change.
> 
> The rest, you can approve yourself (though IIUC you want a word from the 
> branch RMs).

Yes, it is ok for the branch.

	Jakub


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