* load left properly into a register in tx86addnode.second_addordinal, resolves #36287

git-svn-id: trunk@43449 -
This commit is contained in:
florian 2019-11-10 21:45:57 +00:00
parent 9d0389aa53
commit 5f3050961f

View File

@ -1520,16 +1520,11 @@ unit nx86add;
end end
else else
begin begin
{ at least one location is a register, re-use it, so we can try two operand opcodes } { at least one location should be a register, if yes, try to re-use it, so we can try two operand opcodes }
if left.location.loc<>LOC_REGISTER then if left.location.loc<>LOC_REGISTER then
begin begin
if right.location.loc<>LOC_REGISTER then if right.location.loc<>LOC_REGISTER then
begin hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,left.resultdef,false)
tmpreg:=cg.getintregister(current_asmdata.CurrAsmList,opsize);
cg.a_load_loc_reg(current_asmdata.CurrAsmList,opsize,left.location,tmpreg);
location_reset(left.location,LOC_REGISTER,opsize);
left.location.register:=tmpreg;
end
else else
begin begin
location_swap(left.location,right.location); location_swap(left.location,right.location);