just incase some one wolud help me debugging that\!

This commit is contained in:
mazen 2002-10-09 13:52:19 +00:00
parent fdfb33d117
commit 34df2e8e09

View File

@ -246,27 +246,27 @@ WriteLn('***********************************************');
else else
internalerror(2002071002); internalerror(2002071002);
end; end;
hp:=tparaitem(hp.previous); hp:=TParaItem(hp.previous);
end; end;
end; end;
function tSparcParaManager.GetFuncRetParaLoc(p:TAbstractProcDef):TParaLocation;
function tSparcparamanager.getfuncretparaloc(p : tabstractprocdef) : tparalocation;
begin begin
case p.rettype.def.deftype of case p.rettype.def.deftype of
orddef, orddef,enumdef:
enumdef:
begin begin
getfuncretparaloc.loc:=LOC_REGISTER; WriteLn('Allocating i0 as return register');
getfuncretparaloc.register:=R_O0; GetFuncRetParaLoc.loc:=LOC_REGISTER;
getfuncretparaloc.size:=def_cgsize(p.rettype.def); GetFuncRetParaLoc.register:=R_i0;
if getfuncretparaloc.size in [OS_S64,OS_64] then GetFuncRetParaLoc.size:=def_cgsize(p.rettype.def);
getfuncretparaloc.registerhigh:=R_O1; if GetFuncRetParaLoc.size in [OS_S64,OS_64]
then
GetFuncRetParaLoc.RegisterHigh:=R_O1;
end; end;
floatdef: floatdef:
begin begin
getfuncretparaloc.loc:=LOC_FPUREGISTER; GetFuncRetParaLoc.loc:=LOC_FPUREGISTER;
getfuncretparaloc.register:=R_F1; GetFuncRetParaLoc.register:=R_F1;
getfuncretparaloc.size:=def_cgsize(p.rettype.def); GetFuncRetParaLoc.size:=def_cgsize(p.rettype.def);
end; end;
{ smallsets are OS_INT in R3, others are OS_ADDR in R3 -> the same } { smallsets are OS_INT in R3, others are OS_ADDR in R3 -> the same }
{ ugly, I know :) (JM) } { ugly, I know :) (JM) }
@ -283,21 +283,23 @@ WriteLn('***********************************************');
arraydef, arraydef,
errordef: errordef:
begin begin
getfuncretparaloc.loc:=LOC_REGISTER; GetFuncRetParaLoc.loc:=LOC_REGISTER;
getfuncretparaloc.register:=R_O0; GetFuncRetParaLoc.register:=R_O0;
getfuncretparaloc.size:=OS_ADDR; GetFuncRetParaLoc.size:=OS_ADDR;
end; end;
else else
internalerror(2002090903); internalerror(2002090903);
end; end;
end; end;
begin begin
ParaManager:=TSparcParaManager.create; ParaManager:=TSparcParaManager.create;
end. end.
{ {
$Log$ $Log$
Revision 1.4 2002-10-08 21:02:22 mazen Revision 1.5 2002-10-09 13:52:19 mazen
just incase some one wolud help me debugging that\!
Revision 1.4 2002/10/08 21:02:22 mazen
* debugging register allocation * debugging register allocation
Revision 1.3 2002/10/07 20:33:05 mazen Revision 1.3 2002/10/07 20:33:05 mazen