This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Inline assembly and local variable storage


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


Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]