~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to compiler/i386/cpupi.pas

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2004-08-12 16:29:37 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040812162937-moo8ulvysp1ln771
Tags: 1.9.4-5
fp-compiler: needs ld, adding dependency on binutils.  (Closes: #265265)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
    $Id: cpupi.pas,v 1.16 2003/10/14 00:30:48 florian Exp $
 
3
    Copyright (c) 2002 by Florian Klaempfl
 
4
 
 
5
    This unit contains the CPU specific part of tprocinfo
 
6
 
 
7
    This program is free software; you can redistribute it and/or modify
 
8
    it under the terms of the GNU General Public License as published by
 
9
    the Free Software Foundation; either version 2 of the License, or
 
10
    (at your option) any later version.
 
11
 
 
12
    This program is distributed in the hope that it will be useful,
 
13
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
    GNU General Public License for more details.
 
16
 
 
17
    You should have received a copy of the GNU General Public License
 
18
    along with this program; if not, write to the Free Software
 
19
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
20
 
 
21
 ****************************************************************************
 
22
}
 
23
 
 
24
{ This unit contains the CPU specific part of tprocinfo. }
 
25
unit cpupi;
 
26
 
 
27
{$i fpcdefs.inc}
 
28
 
 
29
  interface
 
30
 
 
31
    uses
 
32
       psub,procinfo;
 
33
 
 
34
    type
 
35
       ti386procinfo = class(tcgprocinfo)
 
36
         constructor create(aparent:tprocinfo);override;
 
37
         function calc_stackframe_size:longint;override;
 
38
       end;
 
39
 
 
40
 
 
41
  implementation
 
42
 
 
43
    uses
 
44
      cutils,
 
45
      globals,
 
46
      tgobj,
 
47
      cpubase;
 
48
 
 
49
    constructor ti386procinfo.create(aparent:tprocinfo);
 
50
      begin
 
51
        inherited create(aparent);
 
52
        got:=NR_EBX;
 
53
      end;
 
54
 
 
55
 
 
56
    function ti386procinfo.calc_stackframe_size:longint;
 
57
      begin
 
58
        { align to 4 bytes at least
 
59
          otherwise all those subl $2,%esp are meaningless PM }
 
60
        result:=Align(tg.direction*tg.lasttemp,min(aktalignment.localalignmin,4));
 
61
      end;
 
62
 
 
63
 
 
64
 
 
65
begin
 
66
   cprocinfo:=ti386procinfo;
 
67
end.
 
68
{
 
69
  $Log: cpupi.pas,v $
 
70
  Revision 1.16  2003/10/14 00:30:48  florian
 
71
    + some code for PIC support added
 
72
 
 
73
  Revision 1.15  2003/10/03 22:00:33  peter
 
74
    * parameter alignment fixes
 
75
 
 
76
  Revision 1.14  2003/10/01 20:34:49  peter
 
77
    * procinfo unit contains tprocinfo
 
78
    * cginfo renamed to cgbase
 
79
    * moved cgmessage to verbose
 
80
    * fixed ppc and sparc compiles
 
81
 
 
82
  Revision 1.13  2003/09/25 21:30:11  peter
 
83
    * parameter fixes
 
84
 
 
85
  Revision 1.12  2003/09/23 17:56:06  peter
 
86
    * locals and paras are allocated in the code generation
 
87
    * tvarsym.localloc contains the location of para/local when
 
88
      generating code for the current procedure
 
89
 
 
90
  Revision 1.11  2003/09/09 21:03:17  peter
 
91
    * basics for x86 register calling
 
92
 
 
93
  Revision 1.10  2003/09/03 15:55:01  peter
 
94
    * NEWRA branch merged
 
95
 
 
96
  Revision 1.9.2.1  2003/08/31 15:46:26  peter
 
97
    * more updates for tregister
 
98
 
 
99
  Revision 1.9  2003/07/06 17:58:22  peter
 
100
    * framepointer fixes for sparc
 
101
    * parent framepointer code more generic
 
102
 
 
103
  Revision 1.8  2003/06/13 21:19:31  peter
 
104
    * current_procdef removed, use current_procinfo.procdef instead
 
105
 
 
106
  Revision 1.7  2003/06/12 18:12:49  jonas
 
107
    * fixed compilation problems
 
108
 
 
109
  Revision 1.6  2003/06/12 16:43:07  peter
 
110
    * newra compiles for sparc
 
111
 
 
112
  Revision 1.5  2003/05/25 10:26:15  peter
 
113
    * fix interrupt stack allocation
 
114
 
 
115
  Revision 1.4  2003/05/22 21:32:29  peter
 
116
    * removed some unit dependencies
 
117
 
 
118
  Revision 1.3  2003/04/27 11:21:35  peter
 
119
    * aktprocdef renamed to current_procinfo.procdef
 
120
    * procinfo renamed to current_procinfo
 
121
    * procinfo will now be stored in current_module so it can be
 
122
      cleaned up properly
 
123
    * gen_main_procsym changed to create_main_proc and release_main_proc
 
124
      to also generate a tprocinfo structure
 
125
    * fixed unit implicit initfinal
 
126
 
 
127
  Revision 1.2  2003/04/27 07:48:05  peter
 
128
    * updated for removed lexlevel
 
129
 
 
130
  Revision 1.1  2002/08/17 09:23:44  florian
 
131
    * first part of procinfo rewrite
 
132
}
 
133
 
 
134