update for HEAD-2003091401
[reactos.git] / lib / ntdll / rtl / i386 / allshr.s
diff --git a/lib/ntdll/rtl/i386/allshr.s b/lib/ntdll/rtl/i386/allshr.s
new file mode 100644 (file)
index 0000000..3b4f2e9
--- /dev/null
@@ -0,0 +1,33 @@
+/* $Id$
+ *
+ * COPYRIGHT:         See COPYING in the top level directory
+ * PROJECT:           ReactOS kernel
+ * PURPOSE:           Math support for IA-32
+ * FILE:              lib/ntdll/rtl/i386/allshr.s
+ * PROGRAMER:         Eric Kohl (ekohl@rz-online.de)
+ */
+
+/*
+ * long long
+ * __allshr(long long Value, unsigned char Shift);
+ *
+ * Parameters:
+ *   EDX:EAX - signed long long value to be shifted right
+ *   CL      - number of bits to shift by
+ * Registers:
+ *   Destroys CL
+ * Returns:
+ *   EDX:EAX - shifted value
+ */
+.globl __allshr
+__allshr:
+       shrdl   %cl, %edx, %eax
+       sarl    %cl, %edx
+       andl    $32, %ecx
+       je              L1
+       movl    %edx, %eax
+       sarl    $31, %edx
+L1:
+       ret
+
+/* EOF */