Messages in this thread | | | From | Borislav Deianov <> | Date | Wed, 2 Aug 2000 15:27:01 -0700 | Subject | Re: 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/
| |