I have a piece of code written in x86 asm (compiled with nasm) and I
would like to call this function from C code through a function pointer.
The problem is that the asm function expects arguments into some x86
registers that are not the GCC-calling-convention standard ones, even
if using attribute((regparm(X))) on the func pointer.
In Watcom/QNX4 I have used the following code:
typedef void (myfunc_t) ( char *, char , int );
#pragma aux myfunc_t modify [eax] parm [esi] [edi] [ecx];
But using the following GCC code:
typedef void (myfunc_t) ( char *, char , int )
the code generated when calling (*Funcp) put the three arguments into
EAX, EDX and ECX, respectively, that is not what I need.
Thanks in advance,