From 5f3050961f57c1ecc58565e6434ad93ec44e14ef Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 10 Nov 2019 21:45:57 +0000 Subject: [PATCH] * load left properly into a register in tx86addnode.second_addordinal, resolves #36287 git-svn-id: trunk@43449 - --- compiler/x86/nx86add.pas | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/compiler/x86/nx86add.pas b/compiler/x86/nx86add.pas index 71c1c9bb42..65415fb650 100644 --- a/compiler/x86/nx86add.pas +++ b/compiler/x86/nx86add.pas @@ -1520,16 +1520,11 @@ unit nx86add; end else 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 begin if right.location.loc<>LOC_REGISTER then - begin - 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 + hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,left.resultdef,false) else begin location_swap(left.location,right.location);