mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 06:11:35 +02:00
* always use a new register for array indices modified by a constant,
improves register/stack allocation git-svn-id: trunk@26473 -
This commit is contained in:
parent
a5653916e0
commit
2518c526c7
@ -444,11 +444,8 @@ implementation
|
|||||||
begin
|
begin
|
||||||
thlcgjvm(hlcg).a_load_loc_stack(current_asmdata.CurrAsmList,right.resultdef,right.location);
|
thlcgjvm(hlcg).a_load_loc_stack(current_asmdata.CurrAsmList,right.resultdef,right.location);
|
||||||
thlcgjvm(hlcg).a_op_const_stack(current_asmdata.CurrAsmList,OP_SUB,right.resultdef,tarraydef(left.resultdef).lowrange);
|
thlcgjvm(hlcg).a_op_const_stack(current_asmdata.CurrAsmList,OP_SUB,right.resultdef,tarraydef(left.resultdef).lowrange);
|
||||||
if right.location.loc<>LOC_REGISTER then
|
location_reset(right.location,LOC_REGISTER,def_cgsize(right.resultdef));
|
||||||
begin
|
right.location.register:=hlcg.getintregister(current_asmdata.CurrAsmList,right.resultdef);
|
||||||
location_reset(right.location,LOC_REGISTER,def_cgsize(right.resultdef));
|
|
||||||
right.location.register:=hlcg.getintregister(current_asmdata.CurrAsmList,right.resultdef);
|
|
||||||
end;
|
|
||||||
thlcgjvm(hlcg).a_load_stack_reg(current_asmdata.CurrAsmList,right.resultdef,right.location.register);
|
thlcgjvm(hlcg).a_load_stack_reg(current_asmdata.CurrAsmList,right.resultdef,right.location.register);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user