summaryrefslogtreecommitdiff
path: root/rtl/linux/sparc/bsyscall.inc
blob: 5f39de80a2441b1bc13ad2d163cb8de3851b9d58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
    This file is part of the Free Pascal run time library.
    Copyright (c) 2005 by Michael Van Canneyt,
    member of the Free Pascal development team.

    See the file COPYING.FPC, included in this distribution,
    for details about the copyright.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 **********************************************************************}


{$define FPC_BASEUNIX_HAS_FPPIPE}
Function fppipe(var fildes : tfildes):cint;assembler;
{
  This function puts the registers in place, does the call, and then
  copies back the registers as they are after the SysCall.
}
asm
        mov     42,%g1
        mov     %i0,%o0        
        ta      0x10
        bcc     .LSyscOK
        nop
        call    fpseterrno
        nop
        mov     -1,%i0
        b	.Lend
        nop
.LSyscOK:
        st      %o0,[%i0]
        st      %o1,[%i0+4]
        mov	0,%i0
.Lend:
end;