From 5e1e42ec2b0e7be5ddafb7728348fb70856a09c1 Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 23 Oct 2012 20:27:07 +0000 Subject: [PATCH] * fixes support for cpus with cpunodefaultint for unary minus nodes git-svn-id: trunk@22838 - --- compiler/ncgmat.pas | 4 ++++ compiler/nmat.pas | 2 ++ 2 files changed, 6 insertions(+) diff --git a/compiler/ncgmat.pas b/compiler/ncgmat.pas index c0cf63643f..77d4bcc8f4 100644 --- a/compiler/ncgmat.pas +++ b/compiler/ncgmat.pas @@ -238,11 +238,15 @@ implementation secondpass(left); { load left operator in a register } location_copy(location,left.location); +{$ifdef cpunodefaultint} + opsize:=left.resultdef; +{$else cpunodefaultint} { in case of a 32 bit system that can natively execute 64 bit operations } if (left.resultdef.size<=sinttype.size) then opsize:=sinttype else opsize:=s64inttype; +{$endif cpunodefaultint} hlcg.location_force_reg(current_asmdata.CurrAsmList,location,left.resultdef,opsize,false); hlcg.a_op_reg_reg(current_asmdata.CurrAsmList,OP_NEG,opsize,location.register,location.register); diff --git a/compiler/nmat.pas b/compiler/nmat.pas index 83b7a827ce..2c5475d130 100644 --- a/compiler/nmat.pas +++ b/compiler/nmat.pas @@ -766,7 +766,9 @@ implementation {$endif not cpu64bitaddr} else if (left.resultdef.typ=orddef) then begin +{$ifndef cpunodefaultint} inserttypeconv(left,sinttype); +{$endif cpunodefaultint} resultdef:=left.resultdef end else