From 3dddd0130913719d66a86c84b31ebcc128867324 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 16 Feb 2014 13:15:13 +0000 Subject: [PATCH] * do not location_force_reg in tcgshlshrnode.second_integer if left is already in a register git-svn-id: trunk@26797 - --- compiler/ncgmat.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/ncgmat.pas b/compiler/ncgmat.pas index 30cba121e8..543ccab3e5 100644 --- a/compiler/ncgmat.pas +++ b/compiler/ncgmat.pas @@ -478,7 +478,10 @@ implementation end; {$endif cpunodefaultint} - hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,opdef,true); + if not(left.location.loc in [LOC_CREGISTER,LOC_REGISTER]) or + { location_force_reg can be also used to change the size of a register } + (left.location.size<>opsize) then + hlcg.location_force_reg(current_asmdata.CurrAsmList,left.location,left.resultdef,opdef,true); location_reset(location,LOC_REGISTER,opsize); location.register:=cg.getintregister(current_asmdata.CurrAsmList,opsize);