Hi,
In article <NBBBJGOOMDFADJDGDCPHMEPACHAA.law@sgi.com> you wrote:
> The problem appears to lie in gcc's global register allocator. 'greg'.
> So what I'm wondering is "does this point to a bug in gcc"? or is there
> some different way the syscalls could be defined to make them portable
> between both cases?
Here is a PIC version that Alan Modra posted a while ago:
#define _syscall5_pic(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
type5,arg5) \
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
{ \
long __res; \
__asm__ volatile ( \
"pushl %%ebx\n\t" \
"movl %%eax,%%ebx\n\t" \
"movl %1,%%eax\n\t" \
"int $0x80\n\t" \
"popl %%ebx" \
: "=a" (__res) \
: "i" (__NR_##name),"a" ((long)(arg1)),"c" ((long)(arg2)), \
"d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5))); \
__syscall_return(type,__res); \
}
Regards,
Borislav
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Aug 07 2000 - 21:00:09 EST