* avoid uncessary zero extensions in case code

git-svn-id: trunk@21979 -
This commit is contained in:
florian 2012-07-28 20:09:21 +00:00
parent c8435b503f
commit c5ad1bce7b

View File

@ -180,7 +180,9 @@ implementation
else
begin
tcgarm(cg).cgsetflags:=true;
cg.a_op_const_reg(current_asmdata.CurrAsmList, OP_SUB, opcgsize, aint(int64(t^._low-last)), hregister);
{ use OS_32 here to avoid uncessary sign extensions, at this place hregister will never be negative, because
then genlinearlist wouldn't be used }
cg.a_op_const_reg(current_asmdata.CurrAsmList, OP_SUB, OS_32, aint(int64(t^._low-last)), hregister);
tcgarm(cg).cgsetflags:=false;
cg.a_jmp_flags(current_asmdata.CurrAsmList,F_EQ,blocklabel(t^.blockid));
end;
@ -198,7 +200,9 @@ implementation
if (t^._low>get_min_value(left.resultdef)) or (get_min_value(left.resultdef)<>0) then
begin
tcgarm(cg).cgsetflags:=true;
cg.a_op_const_reg(current_asmdata.CurrAsmList, OP_SUB, opcgsize, aint(int64(t^._low)), hregister);
{ use OS_32 here to avoid uncessary sign extensions, at this place hregister will never be negative, because
then genlinearlist wouldn't be use }
cg.a_op_const_reg(current_asmdata.CurrAsmList, OP_SUB, OS_32, aint(int64(t^._low)), hregister);
tcgarm(cg).cgsetflags:=false;
end;
end
@ -209,7 +213,9 @@ implementation
{ immediately. else check the range in between: }
tcgarm(cg).cgsetflags:=true;
cg.a_op_const_reg(current_asmdata.CurrAsmList, OP_SUB, opcgsize, aint(int64(t^._low-last)), hregister);
{ use OS_32 here to avoid uncessary sign extensions, at this place hregister will never be negative, because
then genlinearlist wouldn't be use }
cg.a_op_const_reg(current_asmdata.CurrAsmList, OP_SUB, OS_32, aint(int64(t^._low-last)), hregister);
tcgarm(cg).cgsetflags:=false;
{ no jump necessary here if the new range starts at }
{ at the value following the previous one }
@ -218,7 +224,9 @@ implementation
cg.a_jmp_flags(current_asmdata.CurrAsmList,cond_lt,elselabel);
end;
tcgarm(cg).cgsetflags:=true;
cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SUB,opcgsize,aint(int64(t^._high-t^._low)),hregister);
{ use OS_32 here to avoid uncessary sign extensions, at this place hregister will never be negative, because
then genlinearlist wouldn't be use }
cg.a_op_const_reg(current_asmdata.CurrAsmList,OP_SUB,OS_32,aint(int64(t^._high-t^._low)),hregister);
tcgarm(cg).cgsetflags:=false;
cg.a_jmp_flags(current_asmdata.CurrAsmList,cond_le,blocklabel(t^.blockid));