Hello, world
QNX 4.25, Watcom C 10.6 environment.
I need to force into specific registers the arguments passed to a
function (implemented into a .asm module) called through a function
pointer.
The target asm function expects the 3 arguments in EAX, EDX and ECX
registers.
I’ve tried something like this:
struct myStruct
{
/* Some fields… */
void (* FuncPtr) ( char *, char *, char * );
pragma aux FuncPtr parm [eax] [edx] [ecx];
/* Some other fields… */
};
The .S generated by “cc -S” shows that the C call load the last
arguments into EBX, not in ECX as expected.
The first two parameters get loaded into EAX and EDX as expected, but I
think this is also the default behaviour for Watcom compiler.
Is “#pragma aux parm” working for functions only (and not for function
pointers) ?
How can I solve my problem?
Sorry for my bad english… and thanks in advance!
–
/------------------------------------------------------------
- Davide Ancri - Prisma Engineering
- email = davidea AT prisma DASH eng DOT it
------------------------------------------------------------/