[Top][All Lists]

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

Re: Implement own Pragma ?

From: Jan van Mastbergen
Subject: Re: Implement own Pragma ?
Date: Thu, 18 Nov 2004 21:14:51 +0100

Ehh, no direct experience here but you seem to be looking for inline
assembly using the asm keyword, not a pragma. Should look something like

extern function_name();               // Your assembly routine
void caller()
   asm {
     push arg                                 /* prepare call stack */
     call function_name;                 /* call routine */
     pop                                        /* cleanup if your routine
doesn't */

Hth, Jan

"Che" <> wrote in message">
> Hi,
>  I am unsure of this message should be posted here. If not please let
> me know the appropriate group.
>  I was wondering how i could implement my own pragma in g++/gcc.
>  Say #pragma to_asm_code {function_name}
>  {function_name} is an assembly routine. I believe some compilers
> provide this feature by mechanism of "FastCall". I don't want anything
> complicated. All I wish to do is the language must recognize this as a
> pragma, push the return address and transfer control to the assembly
> routine.
> Thanks,
> Che

reply via email to

[Prev in Thread] Current Thread [Next in Thread]