OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [uClibc/] [libc/] [sysdeps/] [linux/] [mips/] [pipe.S] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1325 phoenix
/* pipe system call for Linux/MIPS */
2
 
3
/*see uClibc's sh/pipe.c and glibc-2.2.4's mips/pipe.S */
4
 
5
#include 
6
#include 
7
#include 
8
#include 
9
 
10
        .globl  pipe
11
        .ent    pipe, 0
12
pipe:
13
#ifdef PROF
14
        .set            noat
15
        move            $1,ra
16
        subu            sp,sp,8         # _mcount pops 2 words from  stack
17
        jal             _mcount
18
        .set            at
19
#endif
20
        addiu   sp,sp,-24
21
        sw      a0,16(sp)
22
        li      v0,__NR_pipe
23
        syscall
24
        beqz    a3, 1f
25
        la      t3, errno
26
        sw      v0, (t3)
27
        li      v0, -1
28
        b       2f
29
1:
30
        lw      a0, 16(sp)
31
        sw      v0, 0(a0)
32
        sw      v1, 4(a0)
33
        li      v0, 0
34
2:
35
        addiu   sp,sp,24
36
        j       ra
37
        .end    pipe
38
        .size   pipe,.-pipe

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.