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]: Insert "cld" via optimize mode switching


On Mon, Dec 04, 2006 at 02:53:28PM +0100, Paolo Bonzini wrote:
> this is not an atomic pair anyway.  If the ABI does not require that DF 
> be cleared on exit from a subroutine, then there is no guarantee that a 
> signal handler occurring between the cld and "rep movsb" doesn't set the 
> direction flag.

Please do not confuse "on exit from a subroutine" and "after a signal
handler".  Any OS worth its salt ought to restore this flag after
exiting a signal handler, whether by taking advantage of an ABI or
restoring it from an internal saved copy; this is a non-issue.

%eflags is saved in the GNU/Linux signal handler frame; I can't speak
for other OS's directly, but...

-- 
Daniel Jacobowitz
CodeSourcery


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