summary refs log tree commit diff stats
path: root/nim/nsystem.pas
diff options
context:
space:
mode:
Diffstat (limited to 'nim/nsystem.pas')
-rw-r--r--nim/nsystem.pas18
1 files changed, 16 insertions, 2 deletions
diff --git a/nim/nsystem.pas b/nim/nsystem.pas
index c33236189..f476e09ca 100644
--- a/nim/nsystem.pas
+++ b/nim/nsystem.pas
@@ -149,8 +149,12 @@ function subU(a, b: biggestInt): biggestInt;
 function mulU(a, b: biggestInt): biggestInt;
 function divU(a, b: biggestInt): biggestInt;
 function modU(a, b: biggestInt): biggestInt;
-function shlU(a, b: biggestInt): biggestInt;
-function shrU(a, b: biggestInt): biggestInt;
+function shlU(a, b: biggestInt): biggestInt; overload;
+function shrU(a, b: biggestInt): biggestInt; overload;
+
+function shlU(a, b: Int32): Int32;overload;
+function shrU(a, b: int32): int32;overload;
+
 function ltU(a, b: biggestInt): bool;
 function leU(a, b: biggestInt): bool;
 
@@ -281,6 +285,16 @@ begin
   result := biggestInt(biggestUInt(a) shr biggestUInt(b));
 end;
 
+function shlU(a, b: Int32): Int32;
+begin
+  result := Int32(UInt32(a) shl UInt32(b));
+end;
+
+function shrU(a, b: int32): int32;
+begin
+  result := Int32(UInt32(a) shr UInt32(b));
+end;
+
 function ltU(a, b: biggestInt): bool;
 begin
   result := biggestUInt(a) < biggestUInt(b);