summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>2006-05-17 23:30:57 +0000
committerbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>2006-05-17 23:30:57 +0000
commit7962c48c972eb3f918114fd01b948c7f5499822b (patch)
treedcf926686eabe2544ed09d5b6572d7d4c3890c97
parent88758fe28d4fd2244e21094d255e567ef70dc023 (diff)
downloadedk2-7962c48c972eb3f918114fd01b948c7f5499822b.zip
edk2-7962c48c972eb3f918114fd01b948c7f5499822b.tar.gz
edk2-7962c48c972eb3f918114fd01b948c7f5499822b.tar.bz2
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
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DivU64x32.s74
-rw-r--r--MdePkg/Library/BaseLib/Ia32/LShiftU64.s75
-rw-r--r--MdePkg/Library/BaseLib/Ia32/MultU64x32.s68
-rw-r--r--MdePkg/Library/BaseLib/Ia32/RShiftU64.s74
4 files changed, 138 insertions, 153 deletions
diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32.s b/MdePkg/Library/BaseLib/Ia32/DivU64x32.s
index 689c709..89d7546 100644
--- a/MdePkg/Library/BaseLib/Ia32/DivU64x32.s
+++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32.s
@@ -1,39 +1,35 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# DivU64x32.asm
-#
-# Abstract:
-#
-# Calculate the quotient of a 64-bit integer by a 32-bit integer
-#
-#------------------------------------------------------------------------------
-
-
-
-
-
-.global _DivU64x32
-_DivU64x32:
- movl 8(%esp),%eax
- movl 12(%esp),%ecx
- xorl %edx,%edx
- divl %ecx
- pushl %eax
- movl 8(%esp),%eax
- divl %ecx
- popl %edx
- ret
-
-
-
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# DivU64x32.asm
+#
+# Abstract:
+#
+# Calculate the quotient of a 64-bit integer by a 32-bit integer
+#
+#------------------------------------------------------------------------------
+
+ .386:
+ .code:
+
+.global _InternalMathDivU64x32
+_InternalMathDivU64x32:
+ movl 8(%esp),%eax
+ movl 12(%esp),%ecx
+ xorl %edx,%edx
+ divl %ecx
+ pushl %eax
+ movl 8(%esp),%eax
+ divl %ecx
+ popl %edx
+ ret
diff --git a/MdePkg/Library/BaseLib/Ia32/LShiftU64.s b/MdePkg/Library/BaseLib/Ia32/LShiftU64.s
index 94cbc12..4aa17c6 100644
--- a/MdePkg/Library/BaseLib/Ia32/LShiftU64.s
+++ b/MdePkg/Library/BaseLib/Ia32/LShiftU64.s
@@ -1,39 +1,36 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# LShiftU64.asm
-#
-# Abstract:
-#
-# 64-bit left shift function for IA-32
-#
-#------------------------------------------------------------------------------
-
-
-
-
-
-.global _LShiftU64
-_LShiftU64:
- movb 12(%esp),%cl
- xorl %eax,%eax
- movl 4(%esp),%edx
- testb $32,%cl
- cmovz %edx, %eax
- cmovz 8(%esp), %edx
- shldl %cl,%eax,%edx
- shll %cl,%eax
- ret
-
-
-
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# LShiftU64.asm
+#
+# Abstract:
+#
+# 64-bit left shift function for IA-32
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .code:
+
+.global _InternalMathLShiftU64
+_InternalMathLShiftU64:
+ movb 12(%esp), %cl
+ xorl %eax, %eax
+ movl 4(%esp), %edx
+ testb $32, %cl
+ cmovz %edx, %eax
+ cmovz 0x8(%esp), %edx
+ shld %cl,%eax,%edx
+ shl %cl, %eax
+ ret
diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x32.s b/MdePkg/Library/BaseLib/Ia32/MultU64x32.s
index 03c520b..572a312 100644
--- a/MdePkg/Library/BaseLib/Ia32/MultU64x32.s
+++ b/MdePkg/Library/BaseLib/Ia32/MultU64x32.s
@@ -1,36 +1,32 @@
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# MultU64x32.asm
-#
-# Abstract:
-#
-# Calculate the product of a 64-bit integer and a 32-bit integer
-#
-#------------------------------------------------------------------------------
-
-
-
-
-
-.global _MultU64x32
-_MultU64x32:
- movl 12(%esp),%ecx
- movl %ecx,%eax
- imull 8(%esp),%ecx
- mull 4(%esp)
- addl %ecx,%edx
- ret
-
-
-
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# MultU64x32.asm
+#
+# Abstract:
+#
+# Calculate the product of a 64-bit integer and a 32-bit integer
+#
+#------------------------------------------------------------------------------
+
+ .386:
+ .code:
+
+.global _InternalMathMultU64x32
+_InternalMathMultU64x32:
+ movl 12(%esp),%ecx
+ movl %ecx,%eax
+ imull 8(%esp),%ecx
+ mull 0x4(%esp)
+ addl %ecx,%edx
+ ret
diff --git a/MdePkg/Library/BaseLib/Ia32/RShiftU64.s b/MdePkg/Library/BaseLib/Ia32/RShiftU64.s
index 5b681e3..efedcf7 100644
--- a/MdePkg/Library/BaseLib/Ia32/RShiftU64.s
+++ b/MdePkg/Library/BaseLib/Ia32/RShiftU64.s
@@ -1,39 +1,35 @@
-#------------------------------------------------------------------------------
-#
-# 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
-#
-#------------------------------------------------------------------------------
-
-
-
-
-
-.global _RShiftU64
-_RShiftU64:
- movb 12(%esp),%cl
- xorl %edx,%edx
- movl 8(%esp),%eax
- testb $32,%cl
- cmovz %eax, %edx
- cmovz 4(%esp), %eax
- shrdl %cl,%edx,%eax
- shrl %cl,%edx
- ret
-
-
-
+#------------------------------------------------------------------------------
+#
+# 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
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ .code:
+
+.global InternalMathRShiftU64
+_InternalMathRShiftU64:
+ movb 12(%esp),%cl
+ xorl %edx,%edx
+ movl 8(%esp),%eax
+ testb $32,%cl
+ cmovz %eax, %edx
+ cmovz 0x4(%esp), %eax
+ shrdl %cl,%edx,%eax
+ shr %cl,%edx
+ ret