This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
inline assembler modify esp
- From: y2bismil at engmail dot uwaterloo dot ca
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 27 Nov 2003 10:50:13 -0500
- Subject: inline assembler modify esp
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