http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51500
--- Comment #14 from Uros Bizjak <ubizjak at gmail dot com> 2012-01-30 19:58:43 UTC --- (In reply to comment #13) > Right the following sequence seems to be better IMHO: > > pop %eax > push %ecx > push %eax > mov __ctx, %eax > call fun > pop %ecx > mov %ecx, %(esp) > ret I'd avoid push and pop insns and go directly with moves and %esp adjustments. Please see i.e. libitm/config/x86/sjlj.S for some ideas.