Changeset cc6f688 in mainline for libc/arch/mips32el/src/syscall.c


Ignore:
Timestamp:
2005-11-22T17:07:38Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3a6d6656
Parents:
25b0e6a
Message:

uspace work

File:
1 moved

Legend:

Unmodified
Added
Removed
  • libc/arch/mips32el/src/syscall.c

    r25b0e6a rcc6f688  
    2929#include <libc.h>
    3030
    31 void __syscall(const unsigned int id, const unsigned int p1, const unsigned int p2, const unsigned int p3)
     31unsigned int __syscall(const syscall_t id, const unsigned int p1, const unsigned int p2, const unsigned int p3)
    3232{
    3333        register unsigned int __mips_reg_a0 asm("$4") = p1;
     
    3535        register unsigned int __mips_reg_a2 asm("$6") = p3;
    3636        register unsigned int __mips_reg_a3 asm("$7") = id;
     37        register unsigned int __mips_reg_v0 asm("$2");
    3738       
    3839        asm volatile (
    3940                "syscall\n"
    40                 :
     41                : "=r" (__mips_reg_v0)
    4142                : "r" (__mips_reg_a0),
    4243                  "r" (__mips_reg_a1),
    4344                  "r" (__mips_reg_a2),
    4445                  "r" (__mips_reg_a3)
    45                 : "v0"
    4646        );
     47       
     48        return __mips_reg_v0;
    4749}
Note: See TracChangeset for help on using the changeset viewer.