+ a_call_ref for ppc32 and ppc64

git-svn-id: trunk@3392 -
This commit is contained in:
Jonas Maebe 2006-04-30 20:50:37 +00:00
parent 23af245ba2
commit a387be19a0
4 changed files with 60 additions and 4 deletions

1
.gitattributes vendored
View File

@ -369,6 +369,7 @@ compiler/ppc.cfg -text
compiler/ppc.conf -text
compiler/ppc.dof -text
compiler/ppc.dpr -text
compiler/ppcgen/cgppc.pas svneol=native#text/plain
compiler/ppheap.pas svneol=native#text/plain
compiler/ppu.pas svneol=native#text/plain
compiler/procinfo.pas svneol=native#text/plain

View File

@ -27,13 +27,13 @@ unit cgcpu;
uses
globtype,symtype,symdef,
cgbase,cgobj,
cgbase,cgobj,cgppc,
aasmbase,aasmcpu,aasmtai,aasmdata,
cpubase,cpuinfo,cgutils,cg64f32,rgcpu,
parabase;
type
tcgppc = class(tcg)
tcgppc = class(tcgppcgen)
procedure init_register_allocators;override;
procedure done_register_allocators;override;

View File

@ -27,13 +27,13 @@ interface
uses
globtype, symtype, symdef, symsym,
cgbase, cgobj,
cgbase, cgobj,cgppc,
aasmbase, aasmcpu, aasmtai,aasmdata,
cpubase, cpuinfo, cgutils, rgcpu,
parabase;
type
tcgppc = class(tcg)
tcgppc = class(tcgppcgen)
procedure init_register_allocators; override;
procedure done_register_allocators; override;

55
compiler/ppcgen/cgppc.pas Normal file
View File

@ -0,0 +1,55 @@
{
Copyright (c) 2006 by Florian Klaempfl
This unit implements the common part of the code generator for the PowerPC
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 cgppc;
{$i fpcdefs.inc}
interface
uses
globtype,symtype,symdef,
cgbase,cgobj,
aasmbase,aasmcpu,aasmtai,aasmdata,
cpubase,cpuinfo,cgutils,cg64f32,rgcpu,
parabase;
type
tcgppcgen = class(tcg)
procedure a_call_ref(list : TAsmList;ref: treference); override;
end;
implementation
uses
globals,verbose,systems,cutils,
symconst,symsym,fmodule,
rgobj,tgobj,cpupi,procinfo,paramgr;
procedure tcgppcgen.a_call_ref(list : TAsmList;ref: treference);
begin
a_reg_alloc(list,NR_R0);
a_load_ref_reg(list,OS_ADDR,OS_ADDR,ref,NR_R0);
a_call_reg(list,NR_R0);
a_reg_dealloc(list,NR_R0);
end;
end.