mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-04 01:43:44 +02:00
94 lines
2.8 KiB
ObjectPascal
94 lines
2.8 KiB
ObjectPascal
{******************************************************************************
|
|
$Id$
|
|
Copyright (c) 1998-2002 by Florian Klaempfl
|
|
|
|
Generate SPARC assembler for in call nodes
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
|
|
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. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
****************************************************************************}
|
|
UNIT ncpucall;
|
|
{$INCLUDE fpcdefs.inc}
|
|
interface
|
|
uses
|
|
symdef,node,ncal,ncgcal;
|
|
type
|
|
TSparcCallNode=class(TCgCallNode)
|
|
function pass_1:TNode;override;
|
|
{Under SPARC, the frame pointer is automatically set by the SAVE instruction
|
|
which is part of the stardrad calling mechanism. This function will do nothing.
|
|
the frame pointer register is the stack pointer register of the caller, and is
|
|
set when generating function prologue in cgcpu.tcgSPARC.g_stackframe_entry}
|
|
procedure load_framepointer;override;
|
|
end;
|
|
implementation
|
|
uses
|
|
globtype,systems,
|
|
cutils,verbose,globals,
|
|
symconst,symbase,symsym,symtable,defbase,paramgr,
|
|
{$ifdef GDB}
|
|
{$ifdef delphi}
|
|
sysutils,
|
|
{$else}
|
|
strings,
|
|
{$endif}
|
|
gdb,
|
|
{$endif GDB}
|
|
cginfo,cgbase,pass_2,
|
|
cpuinfo,cpubase,aasmbase,aasmtai,aasmcpu,
|
|
nmem,nld,ncnv,
|
|
ncgutil,cgobj,tgobj,regvars,rgobj,rgcpu,cg64f32,cgcpu,cpupi;
|
|
function TSparcCallNode.pass_1:TNode;
|
|
begin
|
|
result:=inherited pass_1;
|
|
if assigned(result)
|
|
then
|
|
exit;
|
|
if ProcDefinition is TProcDef
|
|
then
|
|
begin
|
|
if TProcDef(procdefinition).parast.datasize>TSparcProcInfo(procinfo).maxpushedparasize
|
|
then
|
|
TSparcProcInfo(procinfo).maxpushedparasize:=TProcdef(procdefinition).parast.datasize
|
|
end
|
|
else
|
|
InternalError(2002101001);
|
|
end;
|
|
procedure TSparcCallNode.load_framepointer;
|
|
begin
|
|
InternalError(2002101000);
|
|
end;
|
|
begin
|
|
ccallnode:=TSparcCallNode;
|
|
end.
|
|
{
|
|
$Log$
|
|
Revision 1.4 2002-10-10 19:57:52 mazen
|
|
* Just to update repsitory
|
|
|
|
Revision 1.3 2002/09/30 19:12:14 mazen
|
|
* function prologue fixed
|
|
|
|
Revision 1.2 2002/08/30 13:16:23 mazen
|
|
*call parameter handling is now based on the new param manager
|
|
|
|
Revision 1.2 2002/08/17 09:23:49 florian
|
|
* first part of procinfo rewrite
|
|
|
|
Revision 1.1 2002/08/13 21:40:59 florian
|
|
* more fixes for ppc calling conventions
|
|
}
|
|
|