lkml.org 
[lkml]   [2000]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: syscall defines deficiency or gcc bug?
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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.024 / U:0.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site