summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseLib/Ia32
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-30 00:47:57 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-01-30 00:47:57 +0000
commitbbc3c2d52617d8425e5a72f74c2e20b8686a0627 (patch)
tree358fce665c40bb9f8e9cb0ad29e6a07db78c79c3 /MdePkg/Library/BaseLib/Ia32
parent720d3c5fb31b6b2df535f7a281d5d9d297c5eede (diff)
downloadedk2-platforms-bbc3c2d52617d8425e5a72f74c2e20b8686a0627.tar.xz
Split out Synchronization Library from Base Library
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7378 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseLib/Ia32')
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.S41
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.asm45
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.c50
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.S47
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.asm47
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.c50
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.S38
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.asm42
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.c42
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.S38
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.asm42
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.c43
12 files changed, 0 insertions, 525 deletions
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.S b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.S
deleted file mode 100644
index 767343d823..0000000000
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.S
+++ /dev/null
@@ -1,41 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006 - 2008, 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:
-#
-# InterlockedCompareExchange32.S
-#
-# Abstract:
-#
-# InternalSyncCompareExchange32 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-.globl ASM_PFX(InternalSyncCompareExchange32)
-
-#------------------------------------------------------------------------------
-# UINT32
-# EFIAPI
-# InternalSyncCompareExchange32 (
-# IN UINT32 *Value,
-# IN UINT32 CompareValue,
-# IN UINT32 ExchangeValue
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalSyncCompareExchange32):
- movl 4(%esp), %ecx
- movl 8(%esp), %eax
- movl 12(%esp), %edx
- lock
- cmpxchgl %edx, (%ecx)
- ret
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.asm b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.asm
deleted file mode 100644
index 47d959fa6a..0000000000
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.asm
+++ /dev/null
@@ -1,45 +0,0 @@
-;------------------------------------------------------------------------------
-;
-; 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:
-;
-; InterlockedCompareExchange32.Asm
-;
-; Abstract:
-;
-; InterlockedCompareExchange32 function
-;
-; Notes:
-;
-;------------------------------------------------------------------------------
-
- .486
- .model flat,C
- .code
-
-;------------------------------------------------------------------------------
-; UINT32
-; EFIAPI
-; InternalSyncCompareExchange32 (
-; IN UINT32 *Value,
-; IN UINT32 CompareValue,
-; IN UINT32 ExchangeValue
-; );
-;------------------------------------------------------------------------------
-InternalSyncCompareExchange32 PROC
- mov ecx, [esp + 4]
- mov eax, [esp + 8]
- mov edx, [esp + 12]
- lock cmpxchg [ecx], edx
- ret
-InternalSyncCompareExchange32 ENDP
-
- END
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.c b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.c
deleted file mode 100644
index abcb1ecc83..0000000000
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/** @file
- InterlockedCompareExchange32 function
-
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- 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.
-
-**/
-
-
-
-
-/**
- Performs an atomic compare exchange operation on a 32-bit unsigned integer.
-
- Performs an atomic compare exchange operation on the 32-bit unsigned integer
- specified by Value. If Value is equal to CompareValue, then Value is set to
- ExchangeValue and CompareValue is returned. If Value is not equal to CompareValue,
- then Value is returned. The compare exchange operation must be performed using
- MP safe mechanisms.
-
- @param Value A pointer to the 32-bit value for the compare exchange
- operation.
- @param CompareValue 32-bit value used in compare operation.
- @param ExchangeValue 32-bit value used in exchange operation.
-
- @return The original *Value before exchange.
-
-**/
-UINT32
-EFIAPI
-InternalSyncCompareExchange32 (
- IN UINT32 *Value,
- IN UINT32 CompareValue,
- IN UINT32 ExchangeValue
- )
-{
- _asm {
- mov ecx, Value
- mov eax, CompareValue
- mov edx, ExchangeValue
- lock cmpxchg [ecx], edx
- }
-}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.S b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.S
deleted file mode 100644
index 03aebff91d..0000000000
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.S
+++ /dev/null
@@ -1,47 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006 - 2008, 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:
-#
-# InterlockedCompareExchange64.S
-#
-# Abstract:
-#
-# InternalSyncCompareExchange64 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-.globl ASM_PFX(InternalSyncCompareExchange64)
-
-#------------------------------------------------------------------------------
-# UINT64
-# EFIAPI
-# InternalSyncCompareExchange64 (
-# IN UINT64 *Value,
-# IN UINT64 CompareValue,
-# IN UINT64 ExchangeValue
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalSyncCompareExchange64):
- push %esi
- push %ebx
- movl 12(%esp), %esi
- movl 16(%esp), %eax
- movl 20(%esp), %edx
- movl 24(%esp), %ebx
- movl 28(%esp), %ecx
- lock
- cmpxchg8b (%esi)
- pop %ebx
- pop %esi
- ret
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.asm b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.asm
deleted file mode 100644
index 18311e77d3..0000000000
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.asm
+++ /dev/null
@@ -1,47 +0,0 @@
-;------------------------------------------------------------------------------
-;
-; 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:
-;
-; InterlockedCompareExchange64.Asm
-;
-; Abstract:
-;
-; InterlockedCompareExchange64 function
-;
-; Notes:
-;
-;------------------------------------------------------------------------------
-
- .586P
- .model flat,C
- .code
-
-;------------------------------------------------------------------------------
-; UINT64
-; EFIAPI
-; InternalSyncCompareExchange64 (
-; IN UINT64 *Value,
-; IN UINT64 CompareValue,
-; IN UINT64 ExchangeValue
-; );
-;------------------------------------------------------------------------------
-InternalSyncCompareExchange64 PROC USES esi ebx
- mov esi, [esp + 12]
- mov eax, [esp + 16]
- mov edx, [esp + 20]
- mov ebx, [esp + 24]
- mov ecx, [esp + 28]
- lock cmpxchg8b qword ptr [esi]
- ret
-InternalSyncCompareExchange64 ENDP
-
- END
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.c b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.c
deleted file mode 100644
index 63aafda4b6..0000000000
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/** @file
- InterlockedCompareExchange64 function
-
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- 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.
-
-**/
-
-
-
-
-/**
- Performs an atomic compare exchange operation on a 64-bit unsigned integer.
-
- Performs an atomic compare exchange operation on the 64-bit unsigned integer specified
- by Value. If Value is equal to CompareValue, then Value is set to ExchangeValue and
- CompareValue is returned. If Value is not equal to CompareValue, then Value is returned.
- The compare exchange operation must be performed using MP safe mechanisms.
-
- @param Value A pointer to the 64-bit value for the compare exchange
- operation.
- @param CompareValue 64-bit value used in compare operation.
- @param ExchangeValue 64-bit value used in exchange operation.
-
- @return The original *Value before exchange.
-
-**/
-UINT64
-EFIAPI
-InternalSyncCompareExchange64 (
- IN UINT64 *Value,
- IN UINT64 CompareValue,
- IN UINT64 ExchangeValue
- )
-{
- _asm {
- mov esi, Value
- mov eax, dword ptr [CompareValue + 0]
- mov edx, dword ptr [CompareValue + 4]
- mov ebx, dword ptr [ExchangeValue + 0]
- mov ecx, dword ptr [ExchangeValue + 4]
- lock cmpxchg8b qword ptr [esi]
- }
-}
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.S b/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.S
deleted file mode 100644
index bea5ac1d74..0000000000
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.S
+++ /dev/null
@@ -1,38 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006 - 2008, 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:
-#
-# InterlockedDecrement.S
-#
-# Abstract:
-#
-# InternalSyncDecrement function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-.globl ASM_PFX(InternalSyncDecrement)
-
-#------------------------------------------------------------------------------
-# UINT32
-# EFIAPI
-# InternalSyncDecrement (
-# IN UINT32 *Value
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalSyncDecrement):
- movl 4(%esp), %eax
- lock
- decl (%eax)
- movl (%eax), %eax
- ret
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.asm b/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.asm
deleted file mode 100644
index 082429e520..0000000000
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.asm
+++ /dev/null
@@ -1,42 +0,0 @@
-;------------------------------------------------------------------------------
-;
-; 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:
-;
-; InterlockedDecrement.Asm
-;
-; Abstract:
-;
-; InterlockedDecrement function
-;
-; Notes:
-;
-;------------------------------------------------------------------------------
-
- .386
- .model flat,C
- .code
-
-;------------------------------------------------------------------------------
-; UINT32
-; EFIAPI
-; InternalSyncDecrement (
-; IN UINT32 *Value
-; );
-;------------------------------------------------------------------------------
-InternalSyncDecrement PROC
- mov eax, [esp + 4]
- lock dec dword ptr [eax]
- mov eax, [eax]
- ret
-InternalSyncDecrement ENDP
-
- END
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.c b/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.c
deleted file mode 100644
index d1f0868a83..0000000000
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/** @file
- InterlockedDecrement function
-
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- 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.
-
-**/
-
-
-
-
-/**
- Performs an atomic decrement of an 32-bit unsigned integer.
-
- Performs an atomic decrement of the 32-bit unsigned integer specified by
- Value and returns the decrement value. The decrement operation must be
- performed using MP safe mechanisms. The state of the return value is not
- guaranteed to be MP safe.
-
- @param Value A pointer to the 32-bit value to decrement.
-
- @return The decrement value.
-
-**/
-UINT32
-EFIAPI
-InternalSyncDecrement (
- IN UINT32 *Value
- )
-{
- _asm {
- mov eax, Value
- lock dec dword ptr [eax]
- mov eax, [eax]
- }
-}
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.S b/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.S
deleted file mode 100644
index 6efbcee5ea..0000000000
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.S
+++ /dev/null
@@ -1,38 +0,0 @@
-#------------------------------------------------------------------------------
-#
-# Copyright (c) 2006 - 2008, 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:
-#
-# InterlockedIncrement.S
-#
-# Abstract:
-#
-# InternalSyncIncrement function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
-.globl ASM_PFX(InternalSyncIncrement)
-
-#------------------------------------------------------------------------------
-# UINT32
-# EFIAPI
-# InternalSyncIncrement (
-# IN UINT32 *Value
-# );
-#------------------------------------------------------------------------------
-ASM_PFX(InternalSyncIncrement):
- movl 4(%esp), %eax
- lock
- incl (%eax)
- movl (%eax), %eax
- ret
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.asm b/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.asm
deleted file mode 100644
index ea27e666ca..0000000000
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.asm
+++ /dev/null
@@ -1,42 +0,0 @@
-;------------------------------------------------------------------------------
-;
-; 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:
-;
-; InterlockedIncrement.Asm
-;
-; Abstract:
-;
-; InterlockedIncrement function
-;
-; Notes:
-;
-;------------------------------------------------------------------------------
-
- .386
- .model flat,C
- .code
-
-;------------------------------------------------------------------------------
-; UINT32
-; EFIAPI
-; InternalSyncIncrement (
-; IN UINT32 *Value
-; );
-;------------------------------------------------------------------------------
-InternalSyncIncrement PROC
- mov eax, [esp + 4]
- lock inc dword ptr [eax]
- mov eax, [eax]
- ret
-InternalSyncIncrement ENDP
-
- END
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.c b/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.c
deleted file mode 100644
index b1cc0c7332..0000000000
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/** @file
- InterLockedIncrement function
-
- Copyright (c) 2006 - 2008, Intel Corporation<BR>
- 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.
-
-**/
-
-
-
-
-/**
- Performs an atomic increment of an 32-bit unsigned integer.
-
- Performs an atomic increment of the 32-bit unsigned integer specified by
- Value and returns the incremented value. The increment operation must be
- performed using MP safe mechanisms. The state of the return value is not
- guaranteed to be MP safe.
-
- @param Value A pointer to the 32-bit value to increment.
-
- @return The incremented value.
-
-**/
-UINT32
-EFIAPI
-InternalSyncIncrement (
- IN UINT32 *Value
- )
-{
- _asm {
- mov eax, Value
- lock inc dword ptr [eax]
- mov eax, [eax]
- }
-}
-