This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, i386]: Insert "cld" via optimize mode switching
The we in fact need cld insn only after asm statements. MODE_ENTRY can
be set to CLD_FLAG_SET (actually CLD_FLAG_CLEARED...) and call insns
wouldn't set MODE_UNINITIALIZED anymore. If we specify MODE_EXIT as
CLD_FLAG_CLEARED, then optimize_mode_switching pass will automatically
emmit cld after every asm statement, fulfilling ABI requirement about
Is this thinking pushing cld optimization too far?
Given Michael's clarification, I think it absolutely is not.