From f7f897daefc5edc3ead909072d6e7309d76b5297 Mon Sep 17 00:00:00 2001 From: bbahnsen Date: Tue, 16 May 2006 20:34:23 +0000 Subject: [PATCH] Fixes for GCC. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@180 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.s | 2 +- MdePkg/Library/BaseLib/Ia32/ReadDr4.s | 41 ++++++++++++++++++++ MdePkg/Library/BaseLib/Ia32/ReadDr5.s | 41 ++++++++++++++++++++ MdePkg/Library/BaseLib/Ia32/SwapBytes64.s | 34 +++++++++++++++++ MdePkg/Library/BaseLib/Ia32/WriteDr4.s | 42 +++++++++++++++++++++ MdePkg/Library/BaseLib/Ia32/WriteDr5.s | 42 +++++++++++++++++++++ 6 files changed, 201 insertions(+), 1 deletion(-) create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr4.s create mode 100644 MdePkg/Library/BaseLib/Ia32/ReadDr5.s create mode 100644 MdePkg/Library/BaseLib/Ia32/SwapBytes64.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr4.s create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteDr5.s diff --git a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.s b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.s index e5d18c35b3..859369e50f 100644 --- a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.s +++ b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.s @@ -34,7 +34,7 @@ #------------------------------------------------------------------------------ .global _CpuBreakpoint _CpuBreakpoint: - int 3 + int $3 ret diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr4.s b/MdePkg/Library/BaseLib/Ia32/ReadDr4.s new file mode 100644 index 0000000000..7bff6766a4 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr4.s @@ -0,0 +1,41 @@ +#------------------------------------------------------------------------------ +# +# 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: +# +# ReadDr4.Asm +# +# Abstract: +# +# AsmReadDr4 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadDr4 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadDr4 +_AsmReadDr4: + movl %dr4, %eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr5.s b/MdePkg/Library/BaseLib/Ia32/ReadDr5.s new file mode 100644 index 0000000000..df409e3304 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/ReadDr5.s @@ -0,0 +1,41 @@ +#------------------------------------------------------------------------------ +# +# 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: +# +# ReadDr5.Asm +# +# Abstract: +# +# AsmReadDr5 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# UINTN +# EFIAPI +# AsmReadDr5 ( +# VOID +# ); +#------------------------------------------------------------------------------ +.global _AsmReadDr5 +_AsmReadDr5: + movl %dr5, %eax + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.s b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.s new file mode 100644 index 0000000000..01af949afa --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.s @@ -0,0 +1,34 @@ +#------------------------------------------------------------------------------ +# +# 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: +# +# CpuId.Asm +# +# Abstract: +# +# AsmCpuid function +# +# Notes: +# +#------------------------------------------------------------------------------ + + +.global _InternalMathSwapBytes64 +_InternalMathSwapBytes64: + + movl 8(%esp), %eax + movl 4(%esp), %edx + bswapl %eax + bswapl %edx + ret + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr4.s b/MdePkg/Library/BaseLib/Ia32/WriteDr4.s new file mode 100644 index 0000000000..20ddbd2903 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr4.s @@ -0,0 +1,42 @@ +#------------------------------------------------------------------------------ +# +# 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: +# +# WriteDr4.Asm +# +# Abstract: +# +# AsmWriteDr4 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteDr4 ( +# IN UINTN Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteDr4 +_AsmWriteDr4: + movl 4(%esp),%eax + movl %eax, %dr4 + ret + + + diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr5.s b/MdePkg/Library/BaseLib/Ia32/WriteDr5.s new file mode 100644 index 0000000000..057928a327 --- /dev/null +++ b/MdePkg/Library/BaseLib/Ia32/WriteDr5.s @@ -0,0 +1,42 @@ +#------------------------------------------------------------------------------ +# +# 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: +# +# WriteDr5.Asm +# +# Abstract: +# +# AsmWriteDr5 function +# +# Notes: +# +#------------------------------------------------------------------------------ + + + + + +#------------------------------------------------------------------------------ +# VOID +# EFIAPI +# AsmWriteDr5 ( +# IN UINTN Value +# ); +#------------------------------------------------------------------------------ +.global _AsmWriteDr5 +_AsmWriteDr5: + movl 4(%esp),%eax + movl %eax, %dr5 + ret + + + -- 2.39.2