From dd2aa17de190511c7f218c071f99df239e9a7e02 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 28 Feb 2015 22:31:06 +0000 Subject: [PATCH] * also allow 64 bit platforms have have a 32x32->64 bit multiplication to take advantage of this transormation (enables this optimization for AArch64) git-svn-id: trunk@30035 - --- compiler/nadd.pas | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/compiler/nadd.pas b/compiler/nadd.pas index ab89377400..56c9014942 100644 --- a/compiler/nadd.pas +++ b/compiler/nadd.pas @@ -2819,10 +2819,6 @@ implementation if try_make_mul32to64 then begin - { if the code generator can handle 32 to 64-bit muls, we're done here } - if not use_generic_mul32to64 then - exit; - { this uses the same criteria for signedness as the 32 to 64-bit mul handling in the i386 code generator } if is_signed(left.resultdef) and is_signed(right.resultdef) then @@ -3124,6 +3120,14 @@ implementation internalerror(200103291); expectloc:=LOC_FLAGS; end + else if (nodetype=muln) and + is_64bitint(resultdef) and + not use_generic_mul32to64 and + try_make_mul32to64 then + begin + { if the code generator can handle 32 to 64-bit muls, + we're done here } + end {$ifndef cpu64bitalu} { is there a 64 bit type ? } else if (torddef(ld).ordtype in [s64bit,u64bit,scurrency]) then