~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to rtl/sparc/sysutilp.inc

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{
2
 
    $Id: sysutilp.inc,v 1.2 2004/03/05 12:17:50 marco Exp $
3
 
    This file is part of the Free Pascal run time library.
4
 
 
5
 
    Copyright (c) 2003 by Peter Vreman,
6
 
    member of the Free Pascal development team
7
 
 
8
 
    See the file COPYING.FPC, included in this distribution,
9
 
    for details about the copyright.
10
 
 
11
 
    This program is distributed in the hope that it will be useful,
12
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
 
 
15
 
 **********************************************************************}
16
 
 
17
 
{ ---------------------------------------------------------------------
18
 
  This include contains cpu-specific routines
19
 
  ---------------------------------------------------------------------}
20
 
 
21
 
function InterLockedDecrement (var Target: longint) : longint; assembler;
22
 
asm
23
 
{$warning FIXME}
24
 
end;
25
 
(*
26
 
{ input:  address of target in r3 }
27
 
{ output: target-1 in r3          }
28
 
{ side-effect: target := target-1 }
29
 
asm
30
 
InterLockedDecLoop:
31
 
        lwarx   r0,r0,r3
32
 
        subi    r0,r0,1
33
 
        stwcx.  r0,r0,r3
34
 
        bne     InterLockedDecLoop
35
 
        mr      r3,r0
36
 
end;
37
 
*)
38
 
 
39
 
 
40
 
function InterLockedIncrement (var Target: longint) : longint; assembler;
41
 
asm
42
 
{$warning FIXME}
43
 
end;
44
 
(*
45
 
{ input:  address of target in r3 }
46
 
{ output: target+1 in r3          }
47
 
{ side-effect: target := target+1 }
48
 
asm
49
 
InterLockedIncLoop:
50
 
        lwarx   r0,r0,r3
51
 
        addi    r0,r0,1
52
 
        stwcx.  r0,r0,r3
53
 
        bne     InterLockedIncLoop
54
 
        mr      r3,r0
55
 
end;
56
 
*)
57
 
 
58
 
function InterLockedExchange (var Target: longint;Source : longint) : longint; assembler;
59
 
asm
60
 
{$warning FIXME}
61
 
end;
62
 
(*
63
 
{ input:  address of target in r3, source in r4 }
64
 
{ output: target in r3                          }
65
 
{ side-effect: target := source                 }
66
 
asm
67
 
InterLockedXchgLoop:
68
 
        lwarx   r0,r0,r3
69
 
        stwcx.  r4,r0,r3
70
 
        bne     InterLockedXchgLoop
71
 
        mr      r3,r0
72
 
end;
73
 
*)
74
 
 
75
 
 
76
 
function InterLockedExchangeAdd (var Target: longint;Source : longint) : longint; assembler;
77
 
asm
78
 
{$warning FIXME}
79
 
end;
80
 
(*
81
 
{ input:  address of target in r3, source in r4 }
82
 
{ output: target in r3                          }
83
 
{ side-effect: target := target+source          }
84
 
asm
85
 
InterLockedXchgAddLoop:
86
 
        lwarx   r0,r0,r3
87
 
        add     r0,r0,r4
88
 
        stwcx.  r0,r0,r3
89
 
        bne     InterLockedXchgAddLoop
90
 
        sub     r3,r0,r4
91
 
end;
92
 
*)
93
 
 
94
 
{
95
 
  $Log: sysutilp.inc,v $
96
 
  Revision 1.2  2004/03/05 12:17:50  marco
97
 
   * interlocked* changed to longints, including winapi. (which was a bug)
98
 
 
99
 
  Revision 1.1  2003/09/01 20:46:32  peter
100
 
    * new dummies
101
 
 
102
 
}