On Thu, 27 Nov 2003 y2bismil@xxxxxxxxxxxxxxxxxxxx wrote: <snip> > pushfl modifies the stack so some stack operations hardcoded by GCC are causing > problems. If somefunctioncall is inlined, that helps a lot. > > I was thinking of doing something like this (rough syntax). > *************************** > int a; > pushfl > popl a > > somefunctioncall(a, b, c) > > pushl a > popfl > *************************** > > The only issue with that is that this type of coding (pushfl, popfl) are > assembler defines used all over the place. Sometimes in a hierachy of such > calls. These cases will have to be done on a 1 to 1 basis. Is somefunctioncall something you have written by yourself? If so, why not make that function save/restore the flags? And if the functions are inlined, and you call several of them in a row, maybe gcc optimizes some pops/pushs away... Maybe not an answer to your question, just wondering... > > Yamin > > ---------------------------------------- > This mail sent through www.mywaterloo.ca >