Say, I want to call a function with the following signature in inline assembly of gcc. How can I do that?
int some_function( void * arg );
Generally you'll want to do something like
void *x;
asm(".. code that writes to register %0" : "=r"(x) : ...
int r = some_function(x);
asm(".. code that uses the result..." : ... : "r"(r), ...
That is, you don't want to do the function call in the inline asm at all. That way you don't have to worry about details of the calling conventions, or stack frame management.