mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 12:26:02 +02:00
* fixed morphos syscall
This commit is contained in:
parent
2dfadfc8fd
commit
60e0494a74
@ -72,6 +72,7 @@
|
|||||||
|
|
||||||
{$ifdef powerpc}
|
{$ifdef powerpc}
|
||||||
{$define cpuflags}
|
{$define cpuflags}
|
||||||
|
{$define cputargethasfixedstack}
|
||||||
{$define noopt}
|
{$define noopt}
|
||||||
{define oldregvars}
|
{define oldregvars}
|
||||||
{$endif powerpc}
|
{$endif powerpc}
|
||||||
@ -90,7 +91,10 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.46 2004-10-31 18:54:24 peter
|
Revision 1.47 2004-11-14 16:26:29 florian
|
||||||
|
* fixed morphos syscall
|
||||||
|
|
||||||
|
Revision 1.46 2004/10/31 18:54:24 peter
|
||||||
* $fpctarget expands to <cpu>-<os>
|
* $fpctarget expands to <cpu>-<os>
|
||||||
* allow * in middle of the path to support ../*/units/$fpctarget
|
* allow * in middle of the path to support ../*/units/$fpctarget
|
||||||
|
|
||||||
|
@ -1170,13 +1170,13 @@ begin
|
|||||||
internalerror(2003042614);
|
internalerror(2003042614);
|
||||||
tprocdef(pd).forwarddef:=false;
|
tprocdef(pd).forwarddef:=false;
|
||||||
{$ifdef powerpc}
|
{$ifdef powerpc}
|
||||||
if target_info.system in [system_powerpc_morphos,system_m68k_amiga] then
|
if target_info.system in [system_powerpc_morphos,system_m68k_amiga] then
|
||||||
begin
|
begin
|
||||||
pd.has_paraloc_info:=true;
|
pd.has_paraloc_info:=true;
|
||||||
include(pd.procoptions,po_explicitparaloc);
|
include(pd.procoptions,po_explicitparaloc);
|
||||||
if consume_sym(sym,symtable) then
|
if consume_sym(sym,symtable) then
|
||||||
begin
|
begin
|
||||||
if (sym.typ in [localvarsym,paravarsym]) and
|
if (sym.typ in [localvarsym,paravarsym,globalvarsym]) and
|
||||||
((tabstractvarsym(sym).vartype.def.deftype=pointerdef) or
|
((tabstractvarsym(sym).vartype.def.deftype=pointerdef) or
|
||||||
is_32bitint(tabstractvarsym(sym).vartype.def)
|
is_32bitint(tabstractvarsym(sym).vartype.def)
|
||||||
) then
|
) then
|
||||||
@ -1888,24 +1888,27 @@ const
|
|||||||
{ insert parentfp parameter if required }
|
{ insert parentfp parameter if required }
|
||||||
insert_parentfp_para(pd);
|
insert_parentfp_para(pd);
|
||||||
|
|
||||||
currpara:=tparaitem(pd.para.first);
|
if not(po_explicitparaloc in pd.procoptions) then
|
||||||
while assigned(currpara) do
|
begin
|
||||||
begin
|
currpara:=tparaitem(pd.para.first);
|
||||||
if not(assigned(currpara.parasym) and (currpara.parasym.typ=paravarsym)) then
|
while assigned(currpara) do
|
||||||
internalerror(200304232);
|
begin
|
||||||
{ connect parasym to paraitem }
|
if not(assigned(currpara.parasym) and (currpara.parasym.typ=paravarsym)) then
|
||||||
tparavarsym(currpara.parasym).paraitem:=currpara;
|
internalerror(200304232);
|
||||||
{ We need a local copy for a value parameter when only the
|
{ connect parasym to paraitem }
|
||||||
address is pushed. Open arrays and Array of Const are
|
tparavarsym(currpara.parasym).paraitem:=currpara;
|
||||||
an exception because they are allocated at runtime and the
|
{ We need a local copy for a value parameter when only the
|
||||||
address that is pushed is patched }
|
address is pushed. Open arrays and Array of Const are
|
||||||
if (currpara.paratyp=vs_value) and
|
an exception because they are allocated at runtime and the
|
||||||
paramanager.push_addr_param(currpara.paratyp,currpara.paratype.def,pd.proccalloption) and
|
address that is pushed is patched }
|
||||||
not(is_open_array(currpara.paratype.def) or
|
if (currpara.paratyp=vs_value) and
|
||||||
is_array_of_const(currpara.paratype.def)) then
|
paramanager.push_addr_param(currpara.paratyp,currpara.paratype.def,pd.proccalloption) and
|
||||||
include(tparavarsym(currpara.parasym).varoptions,vo_has_local_copy);
|
not(is_open_array(currpara.paratype.def) or
|
||||||
currpara:=tparaitem(currpara.next);
|
is_array_of_const(currpara.paratype.def)) then
|
||||||
end;
|
include(tparavarsym(currpara.parasym).varoptions,vo_has_local_copy);
|
||||||
|
currpara:=tparaitem(currpara.next);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -2266,7 +2269,10 @@ const
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.203 2004-11-11 19:31:33 peter
|
Revision 1.204 2004-11-14 16:26:29 florian
|
||||||
|
* fixed morphos syscall
|
||||||
|
|
||||||
|
Revision 1.203 2004/11/11 19:31:33 peter
|
||||||
* fixed compile of powerpc,sparc,arm
|
* fixed compile of powerpc,sparc,arm
|
||||||
|
|
||||||
Revision 1.202 2004/11/09 22:32:59 peter
|
Revision 1.202 2004/11/09 22:32:59 peter
|
||||||
|
@ -324,6 +324,11 @@ unit cpupara;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
{$ifdef extdebug}
|
||||||
|
if po_explicitparaloc in p.procoptions then
|
||||||
|
internalerror(200411141);
|
||||||
|
{$endif extdebug}
|
||||||
|
|
||||||
result:=0;
|
result:=0;
|
||||||
nextintreg := curintreg;
|
nextintreg := curintreg;
|
||||||
nextfloatreg := curfloatreg;
|
nextfloatreg := curfloatreg;
|
||||||
@ -524,10 +529,11 @@ unit cpupara;
|
|||||||
system_powerpc_morphos:
|
system_powerpc_morphos:
|
||||||
begin
|
begin
|
||||||
p.paraloc[callerside].alignment:=4;
|
p.paraloc[callerside].alignment:=4;
|
||||||
|
p.paraloc[callerside].size:=def_cgsize(p.paratype.def);
|
||||||
paraloc:=p.paraloc[callerside].add_location;
|
paraloc:=p.paraloc[callerside].add_location;
|
||||||
paraloc^.loc:=LOC_REFERENCE;
|
paraloc^.loc:=LOC_REFERENCE;
|
||||||
paraloc^.size:=def_cgsize(p.paratype.def);
|
paraloc^.size:=def_cgsize(p.paratype.def);
|
||||||
paraloc^.reference.index:=NR_R2;
|
paraloc^.reference.index:=newreg(R_INTREGISTER,RS_R2,R_SUBWHOLE);
|
||||||
{ pattern is always uppercase'd }
|
{ pattern is always uppercase'd }
|
||||||
if s='D0' then
|
if s='D0' then
|
||||||
paraloc^.reference.offset:=0
|
paraloc^.reference.offset:=0
|
||||||
@ -583,7 +589,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.69 2004-09-25 20:28:20 florian
|
Revision 1.70 2004-11-14 16:26:29 florian
|
||||||
|
* fixed morphos syscall
|
||||||
|
|
||||||
|
Revision 1.69 2004/09/25 20:28:20 florian
|
||||||
* indention fixed
|
* indention fixed
|
||||||
|
|
||||||
Revision 1.68 2004/09/21 17:25:13 peter
|
Revision 1.68 2004/09/21 17:25:13 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user