1;------------------------------------------------------------------------------ 2; 3; Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> 4; This program and the accompanying materials 5; are licensed and made available under the terms and conditions of the BSD License 6; which accompanies this distribution. The full text of the license may be found at 7; http://opensource.org/licenses/bsd-license.php. 8; 9; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 10; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 11; 12; Module Name: 13; 14; MathRShiftU64.nasm 15; 16; Abstract: 17; 18; 64-bit Math Worker Function. 19; Shifts a 64-bit unsigned value right by a certain number of bits. 20; 21;------------------------------------------------------------------------------ 22 23 SECTION .text 24 25;------------------------------------------------------------------------------ 26; 27; void __cdecl __ashrdi3 (void) 28; 29;------------------------------------------------------------------------------ 30global ASM_PFX(__ashrdi3) 31ASM_PFX(__ashrdi3): 32 cmp cl,0x40 33 jnc _Exit 34 cmp cl,0x20 35 jnc More32 36 shrd eax,edx,cl 37 shr edx,cl 38 ret 39More32: 40 mov eax,edx 41 xor edx,edx 42 and cl,0x1f 43 shr eax,cl 44 ret 45_Exit: 46 xor eax,eax 47 xor edx,edx 48 ret 49 50