Explorar el Código

* in the high level optimization of signed division by power-of-2 constant, set
shiftval to left.resultdef.size*8-1, instead of 31, so that it shifts by 15 or
7 on 16-bit and 8-bit CPUs, when the integer type is small.

git-svn-id: trunk@36820 -

nickysn hace 8 años
padre
commit
ee4c82f5f5
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      compiler/nmat.pas

+ 1 - 1
compiler/nmat.pas

@@ -519,7 +519,7 @@ implementation
                         { the divide helper                               }
                         exit
                     else
-                      shiftval:=31;
+                      shiftval:=left.resultdef.size*8-1;
 
                     result:=internalstatements(statements);
                     temp:=ctempcreatenode.create(left.resultdef,left.resultdef.size,tt_persistent,true);