2006-05-18 01:30:57 +02:00
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Copyright (c) 2006, Intel Corporation
|
|
|
|
# All rights reserved. This program and the accompanying materials
|
|
|
|
# are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
# which accompanies this distribution. The full text of the license may be found at
|
|
|
|
# http://opensource.org/licenses/bsd-license.php
|
|
|
|
#
|
|
|
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
#
|
|
|
|
# Module Name:
|
|
|
|
#
|
|
|
|
# RShiftU64.asm
|
|
|
|
#
|
|
|
|
# Abstract:
|
|
|
|
#
|
|
|
|
# 64-bit logical right shift function for IA-32
|
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
|
2006-07-21 10:47:38 +02:00
|
|
|
.686:
|
|
|
|
.code:
|
2006-05-18 01:30:57 +02:00
|
|
|
|
2007-01-06 15:52:39 +01:00
|
|
|
.globl ASM_PFX(InternalMathRShiftU64)
|
2006-07-21 10:47:38 +02:00
|
|
|
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# UINT64
|
|
|
|
# EFIAPI
|
|
|
|
# InternalMathRShiftU64 (
|
|
|
|
# IN UINT64 Operand,
|
|
|
|
# IN UINTN Count
|
|
|
|
# );
|
|
|
|
#------------------------------------------------------------------------------
|
2007-01-06 15:52:39 +01:00
|
|
|
ASM_PFX(InternalMathRShiftU64):
|
2006-07-21 10:47:38 +02:00
|
|
|
movb 12(%esp), %cl
|
|
|
|
xorl %edx, %edx
|
|
|
|
movl 8(%esp), %eax
|
|
|
|
testb $32, %cl
|
2006-05-18 01:30:57 +02:00
|
|
|
cmovz %eax, %edx
|
|
|
|
cmovz 0x4(%esp), %eax
|
2006-07-21 10:47:38 +02:00
|
|
|
shrdl %cl, %edx, %eax
|
|
|
|
shr %cl, %edx
|
2006-05-18 01:30:57 +02:00
|
|
|
ret
|