Przeglądaj źródła

* 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 -

Jonas Maebe 10 lat temu
rodzic
commit
dd2aa17de1
1 zmienionych plików z 8 dodań i 4 usunięć
  1. 8 4
      compiler/nadd.pas

+ 8 - 4
compiler/nadd.pas

@@ -2819,10 +2819,6 @@ implementation
 
 
         if try_make_mul32to64 then
         if try_make_mul32to64 then
           begin
           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
             { this uses the same criteria for signedness as the 32 to 64-bit mul
               handling in the i386 code generator }
               handling in the i386 code generator }
             if is_signed(left.resultdef) and is_signed(right.resultdef) then
             if is_signed(left.resultdef) and is_signed(right.resultdef) then
@@ -3124,6 +3120,14 @@ implementation
                   internalerror(200103291);
                   internalerror(200103291);
                  expectloc:=LOC_FLAGS;
                  expectloc:=LOC_FLAGS;
                end
                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}
 {$ifndef cpu64bitalu}
               { is there a 64 bit type ? }
               { is there a 64 bit type ? }
              else if (torddef(ld).ordtype in [s64bit,u64bit,scurrency]) then
              else if (torddef(ld).ordtype in [s64bit,u64bit,scurrency]) then