This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: c inline assembly
- From: Ian Lance Taylor <iant at google dot com>
- To: ratheesh kannoth <ratheesh dot ksz at gmail dot com>
- Cc: linux-c-programming at vger dot kernel dot org, gcc-help at gcc dot gnu dot org
- Date: Sat, 18 Feb 2012 21:14:54 -0800
- Subject: Re: c inline assembly
- Authentication-results: mr.google.com; spf=pass (google.com: domain of iant@google.com designates 10.68.74.138 as permitted sender) smtp.mail=iant@google.com; dkim=pass header.i=iant@google.com
- References: <CAGZFCEEaJ7ZsNAmWCF-nDtsjs70U7fqEVvTXEaCt9Tmk1dcemQ@mail.gmail.com> <CAGZFCEH_NWJQid+DgOGrDp0nAS6odH2fLamT1k-vWP1ceAiMzQ@mail.gmail.com>
ratheesh kannoth <ratheesh.ksz@gmail.com> writes:
> This function is inline . what all registers needs to pushed and
> poped in the inline assembly so that the functions wont
> disturb the registers in the function ( in which it is C inlined ).
Your asm statement should list the registers that it clobbers.
One i386 you normally can not clobber %ebp. When compiling with
-fpic/-fPIC you normally can not clobber %ebx.
Ian