mirror of https://github.com/acidanthera/audk.git
Resync the GNU assembly to the MASM code.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@192 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
88758fe28d
commit
7962c48c97
|
@ -1,39 +1,35 @@
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006, Intel Corporation
|
# Copyright (c) 2006, Intel Corporation
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
#
|
#
|
||||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#
|
#
|
||||||
# Module Name:
|
# Module Name:
|
||||||
#
|
#
|
||||||
# DivU64x32.asm
|
# DivU64x32.asm
|
||||||
#
|
#
|
||||||
# Abstract:
|
# Abstract:
|
||||||
#
|
#
|
||||||
# Calculate the quotient of a 64-bit integer by a 32-bit integer
|
# Calculate the quotient of a 64-bit integer by a 32-bit integer
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.386:
|
||||||
|
.code:
|
||||||
|
|
||||||
|
.global _InternalMathDivU64x32
|
||||||
.global _DivU64x32
|
_InternalMathDivU64x32:
|
||||||
_DivU64x32:
|
movl 8(%esp),%eax
|
||||||
movl 8(%esp),%eax
|
movl 12(%esp),%ecx
|
||||||
movl 12(%esp),%ecx
|
xorl %edx,%edx
|
||||||
xorl %edx,%edx
|
divl %ecx
|
||||||
divl %ecx
|
pushl %eax
|
||||||
pushl %eax
|
movl 8(%esp),%eax
|
||||||
movl 8(%esp),%eax
|
divl %ecx
|
||||||
divl %ecx
|
popl %edx
|
||||||
popl %edx
|
ret
|
||||||
ret
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,39 +1,36 @@
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006, Intel Corporation
|
# Copyright (c) 2006, Intel Corporation
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
#
|
#
|
||||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#
|
#
|
||||||
# Module Name:
|
# Module Name:
|
||||||
#
|
#
|
||||||
# LShiftU64.asm
|
# LShiftU64.asm
|
||||||
#
|
#
|
||||||
# Abstract:
|
# Abstract:
|
||||||
#
|
#
|
||||||
# 64-bit left shift function for IA-32
|
# 64-bit left shift function for IA-32
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.686:
|
||||||
|
#.MODEL flat,C
|
||||||
|
.code:
|
||||||
|
|
||||||
.global _LShiftU64
|
.global _InternalMathLShiftU64
|
||||||
_LShiftU64:
|
_InternalMathLShiftU64:
|
||||||
movb 12(%esp),%cl
|
movb 12(%esp), %cl
|
||||||
xorl %eax,%eax
|
xorl %eax, %eax
|
||||||
movl 4(%esp),%edx
|
movl 4(%esp), %edx
|
||||||
testb $32,%cl
|
testb $32, %cl
|
||||||
cmovz %edx, %eax
|
cmovz %edx, %eax
|
||||||
cmovz 8(%esp), %edx
|
cmovz 0x8(%esp), %edx
|
||||||
shldl %cl,%eax,%edx
|
shld %cl,%eax,%edx
|
||||||
shll %cl,%eax
|
shl %cl, %eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,36 +1,32 @@
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006, Intel Corporation
|
# Copyright (c) 2006, Intel Corporation
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
#
|
#
|
||||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#
|
#
|
||||||
# Module Name:
|
# Module Name:
|
||||||
#
|
#
|
||||||
# MultU64x32.asm
|
# MultU64x32.asm
|
||||||
#
|
#
|
||||||
# Abstract:
|
# Abstract:
|
||||||
#
|
#
|
||||||
# Calculate the product of a 64-bit integer and a 32-bit integer
|
# Calculate the product of a 64-bit integer and a 32-bit integer
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.386:
|
||||||
|
.code:
|
||||||
|
|
||||||
|
.global _InternalMathMultU64x32
|
||||||
.global _MultU64x32
|
_InternalMathMultU64x32:
|
||||||
_MultU64x32:
|
movl 12(%esp),%ecx
|
||||||
movl 12(%esp),%ecx
|
movl %ecx,%eax
|
||||||
movl %ecx,%eax
|
imull 8(%esp),%ecx
|
||||||
imull 8(%esp),%ecx
|
mull 0x4(%esp)
|
||||||
mull 4(%esp)
|
addl %ecx,%edx
|
||||||
addl %ecx,%edx
|
ret
|
||||||
ret
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,39 +1,35 @@
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006, Intel Corporation
|
# Copyright (c) 2006, Intel Corporation
|
||||||
# All rights reserved. This program and the accompanying materials
|
# All rights reserved. This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# 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
|
# which accompanies this distribution. The full text of the license may be found at
|
||||||
# http://opensource.org/licenses/bsd-license.php
|
# http://opensource.org/licenses/bsd-license.php
|
||||||
#
|
#
|
||||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#
|
#
|
||||||
# Module Name:
|
# Module Name:
|
||||||
#
|
#
|
||||||
# RShiftU64.asm
|
# RShiftU64.asm
|
||||||
#
|
#
|
||||||
# Abstract:
|
# Abstract:
|
||||||
#
|
#
|
||||||
# 64-bit logical right shift function for IA-32
|
# 64-bit logical right shift function for IA-32
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
.686:
|
||||||
|
.code:
|
||||||
|
|
||||||
|
.global InternalMathRShiftU64
|
||||||
.global _RShiftU64
|
_InternalMathRShiftU64:
|
||||||
_RShiftU64:
|
movb 12(%esp),%cl
|
||||||
movb 12(%esp),%cl
|
xorl %edx,%edx
|
||||||
xorl %edx,%edx
|
movl 8(%esp),%eax
|
||||||
movl 8(%esp),%eax
|
testb $32,%cl
|
||||||
testb $32,%cl
|
cmovz %eax, %edx
|
||||||
cmovz %eax, %edx
|
cmovz 0x4(%esp), %eax
|
||||||
cmovz 4(%esp), %eax
|
shrdl %cl,%edx,%eax
|
||||||
shrdl %cl,%edx,%eax
|
shr %cl,%edx
|
||||||
shrl %cl,%edx
|
ret
|
||||||
ret
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue