Inline assembly and local variable storage
\ Subu Krishnamoorthy (30 Aug 2007)
. \ Tom St Denis (30 Aug 2007)
. . \ Subu Krishnamoorthy (30 Aug 2007)

2 msgHelp with -march and -mcpu issues
3 msgGCC - Preserving statement expression results o...
10 msgSolution sought to GCC 4.1.1 backtrace problem
5 msgCan something similar to &x=&y be accom...
1 msgGNAT/GCC 4.2 build problem on FreeBSD-CURRENT
3 msgLocal disable of specific warnings for a sectio...
3 msgcan gcc compile from memory buffer?
2 msgMac OS X cross compile for i386-elf
2 msgUnsubscription
13 msgSUSv3's 'memory location' and threads
2 msghow to code global indirect branches ?
2 msgHelp about calculation of 'S' notation for a re...
1 msgmovaps missaligment in threads
3 msgcall stack's order of parameters
2 msg-fno-stack-protector not ensuring binary compat...
8 msgGCC asm block optimizations on x86_64
2 msg.p2align
3 msgcompile errors from gcc
5 msgBuilding gmp and mpfr within gcc
Subject:Re: Inline assembly and local variable storage
Group:Gcc-help
From:Subu Krishnamoorthy
Date:30 Aug 2007



Tom,

Unfortunately, that is not possible since the jmp is to a virtual function
address which can change at runtime.

Thanks.
-Subu

On Thursday 30 August 2007 06:09:46 Tom St Denis wrote:
> Subu Krishnamoorthy wrote:
> > Hello folks,
> >
> > I'm trying to write an inline assembly block embedded in C++ code and
> > want to simulate a sibling / tail call inside the assembly block (use the
> > 'jmp' instruction as opposed to 'call'). I know that I must adjust the
> > stack pointer before doing this since the function containing this
> > assembly block contains local variables. Does gcc provide a mechanism to
> > determine how much space was reserved for local variables (similar to
> > '_vars_' in High Level Assembly (HLA))?
> >
> > Cheers.
> > -Subu Krishnamoorthy
>
> Probably the safest way to do this is to inline the 2nd function.
>
> Tom





© 2004-2008 readlist.com