Ver Fonte

* RTL: Changed 'shift' parameter of 64-bit shift helpers to CPU-native size, it doesn't have to be 64-bit because only its lower 6 bits are used. Not using 64 bit parameter improves code quality a bit.

git-svn-id: trunk@25478 -
sergei há 12 anos atrás
pai
commit
b99cf8d680
3 ficheiros alterados com 12 adições e 12 exclusões
  1. 4 4
      rtl/inc/compproc.inc
  2. 4 4
      rtl/inc/int64.inc
  3. 4 4
      rtl/java/jcompproc.inc

+ 4 - 4
rtl/inc/compproc.inc

@@ -536,10 +536,10 @@ function fpc_mul_qword(f1,f2 : qword;checkoverflow : longbool) : qword; compiler
 function fpc_mul_int64(f1,f2 : int64;checkoverflow : longbool) : int64; compilerproc;
 
 {$ifdef FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
-function fpc_shl_qword(value,shift : qword) : qword; compilerproc;
-function fpc_shr_qword(value,shift : qword) : qword; compilerproc;
-function fpc_shl_int64(value,shift : int64) : int64; compilerproc;
-function fpc_shr_int64(value,shift : int64) : int64; compilerproc;
+function fpc_shl_qword(value : qword; shift : sizeint) : qword; compilerproc;
+function fpc_shr_qword(value : qword; shift : sizeint) : qword; compilerproc;
+function fpc_shl_int64(value : int64; shift : sizeint) : int64; compilerproc;
+function fpc_shr_int64(value : int64; shift : sizeint) : int64; compilerproc;
 {$endif  FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
 
 

+ 4 - 4
rtl/inc/int64.inc

@@ -33,7 +33,7 @@
 {$ifdef  FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
 
 {$ifndef FPC_SYSTEM_HAS_SHL_QWORD}
-    function fpc_shl_qword(value,shift : qword) : qword; [public,alias: 'FPC_SHL_QWORD']; compilerproc;
+    function fpc_shl_qword(value : qword;shift : sizeint) : qword; [public,alias: 'FPC_SHL_QWORD']; compilerproc;
       begin
         shift:=shift and 63;
         if shift=0 then
@@ -53,7 +53,7 @@
 
 
 {$ifndef FPC_SYSTEM_HAS_SHR_QWORD}
-   function fpc_shr_qword(value,shift : qword) : qword; [public,alias: 'FPC_SHR_QWORD']; compilerproc;
+   function fpc_shr_qword(value : qword;shift : sizeint) : qword; [public,alias: 'FPC_SHR_QWORD']; compilerproc;
       begin
         shift:=shift and 63;
         if shift=0 then
@@ -73,7 +73,7 @@
 
 
 {$ifndef FPC_SYSTEM_HAS_SHL_INT64}
-    function fpc_shl_int64(value,shift : int64) : int64; [public,alias: 'FPC_SHL_INT64']; compilerproc;
+    function fpc_shl_int64(value : int64;shift : sizeint) : int64; [public,alias: 'FPC_SHL_INT64']; compilerproc;
       begin
         shift:=shift and 63;
         if shift=0 then
@@ -93,7 +93,7 @@
 
 
 {$ifndef FPC_SYSTEM_HAS_SHR_INT64}
-    function fpc_shr_int64(value,shift : int64) : int64; [public,alias: 'FPC_SHR_INT64']; compilerproc;
+    function fpc_shr_int64(value : int64;shift : sizeint) : int64; [public,alias: 'FPC_SHR_INT64']; compilerproc;
       begin
         shift:=shift and 63;
         if shift=0 then

+ 4 - 4
rtl/java/jcompproc.inc

@@ -436,10 +436,10 @@ function fpc_mul_int64(f1,f2 : int64;checkoverflow : longbool) : int64; compiler
 *)
 
 {$ifdef FPC_INCLUDE_SOFTWARE_SHIFT_INT64}
-function fpc_shl_qword(value,shift : qword) : qword; compilerproc;
-function fpc_shr_qword(value,shift : qword) : qword; compilerproc;
-function fpc_shl_int64(value,shift : int64) : int64; compilerproc;
-function fpc_shr_int64(value,shift : int64) : int64; compilerproc;
+function fpc_shl_qword(value : qword; shift : sizeint) : qword; compilerproc;
+function fpc_shr_qword(value : qword; shift : sizeint) : qword; compilerproc;
+function fpc_shl_int64(value : int64; shift : sizeint) : int64; compilerproc;
+function fpc_shr_int64(value : int64; shift : sizeint) : int64; compilerproc;
 {$endif  FPC_INCLUDE_SOFTWARE_SHIFT_INT64}