anybody could tell me what registers are used in such a function?
#define asmlinkage __attribute__((__regparm__(3)))
eax, ecx, edx? in which order?
thx.
asmlinkage
RE:asmlinkage
I _believe_ the registers are used in the following order:
long ebx,long ecx,long edx,
long esi, long edi, long ebp, long eax, long ds,
long es, long fs, long gs, long orig_eax,
long eip,long cs,long eflags,long esp,long ss
Which means the first three are what you're looking for.
I'm grabbing this from the parameter list of "asmlinkage int sys_iopl()" in Linux. So... It's more or less an educated guess.
If you wanna know for sure, why not just write a procedure using "asmlinkage", call it in a test file, and look at the code GCC produces (gcc -S).
Jeff
long ebx,long ecx,long edx,
long esi, long edi, long ebp, long eax, long ds,
long es, long fs, long gs, long orig_eax,
long eip,long cs,long eflags,long esp,long ss
Which means the first three are what you're looking for.
I'm grabbing this from the parameter list of "asmlinkage int sys_iopl()" in Linux. So... It's more or less an educated guess.
If you wanna know for sure, why not just write a procedure using "asmlinkage", call it in a test file, and look at the code GCC produces (gcc -S).
Jeff