mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 05:59:27 +02:00
* all the cg/hlcg routines take normally tcgint constants, so replace aint constants and casts in ncgset by tcgint ones
git-svn-id: trunk@30560 -
This commit is contained in:
parent
4d01271944
commit
fa6bea9bbb
@ -547,7 +547,7 @@ implementation
|
|||||||
|
|
||||||
procedure genitem(t : pcaselabel);
|
procedure genitem(t : pcaselabel);
|
||||||
|
|
||||||
procedure gensub(value:aint);
|
procedure gensub(value:tcgint);
|
||||||
begin
|
begin
|
||||||
{ here, since the sub and cmp are separate we need
|
{ here, since the sub and cmp are separate we need
|
||||||
to move the result before subtract to help
|
to move the result before subtract to help
|
||||||
@ -562,16 +562,16 @@ implementation
|
|||||||
genitem(t^.less);
|
genitem(t^.less);
|
||||||
{ do we need to test the first value? }
|
{ do we need to test the first value? }
|
||||||
if first and (t^._low>get_min_value(left.resultdef)) then
|
if first and (t^._low>get_min_value(left.resultdef)) then
|
||||||
hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,opsize,jmp_lt,aint(t^._low.svalue),hregister,elselabel);
|
hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,opsize,jmp_lt,tcgint(t^._low.svalue),hregister,elselabel);
|
||||||
if t^._low=t^._high then
|
if t^._low=t^._high then
|
||||||
begin
|
begin
|
||||||
if t^._low-last=0 then
|
if t^._low-last=0 then
|
||||||
hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,opsize,OC_EQ,0,hregister,blocklabel(t^.blockid))
|
hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,opsize,OC_EQ,0,hregister,blocklabel(t^.blockid))
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
gensub(aint(t^._low.svalue-last.svalue));
|
gensub(tcgint(t^._low.svalue-last.svalue));
|
||||||
hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,opsize,
|
hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,opsize,
|
||||||
OC_EQ,aint(t^._low.svalue-last.svalue),scratch_reg,blocklabel(t^.blockid));
|
OC_EQ,tcgint(t^._low.svalue-last.svalue),scratch_reg,blocklabel(t^.blockid));
|
||||||
end;
|
end;
|
||||||
last:=t^._low;
|
last:=t^._low;
|
||||||
end
|
end
|
||||||
@ -584,18 +584,18 @@ implementation
|
|||||||
begin
|
begin
|
||||||
{ have we to ajust the first value ? }
|
{ have we to ajust the first value ? }
|
||||||
if (t^._low>get_min_value(left.resultdef)) or (get_min_value(left.resultdef)<>0) then
|
if (t^._low>get_min_value(left.resultdef)) or (get_min_value(left.resultdef)<>0) then
|
||||||
gensub(aint(t^._low.svalue));
|
gensub(tcgint(t^._low.svalue));
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
{ if there is no unused label between the last and the }
|
{ if there is no unused label between the last and the }
|
||||||
{ present label then the lower limit can be checked }
|
{ present label then the lower limit can be checked }
|
||||||
{ immediately. else check the range in between: }
|
{ immediately. else check the range in between: }
|
||||||
gensub(aint(t^._low.svalue-last.svalue));
|
gensub(tcgint(t^._low.svalue-last.svalue));
|
||||||
hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, opsize,jmp_lt,aint(t^._low.svalue-last.svalue),scratch_reg,elselabel);
|
hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, opsize,jmp_lt,tcgint(t^._low.svalue-last.svalue),scratch_reg,elselabel);
|
||||||
end;
|
end;
|
||||||
gensub(aint(t^._high.svalue-t^._low.svalue));
|
gensub(tcgint(t^._high.svalue-t^._low.svalue));
|
||||||
hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,opsize,jmp_le,aint(t^._high.svalue-t^._low.svalue),scratch_reg,blocklabel(t^.blockid));
|
hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList,opsize,jmp_le,tcgint(t^._high.svalue-t^._low.svalue),scratch_reg,blocklabel(t^.blockid));
|
||||||
last:=t^._high;
|
last:=t^._high;
|
||||||
end;
|
end;
|
||||||
first:=false;
|
first:=false;
|
||||||
@ -933,7 +933,7 @@ implementation
|
|||||||
distv,
|
distv,
|
||||||
lv,hv,
|
lv,hv,
|
||||||
max_label: tconstexprint;
|
max_label: tconstexprint;
|
||||||
labelcnt : aint;
|
labelcnt : tcgint;
|
||||||
max_linear_list : aint;
|
max_linear_list : aint;
|
||||||
otl, ofl: tasmlabel;
|
otl, ofl: tasmlabel;
|
||||||
isjump : boolean;
|
isjump : boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user