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

« back to all changes in this revision

Viewing changes to fpcsrc/compiler/x86_64/aoptcpub.pas

  • 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
    Copyright (c) 1998-2004 by Jonas Maebe, member of the Free Pascal
 
3
    Development Team
 
4
 
 
5
    This unit contains several types and constants necessary for the
 
6
    optimizer to work on the sparc architecture
 
7
 
 
8
    This program is free software; you can redistribute it and/or modify
 
9
    it under the terms of the GNU General Public License as published by
 
10
    the Free Software Foundation; either version 2 of the License, or
 
11
    (at your option) any later version.
 
12
 
 
13
    This program is distributed in the hope that it will be useful,
 
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
    GNU General Public License for more details.
 
17
 
 
18
    You should have received a copy of the GNU General Public License
 
19
    along with this program; if not, write to the Free Software
 
20
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
21
 
 
22
 ****************************************************************************
 
23
}
 
24
Unit aoptcpub; { Assembler OPTimizer CPU specific Base }
 
25
 
 
26
{$i fpcdefs.inc}
 
27
 
 
28
{ enable the following define if memory references can have both a base and }
 
29
{ index register in 1 operand                                               }
 
30
 
 
31
{$define RefsHaveIndexReg}
 
32
 
 
33
{ enable the following define if memory references can have a scaled index }
 
34
 
 
35
{ define RefsHaveScale}
 
36
 
 
37
{ enable the following define if memory references can have a segment }
 
38
{ override                                                            }
 
39
 
 
40
{ define RefsHaveSegment}
 
41
 
 
42
Interface
 
43
 
 
44
Uses
 
45
  cpubase,aasmcpu,AOptBase;
 
46
 
 
47
Type
 
48
 
 
49
{ type of a normal instruction }
 
50
  TInstr = Taicpu;
 
51
  PInstr = ^TInstr;
 
52
 
 
53
{ ************************************************************************* }
 
54
{ **************************** TCondRegs ********************************** }
 
55
{ ************************************************************************* }
 
56
{ Info about the conditional registers                                      }
 
57
  TCondRegs = Object
 
58
    Constructor Init;
 
59
    Destructor Done;
 
60
  End;
 
61
 
 
62
{ ************************************************************************* }
 
63
{ **************************** TAoptBaseCpu ******************************* }
 
64
{ ************************************************************************* }
 
65
 
 
66
  TAoptBaseCpu = class(TAoptBase)
 
67
  End;
 
68
 
 
69
 
 
70
{ ************************************************************************* }
 
71
{ ******************************* Constants ******************************* }
 
72
{ ************************************************************************* }
 
73
Const
 
74
 
 
75
{ the maximum number of things (registers, memory, ...) a single instruction }
 
76
{ changes                                                                    }
 
77
 
 
78
  MaxCh = 3;
 
79
 
 
80
{ the maximum number of operands an instruction has }
 
81
 
 
82
  MaxOps = 3;
 
83
 
 
84
{Oper index of operand that contains the source (reference) with a load }
 
85
{instruction                                                            }
 
86
 
 
87
  LoadSrc = 0;
 
88
 
 
89
{Oper index of operand that contains the destination (register) with a load }
 
90
{instruction                                                                }
 
91
 
 
92
  LoadDst = 1;
 
93
 
 
94
{Oper index of operand that contains the source (register) with a store }
 
95
{instruction                                                            }
 
96
 
 
97
  StoreSrc = 0;
 
98
 
 
99
{Oper index of operand that contains the destination (reference) with a load }
 
100
{instruction                                                                 }
 
101
 
 
102
  StoreDst = 1;
 
103
 
 
104
  aopt_uncondjmp = A_JMP;
 
105
  aopt_condjmp = A_Jcc;
 
106
 
 
107
Implementation
 
108
 
 
109
{ ************************************************************************* }
 
110
{ **************************** TCondRegs ********************************** }
 
111
{ ************************************************************************* }
 
112
Constructor TCondRegs.init;
 
113
Begin
 
114
End;
 
115
 
 
116
Destructor TCondRegs.Done; {$ifdef inl} inline; {$endif inl}
 
117
Begin
 
118
End;
 
119
 
 
120
End.