inline assembler modify esp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi all,

I was wondering if there was a way to let GCC know that the stack has been
modified by a certain amount (+4 bytes as an example) after the execution of
inline asm?

I'm thinking of ways around the issue, but the basic setup is as follows:

pushfl
somefunctioncall(a, b, c)
popfl

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.

Yamin

----------------------------------------
This mail sent through www.mywaterloo.ca

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux