From 3b32e6986b8bf71e3b1fc33474ee5ef6b48e4198 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Fri, 30 Dec 2011 12:12:39 +0000 Subject: [PATCH] * fixed maketojumpbool() for 32 bit targets when used with a 64 bit destination git-svn-id: trunk@19923 - --- compiler/ncgutil.pas | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/compiler/ncgutil.pas b/compiler/ncgutil.pas index b5eeefe0b7..fcee9324ca 100644 --- a/compiler/ncgutil.pas +++ b/compiler/ncgutil.pas @@ -332,6 +332,17 @@ implementation end; LOC_CREGISTER,LOC_REGISTER,LOC_CREFERENCE,LOC_REFERENCE : begin +{$ifndef cpu64bitalu} + if opsize in [OS_64,OS_S64] then + begin + location_force_reg(list,p.location,opsize,true); + tmpreg:=cg.getintregister(list,OS_32); + cg.a_op_reg_reg_reg(list,OP_OR,OS_32,p.location.register64.reglo,p.location.register64.reghi,tmpreg); + location_reset(p.location,LOC_REGISTER,OS_32); + p.location.register:=tmpreg; + opsize:=OS_32; + end; +{$endif not cpu64bitalu} cg.a_cmp_const_loc_label(list,opsize,OC_NE,0,p.location,current_procinfo.CurrTrueLabel); cg.a_jmp_always(list,current_procinfo.CurrFalseLabel); end;