+ temps can now also hold fpu values in registers (take care with use,

bacause of the x86 fpu stack)
  * fpu parameters to node-inlined procedures can now also be put in
    a register
This commit is contained in:
Jonas Maebe 2004-07-16 19:45:15 +00:00
parent 027fdece6f
commit ddf175f171
3 changed files with 46 additions and 14 deletions

View File

@ -668,7 +668,8 @@ implementation
create(_restype,_size,_temptype);
tempinfo^.may_be_in_reg:=
{ temp must fit a single register }
(_size<=sizeof(aint)) and
((_restype.def.deftype = floatdef) or
(_size<=TCGSize2Size[OS_INT])) and
{ size of register operations must be known }
(def_cgsize(_restype.def)<>OS_NO) and
{ no init/final needed }
@ -1017,7 +1018,13 @@ begin
end.
{
$Log$
Revision 1.85 2004-06-20 08:55:29 florian
Revision 1.86 2004-07-16 19:45:15 jonas
+ temps can now also hold fpu values in registers (take care with use,
bacause of the x86 fpu stack)
* fpu parameters to node-inlined procedures can now also be put in
a register
Revision 1.85 2004/06/20 08:55:29 florian
* logs truncated
Revision 1.84 2004/06/16 20:07:07 florian

View File

@ -1883,7 +1883,7 @@ type
not paramanager.push_addr_param(vs_const,para.left.resulttype.def,procdefinition.proccalloption)) then
begin
if (cs_regvars in aktglobalswitches) and
(vo_regable in tvarsym(para.paraitem.parasym).varoptions) and
(([vo_regable,vo_fpuregable] * tvarsym(para.paraitem.parasym).varoptions) <> []) and
(not tvarsym(para.paraitem.parasym).vartype.def.needs_inittable) then
tempnode := ctempcreatenode.create_reg(para.left.resulttype,para.left.resulttype.def.size,tt_persistent)
else
@ -2258,7 +2258,13 @@ begin
end.
{
$Log$
Revision 1.242 2004-07-15 21:02:05 jonas
Revision 1.243 2004-07-16 19:45:15 jonas
+ temps can now also hold fpu values in registers (take care with use,
bacause of the x86 fpu stack)
* fpu parameters to node-inlined procedures can now also be put in
a register
Revision 1.242 2004/07/15 21:02:05 jonas
* the condition for when to use a temp in case of reference var/const
parameters was inverse

View File

@ -69,7 +69,7 @@ interface
uses
globtype,systems,
cutils,verbose,cpuinfo,
aasmbase,aasmtai,aasmcpu,symsym,
aasmbase,aasmtai,aasmcpu,symsym,symconst,
defutil,
nflw,pass_2,
cgbase,
@ -369,16 +369,27 @@ interface
else if tempinfo^.may_be_in_reg then
begin
cgsize := def_cgsize(tempinfo^.restype.def);
if (TCGSize2Size[cgsize]>TCGSize2Size[OS_INT]) then
internalerror(2004020202);
tempinfo^.loc.reg := cg.getintregister(exprasmlist,cgsize);
if (tempinfo^.temptype = tt_persistent) then
if tempinfo^.restype.def.deftype <> floatdef then
begin
{ !!tell rgobj this register is now a regvar, so it can't be freed!! }
tempinfo^.loc.loc := LOC_CREGISTER
if (TCGSize2Size[cgsize]>TCGSize2Size[OS_INT]) then
internalerror(2004020202);
tempinfo^.loc.reg := cg.getintregister(exprasmlist,cgsize);
if (tempinfo^.temptype = tt_persistent) then
begin
{ !!tell rgobj this register is now a regvar, so it can't be freed!! }
tempinfo^.loc.loc := LOC_CREGISTER
end
else
tempinfo^.loc.loc := LOC_REGISTER;
end
else
tempinfo^.loc.loc := LOC_REGISTER;
begin
tempinfo^.loc.reg := cg.getfpuregister(exprasmlist,cgsize);
if (tempinfo^.temptype = tt_persistent) then
tempinfo^.loc.loc := LOC_CFPUREGISTER
else
tempinfo^.loc.loc := LOC_FPUREGISTER;
end;
end
else
begin
@ -407,7 +418,9 @@ interface
inc(location.reference.offset,offset);
end;
LOC_REGISTER,
LOC_CREGISTER:
LOC_CREGISTER,
LOC_FPUREGISTER,
LOC_CFPUREGISTER:
begin
if offset <> 0 then
internalerror(2004020205);
@ -483,7 +496,13 @@ begin
end.
{
$Log$
Revision 1.64 2004-06-20 08:55:29 florian
Revision 1.65 2004-07-16 19:45:15 jonas
+ temps can now also hold fpu values in registers (take care with use,
bacause of the x86 fpu stack)
* fpu parameters to node-inlined procedures can now also be put in
a register
Revision 1.64 2004/06/20 08:55:29 florian
* logs truncated
Revision 1.63 2004/06/16 20:07:08 florian