* finetuned register allocation info for assignments

This commit is contained in:
Jonas Maebe 2001-10-14 11:49:51 +00:00
parent bed5714643
commit 32deddeab1
2 changed files with 11 additions and 20 deletions

View File

@ -1274,10 +1274,6 @@ implementation
end; end;
begin begin
{$IfNDef regallocfix}
If delsource then
del_reference(source);
{$EndIf regallocfix}
if (not loadref) and if (not loadref) and
((size<=8) or ((size<=8) or
(not(cs_littlesize in aktglobalswitches ) and (size<=12))) then (not(cs_littlesize in aktglobalswitches ) and (size<=12))) then
@ -1287,10 +1283,8 @@ implementation
for i:=1 to helpsize do for i:=1 to helpsize do
begin begin
emit_ref_reg(A_MOV,S_L,newreference(source),R_EDI); emit_ref_reg(A_MOV,S_L,newreference(source),R_EDI);
{$ifdef regallocfix}
If (size = 4) and delsource then If (size = 4) and delsource then
del_reference(source); del_reference(source);
{$endif regallocfix}
exprasmList.concat(Taicpu.Op_reg_ref(A_MOV,S_L,R_EDI,newreference(dest))); exprasmList.concat(Taicpu.Op_reg_ref(A_MOV,S_L,R_EDI,newreference(dest)));
inc(source.offset,4); inc(source.offset,4);
inc(dest.offset,4); inc(dest.offset,4);
@ -1299,10 +1293,8 @@ implementation
if size>1 then if size>1 then
begin begin
emit_ref_reg(A_MOV,S_W,newreference(source),R_DI); emit_ref_reg(A_MOV,S_W,newreference(source),R_DI);
{$ifdef regallocfix}
If (size = 2) and delsource then If (size = 2) and delsource then
del_reference(source); del_reference(source);
{$endif regallocfix}
exprasmList.concat(Taicpu.Op_reg_ref(A_MOV,S_W,R_DI,newreference(dest))); exprasmList.concat(Taicpu.Op_reg_ref(A_MOV,S_W,R_DI,newreference(dest)));
inc(source.offset,2); inc(source.offset,2);
inc(dest.offset,2); inc(dest.offset,2);
@ -1345,10 +1337,8 @@ implementation
emit_reg_reg(A_MOV,S_L,reg32,R_EDI); emit_reg_reg(A_MOV,S_L,reg32,R_EDI);
end; end;
emit_ref_reg(A_MOV,S_B,newreference(source),reg8); emit_ref_reg(A_MOV,S_B,newreference(source),reg8);
{$ifdef regallocfix}
If delsource then If delsource then
del_reference(source); del_reference(source);
{$endif regallocfix}
exprasmList.concat(Taicpu.Op_reg_ref(A_MOV,S_B,reg8,newreference(dest))); exprasmList.concat(Taicpu.Op_reg_ref(A_MOV,S_B,reg8,newreference(dest)));
if swap then if swap then
begin begin
@ -1363,20 +1353,14 @@ implementation
begin begin
getexplicitregister32(R_EDI); getexplicitregister32(R_EDI);
emit_ref_reg(A_LEA,S_L,newreference(dest),R_EDI); emit_ref_reg(A_LEA,S_L,newreference(dest),R_EDI);
{$ifdef regallocfix}
{is this ok?? (JM)}
del_reference(dest);
{$endif regallocfix}
exprasmList.concat(Tairegalloc.Alloc(R_ESI)); exprasmList.concat(Tairegalloc.Alloc(R_ESI));
if loadref then if loadref then
emit_ref_reg(A_MOV,S_L,newreference(source),R_ESI) emit_ref_reg(A_MOV,S_L,newreference(source),R_ESI)
else else
begin begin
emit_ref_reg(A_LEA,S_L,newreference(source),R_ESI); emit_ref_reg(A_LEA,S_L,newreference(source),R_ESI);
{$ifdef regallocfix}
if delsource then if delsource then
del_reference(source); del_reference(source);
{$endif regallocfix}
end; end;
exprasmList.concat(Taicpu.Op_none(A_CLD,S_NO)); exprasmList.concat(Taicpu.Op_none(A_CLD,S_NO));
@ -2985,7 +2969,10 @@ implementation
end. end.
{ {
$Log$ $Log$
Revision 1.5 2001-09-30 21:28:34 peter Revision 1.6 2001-10-14 11:49:51 jonas
* finetuned register allocation info for assignments
Revision 1.5 2001/09/30 21:28:34 peter
* int64->boolean fixed * int64->boolean fixed
Revision 1.4 2001/08/30 20:13:57 peter Revision 1.4 2001/08/30 20:13:57 peter

View File

@ -658,10 +658,11 @@ implementation
end; end;
concatcopy(right.location.reference, concatcopy(right.location.reference,
left.location.reference,left.resulttype.def.size,false,false); left.location.reference,left.resulttype.def.size,true,false);
del_reference(left.location.reference); del_reference(left.location.reference);
{ done by concatcopy
del_reference(right.location.reference); del_reference(right.location.reference);
ungetiftemp(right.location.reference); ungetiftemp(right.location.reference); }
end; end;
end; end;
{$ifdef SUPPORT_MMX} {$ifdef SUPPORT_MMX}
@ -1084,7 +1085,10 @@ begin
end. end.
{ {
$Log$ $Log$
Revision 1.23 2001-10-04 14:33:28 jonas Revision 1.24 2001-10-14 11:49:51 jonas
* finetuned register allocation info for assignments
Revision 1.23 2001/10/04 14:33:28 jonas
* fixed range check errors * fixed range check errors
Revision 1.22 2001/09/09 08:51:09 jonas Revision 1.22 2001/09/09 08:51:09 jonas