Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 959 → Rev 960

/uspace/trunk/libc/arch/mips32/src/syscall.c
29,12 → 29,14
#include <libc.h>
 
sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2,
const sysarg_t p3, const syscall_t id)
const sysarg_t p3, const sysarg_t p4,
const syscall_t id)
{
register sysarg_t __mips_reg_a0 asm("$4") = p1;
register sysarg_t __mips_reg_a1 asm("$5") = p2;
register sysarg_t __mips_reg_a2 asm("$6") = p3;
register sysarg_t __mips_reg_a3 asm("$7") = id;
register sysarg_t __mips_reg_a3 asm("$7") = p4;
register sysarg_t __mips_reg_t0 asm("$8") = id;
register sysarg_t __mips_reg_v0 asm("$2");
asm volatile (
43,7 → 45,8
: "r" (__mips_reg_a0),
"r" (__mips_reg_a1),
"r" (__mips_reg_a2),
"r" (__mips_reg_a3)
"r" (__mips_reg_a3),
"r" (__mips_reg_t0)
);
return __mips_reg_v0;
/uspace/trunk/libc/arch/ia32/src/syscall.c
28,7 → 28,8
 
#include <libc.h>
 
sysarg_t __syscall(const syscall_t id, const sysarg_t p1, const sysarg_t p2, const sysarg_t p3)
sysarg_t __syscall(const sysarg_t p1, const sysarg_t p2, const sysarg_t p3,
const sysarg_t p4, const syscall_t id)
{
sysarg_t ret;
35,10 → 36,11
asm volatile (
"int $0x30\n"
: "=a" (ret)
: "a" (id),
"b" (p1),
"c" (p2),
"d" (p3)
: "a" (p1),
"b" (p2),
"c" (p3),
"d" (p4),
"S" (id)
);
return ret;