This commit was manufactured by cvs2svn to create branch 'captive'.
[reactos.git] / ntoskrnl / rtl / i386 / allshr.s
1 /* $Id$
2  *
3  * COPYRIGHT:         See COPYING in the top level directory
4  * PROJECT:           ReactOS kernel
5  * PURPOSE:           Math support for IA-32
6  * FILE:              ntoskrnl/rtl/i386/allshr.s
7  * PROGRAMER:         Eric Kohl (ekohl@rz-online.de)
8  */
9
10 /*
11  * long long
12  * __allshr(long long Value, unsigned char Shift);
13  *
14  * Parameters:
15  *   EDX:EAX - signed long long value to be shifted right
16  *   CL      - number of bits to shift by
17  * Registers:
18  *   Destroys CL
19  * Returns:
20  *   EDX:EAX - shifted value
21  */
22 .globl __allshr
23 __allshr:
24         shrdl   %cl, %edx, %eax
25         sarl    %cl, %edx
26         andl    $32, %ecx
27         je              L1
28         movl    %edx, %eax
29         sarl    $31, %edx
30 L1:
31         ret
32
33 /* EOF */