2
$Id: cpupi.pas,v 1.16 2003/10/14 00:30:48 florian Exp $
3
Copyright (c) 2002 by Florian Klaempfl
5
This unit contains the CPU specific part of tprocinfo
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.
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.
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.
21
****************************************************************************
24
{ This unit contains the CPU specific part of tprocinfo. }
35
ti386procinfo = class(tcgprocinfo)
36
constructor create(aparent:tprocinfo);override;
37
function calc_stackframe_size:longint;override;
49
constructor ti386procinfo.create(aparent:tprocinfo);
51
inherited create(aparent);
56
function ti386procinfo.calc_stackframe_size:longint;
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));
66
cprocinfo:=ti386procinfo;
70
Revision 1.16 2003/10/14 00:30:48 florian
71
+ some code for PIC support added
73
Revision 1.15 2003/10/03 22:00:33 peter
74
* parameter alignment fixes
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
82
Revision 1.13 2003/09/25 21:30:11 peter
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
90
Revision 1.11 2003/09/09 21:03:17 peter
91
* basics for x86 register calling
93
Revision 1.10 2003/09/03 15:55:01 peter
96
Revision 1.9.2.1 2003/08/31 15:46:26 peter
97
* more updates for tregister
99
Revision 1.9 2003/07/06 17:58:22 peter
100
* framepointer fixes for sparc
101
* parent framepointer code more generic
103
Revision 1.8 2003/06/13 21:19:31 peter
104
* current_procdef removed, use current_procinfo.procdef instead
106
Revision 1.7 2003/06/12 18:12:49 jonas
107
* fixed compilation problems
109
Revision 1.6 2003/06/12 16:43:07 peter
110
* newra compiles for sparc
112
Revision 1.5 2003/05/25 10:26:15 peter
113
* fix interrupt stack allocation
115
Revision 1.4 2003/05/22 21:32:29 peter
116
* removed some unit dependencies
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
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
127
Revision 1.2 2003/04/27 07:48:05 peter
128
* updated for removed lexlevel
130
Revision 1.1 2002/08/17 09:23:44 florian
131
* first part of procinfo rewrite