mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-31 07:22:44 +02:00
* when optimizing range checks in case nodes, unsigned comparisions must be used, resolves #34782
git-svn-id: trunk@40721 -
This commit is contained in:
parent
635a6c7ef8
commit
a2cee252e8
@ -739,7 +739,7 @@ implementation
|
||||
begin
|
||||
scratch_reg:=hlcg.getintregister(current_asmdata.CurrAsmList,opsize);
|
||||
gensub(tcgint(hp^._low.svalue));
|
||||
hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, opsize, jmp_le, tcgint(hp^._high.svalue-hp^._low.svalue), hregister, blocklabel(hp^.blockid))
|
||||
hlcg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, opsize, OC_BE, tcgint(hp^._high.svalue-hp^._low.svalue), hregister, blocklabel(hp^.blockid))
|
||||
end;
|
||||
end;
|
||||
hlcg.a_jmp_always(current_asmdata.CurrAsmList,elselabel);
|
||||
|
@ -330,7 +330,7 @@ implementation
|
||||
else
|
||||
begin
|
||||
cg.a_op_const_reg(current_asmdata.CurrAsmList, OP_SUB, opcgsize, tcgint(hp^._low.svalue), hregister);
|
||||
cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, opcgsize, jmp_le, tcgint(hp^._high.svalue - hp^._low.svalue), hregister,blocklabel(hp^.blockid));
|
||||
cg.a_cmp_const_reg_label(current_asmdata.CurrAsmList, opcgsize, OC_BE, tcgint(hp^._high.svalue - hp^._low.svalue), hregister,blocklabel(hp^.blockid));
|
||||
end;
|
||||
end;
|
||||
cg.a_jmp_always(current_asmdata.CurrAsmList,elselabel);
|
||||
|
Loading…
Reference in New Issue
Block a user