Browse Source

* use IMUL even for unsigned multiplication on x86_64, when overflow checking is
off

git-svn-id: trunk@26499 -

nickysn 11 years ago
parent
commit
2459518bdd
1 changed files with 3 additions and 1 deletions
  1. 3 1
      compiler/x86_64/nx64add.pas

+ 3 - 1
compiler/x86_64/nx64add.pas

@@ -49,8 +49,10 @@ interface
 
     procedure tx8664addnode.second_addordinal;
     begin
-      { filter unsigned MUL opcode, which requires special handling }
+      { filter unsigned MUL opcode, which requires special handling.
+        Note that when overflow checking is off, we can use IMUL instead. }
       if (nodetype=muln) and
+        (cs_check_overflow in current_settings.localswitches) and
         (not(is_signed(left.resultdef)) or
          not(is_signed(right.resultdef))) then
       begin