--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ARShiftU64.asm\r
+#\r
+# Abstract:\r
+#\r
+# 64-bit arithmetic right shift function for IA-32\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _ARShiftU64\r
+_ARShiftU64: \r
+ movb 12(%esp),%cl\r
+ movl 8(%esp),%eax\r
+ cltd\r
+ testb $32,%cl\r
+# MISMATCH: " cmovz edx, eax"\r
+ cmovz %eax, %edx\r
+# MISMATCH: " cmovz eax, [esp + 4]"\r
+ cmovz 4(%esp), %eax\r
+ shrdl %cl,%edx,%eax\r
+ sar %cl,%edx\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ARShiftU64.asm\r
-#\r
-# Abstract:\r
-#\r
-# 64-bit arithmetic right shift function for IA-32\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _ARShiftU64\r
-_ARShiftU64: \r
- movb 12(%esp),%cl\r
- movl 8(%esp),%eax\r
- cltd\r
- testb $32,%cl\r
-# MISMATCH: " cmovz edx, eax"\r
- cmovz %eax, %edx\r
-# MISMATCH: " cmovz eax, [esp + 4]"\r
- cmovz 4(%esp), %eax\r
- shrdl %cl,%edx,%eax\r
- sar %cl,%edx\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------ ;\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# CpuBreakpoint.s\r
+#\r
+# Abstract:\r
+#\r
+# CpuBreakpoint function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# CpuBreakpoint (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _CpuBreakpoint\r
+_CpuBreakpoint: \r
+ int $3\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------ ;\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# CpuBreakpoint.s\r
-#\r
-# Abstract:\r
-#\r
-# CpuBreakpoint function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# CpuBreakpoint (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _CpuBreakpoint\r
-_CpuBreakpoint: \r
- int $3\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------ ;\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# CpuFlushTlb.Asm\r
+#\r
+# Abstract:\r
+#\r
+# CpuFlushTlb function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# CpuFlushTlb (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _CpuFlushTlb\r
+_CpuFlushTlb: \r
+ movl %cr3, %eax\r
+ movl %eax, %cr3\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------ ;\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# CpuFlushTlb.Asm\r
-#\r
-# Abstract:\r
-#\r
-# CpuFlushTlb function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# CpuFlushTlb (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _CpuFlushTlb\r
-_CpuFlushTlb: \r
- movl %cr3, %eax\r
- movl %eax, %cr3\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# CpuId.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmCpuid function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmCpuid (\r
+# IN UINT32 RegisterInEax,\r
+# OUT UINT32 *RegisterOutEax OPTIONAL,\r
+# OUT UINT32 *RegisterOutEbx OPTIONAL,\r
+# OUT UINT32 *RegisterOutEcx OPTIONAL,\r
+# OUT UINT32 *RegisterOutEdx OPTIONAL\r
+# )\r
+#------------------------------------------------------------------------------\r
+.globl _AsmCpuid\r
+_AsmCpuid:\r
+ push %ebx\r
+ push %edi\r
+ movl 12(%esp),%eax\r
+ cpuid\r
+ movl %ecx,%edi\r
+ movl 16(%esp),%ecx\r
+ jecxz L1\r
+ movl %eax,(%ecx)\r
+L1:\r
+ movl 20(%esp),%ecx\r
+ jecxz L2\r
+ movl %ebx,(%ecx)\r
+L2:\r
+ movl 24(%esp),%ecx\r
+ jecxz L3\r
+ movl %edi,(%ecx)\r
+L3:\r
+ movl 28(%esp),%ecx\r
+ jecxz L4\r
+ movl %edx,(%ecx)\r
+L4:\r
+ pop %edi\r
+ pop %ebx\r
+ ret\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# CpuId.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmCpuid function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmCpuid (\r
-# IN UINT32 RegisterInEax,\r
-# OUT UINT32 *RegisterOutEax OPTIONAL,\r
-# OUT UINT32 *RegisterOutEbx OPTIONAL,\r
-# OUT UINT32 *RegisterOutEcx OPTIONAL,\r
-# OUT UINT32 *RegisterOutEdx OPTIONAL\r
-# )\r
-#------------------------------------------------------------------------------\r
-.globl _AsmCpuid\r
-_AsmCpuid:\r
- push %ebx\r
- push %edi\r
- movl 12(%esp),%eax\r
- cpuid\r
- movl %ecx,%edi\r
- movl 16(%esp),%ecx\r
- jecxz L1\r
- movl %eax,(%ecx)\r
-L1:\r
- movl 20(%esp),%ecx\r
- jecxz L2\r
- movl %ebx,(%ecx)\r
-L2:\r
- movl 24(%esp),%ecx\r
- jecxz L3\r
- movl %edi,(%ecx)\r
-L3:\r
- movl 28(%esp),%ecx\r
- jecxz L4\r
- movl %edx,(%ecx)\r
-L4:\r
- pop %edi\r
- pop %ebx\r
- ret\r
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# CpuIdEx.Asm
+#
+# Abstract:
+#
+# AsmCpuidEx function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ .code:
+
+#------------------------------------------------------------------------------
+# UINT32
+# EFIAPI
+# AsmCpuidEx (
+# IN UINT32 RegisterInEax,
+# IN UINT32 RegisterInEcx,
+# OUT UINT32 *RegisterOutEax OPTIONAL,
+# OUT UINT32 *RegisterOutEbx OPTIONAL,
+# OUT UINT32 *RegisterOutEcx OPTIONAL,
+# OUT UINT32 *RegisterOutEdx OPTIONAL
+# )
+#------------------------------------------------------------------------------
+.globl _AsmCpuidEx
+_AsmCpuidEx:
+ push %ebx
+ pushl %ebp
+ movl %esp, %ebp
+ movl 12(%ebp), %eax
+ movl 16(%ebp), %ecx
+ cpuid
+ pushl %ecx
+ movl 20(%ebp), %ecx
+ jecxz L1
+ movl %eax, (%ecx)
+L1:
+ movl 24(%ebp), %ecx
+ jecxz L2
+ movl %ebx, (%ecx)
+L2:
+ movl 28(%ebp), %ecx
+ jecxz L3
+ popl %ecx
+L3:
+ movl 32(%ebp), %edx
+ jecxz L4
+ movl %edx, (%ecx)
+L4:
+ movl 12(%ebp), %eax
+ pop %ebx
+ leave
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# CpuIdEx.Asm
-#
-# Abstract:
-#
-# AsmCpuidEx function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .686:
- .code:
-
-#------------------------------------------------------------------------------
-# UINT32
-# EFIAPI
-# AsmCpuidEx (
-# IN UINT32 RegisterInEax,
-# IN UINT32 RegisterInEcx,
-# OUT UINT32 *RegisterOutEax OPTIONAL,
-# OUT UINT32 *RegisterOutEbx OPTIONAL,
-# OUT UINT32 *RegisterOutEcx OPTIONAL,
-# OUT UINT32 *RegisterOutEdx OPTIONAL
-# )
-#------------------------------------------------------------------------------
-.globl _AsmCpuidEx
-_AsmCpuidEx:
- push %ebx
- pushl %ebp
- movl %esp, %ebp
- movl 12(%ebp), %eax
- movl 16(%ebp), %ecx
- cpuid
- pushl %ecx
- movl 20(%ebp), %ecx
- jecxz L1
- movl %eax, (%ecx)
-L1:
- movl 24(%ebp), %ecx
- jecxz L2
- movl %ebx, (%ecx)
-L2:
- movl 28(%ebp), %ecx
- jecxz L3
- popl %ecx
-L3:
- movl 32(%ebp), %edx
- jecxz L4
- movl %edx, (%ecx)
-L4:
- movl 12(%ebp), %eax
- pop %ebx
- leave
- ret
--- /dev/null
+#------------------------------------------------------------------------------ ;\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# CpuPause.Asm\r
+#\r
+# Abstract:\r
+#\r
+# CpuPause function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# CpuPause (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _CpuPause\r
+_CpuPause: \r
+ pause\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------ ;\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# CpuPause.Asm\r
-#\r
-# Abstract:\r
-#\r
-# CpuPause function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# CpuPause (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _CpuPause\r
-_CpuPause: \r
- pause\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------ ;\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# CpuSleep.Asm\r
+#\r
+# Abstract:\r
+#\r
+# CpuSleep function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# CpuSleep (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _CpuSleep\r
+_CpuSleep: \r
+ hlt\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------ ;\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# CpuSleep.Asm\r
-#\r
-# Abstract:\r
-#\r
-# CpuSleep function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# CpuSleep (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _CpuSleep\r
-_CpuSleep: \r
- hlt\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# DisableInterrupts.Asm\r
+#\r
+# Abstract:\r
+#\r
+# DisableInterrupts function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# DisableInterrupts (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _DisableInterrupts\r
+_DisableInterrupts: \r
+ cli\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# DisableInterrupts.Asm\r
-#\r
-# Abstract:\r
-#\r
-# DisableInterrupts function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# DisableInterrupts (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _DisableInterrupts\r
-_DisableInterrupts: \r
- cli\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# DisablePaging32.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmDisablePaging32 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmDisablePaging32 (\r
+# IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
+# IN VOID *Context1, OPTIONAL\r
+# IN VOID *Context2, OPTIONAL\r
+# IN VOID *NewStack\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmDisablePaging32\r
+_AsmDisablePaging32: \r
+ movl 4(%esp),%ebx\r
+ movl 8(%esp),%ecx\r
+ movl 12(%esp),%edx\r
+ pushfl\r
+ popl %edi\r
+ cli\r
+ movl %cr0, %eax\r
+ btrl $31,%eax\r
+ movl 16(%esp),%esp\r
+ movl %eax, %cr0\r
+ pushl %edi\r
+ popfl\r
+ pushl %edx\r
+ pushl %ecx\r
+ call *%ebx\r
+ jmp .\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# DisablePaging32.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmDisablePaging32 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmDisablePaging32 (\r
-# IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
-# IN VOID *Context1, OPTIONAL\r
-# IN VOID *Context2, OPTIONAL\r
-# IN VOID *NewStack\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmDisablePaging32\r
-_AsmDisablePaging32: \r
- movl 4(%esp),%ebx\r
- movl 8(%esp),%ecx\r
- movl 12(%esp),%edx\r
- pushfl\r
- popl %edi\r
- cli\r
- movl %cr0, %eax\r
- btrl $31,%eax\r
- movl 16(%esp),%esp\r
- movl %eax, %cr0\r
- pushl %edi\r
- popfl\r
- pushl %edx\r
- pushl %ecx\r
- call *%ebx\r
- jmp .\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# DivError.asm\r
+#\r
+# Abstract:\r
+#\r
+# Set error flag for all division functions\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _InternalMathDivRemU64x32\r
+_InternalMathDivRemU64x32: \r
+ movl 12(%esp),%ecx\r
+ movl 8(%esp),%eax\r
+ xorl %edx,%edx\r
+ divl %ecx\r
+ pushl %eax\r
+ movl 8(%esp),%eax\r
+ divl %ecx\r
+ movl 20(%esp),%ecx\r
+ jecxz L1\r
+ movl %edx,(%ecx)\r
+L1: \r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# DivError.asm\r
-#\r
-# Abstract:\r
-#\r
-# Set error flag for all division functions\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _InternalMathDivRemU64x32\r
-_InternalMathDivRemU64x32: \r
- movl 12(%esp),%ecx\r
- movl 8(%esp),%eax\r
- xorl %edx,%edx\r
- divl %ecx\r
- pushl %eax\r
- movl 8(%esp),%eax\r
- divl %ecx\r
- movl 20(%esp),%ecx\r
- jecxz L1\r
- movl %edx,(%ecx)\r
-L1: \r
- popl %edx\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# DivU64x64Remainder.asm\r
+#\r
+# Abstract:\r
+#\r
+# Calculate the quotient of a 64-bit integer by a 64-bit integer and returns\r
+# both the quotient and the remainder\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.extern _InternalMathDivRemU64x32\r
+\r
+.global _InternalMathDivRemU64x64\r
+_InternalMathDivRemU64x64: \r
+ movl 16(%esp),%ecx\r
+ testl %ecx,%ecx\r
+ jnz _DivRemU64x64\r
+ movl 20(%esp),%ecx\r
+ jecxz L1\r
+ and $0,4(%ecx)\r
+ movl %ecx,16(%esp)\r
+L1: \r
+ jmp _InternalMathDivRemU64x32\r
+\r
+\r
+.global DivRemU64x64\r
+DivRemU64x64:\r
+# MISMATCH: "DivRemU64x64: USES ebx esi edi"\r
+ push %ebx \r
+ push %esi \r
+ push %edi \r
+ mov 20(%esp), %edx\r
+ mov 16(%esp), %eax\r
+ movl %edx,%edi\r
+ movl %eax,%esi\r
+ mov 24(%esp), %ebx\r
+L2: \r
+ shrl %edx\r
+ rcrl $1,%eax\r
+ shrdl $1,%ecx,%ebx\r
+ shrl %ecx\r
+ jnz L2\r
+ divl %ebx\r
+ movl %eax,%ebx\r
+ movl 28(%esp),%ecx\r
+ mull 24(%esp)\r
+ imull %ebx,%ecx\r
+ addl %ecx,%edx\r
+ mov 32(%esp), %ecx\r
+ jc TooLarge\r
+ cmpl %edx,%edi\r
+ ja Correct\r
+ jb TooLarge\r
+ cmpl %eax,%esi\r
+ jae Correct\r
+TooLarge: \r
+ decl %ebx\r
+ jecxz Return\r
+ sub 24(%esp), %eax\r
+ sbb 28(%esp), %edx\r
+Correct: \r
+ jecxz Return\r
+ subl %eax,%esi\r
+ sbbl %edx,%edi\r
+ movl %esi,(%ecx)\r
+ movl %edi,4(%ecx)\r
+Return: \r
+ movl %ebx,%eax\r
+ xorl %edx,%edx\r
+ push %edi \r
+ push %esi \r
+ push %ebx \r
+ ret\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# DivU64x64Remainder.asm\r
-#\r
-# Abstract:\r
-#\r
-# Calculate the quotient of a 64-bit integer by a 64-bit integer and returns\r
-# both the quotient and the remainder\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.extern _InternalMathDivRemU64x32\r
-\r
-.global _InternalMathDivRemU64x64\r
-_InternalMathDivRemU64x64: \r
- movl 16(%esp),%ecx\r
- testl %ecx,%ecx\r
- jnz _DivRemU64x64\r
- movl 20(%esp),%ecx\r
- jecxz L1\r
- and $0,4(%ecx)\r
- movl %ecx,16(%esp)\r
-L1: \r
- jmp _InternalMathDivRemU64x32\r
-\r
-\r
-.global DivRemU64x64\r
-DivRemU64x64:\r
-# MISMATCH: "DivRemU64x64: USES ebx esi edi"\r
- push %ebx \r
- push %esi \r
- push %edi \r
- mov 20(%esp), %edx\r
- mov 16(%esp), %eax\r
- movl %edx,%edi\r
- movl %eax,%esi\r
- mov 24(%esp), %ebx\r
-L2: \r
- shrl %edx\r
- rcrl $1,%eax\r
- shrdl $1,%ecx,%ebx\r
- shrl %ecx\r
- jnz L2\r
- divl %ebx\r
- movl %eax,%ebx\r
- movl 28(%esp),%ecx\r
- mull 24(%esp)\r
- imull %ebx,%ecx\r
- addl %ecx,%edx\r
- mov 32(%esp), %ecx\r
- jc TooLarge\r
- cmpl %edx,%edi\r
- ja Correct\r
- jb TooLarge\r
- cmpl %eax,%esi\r
- jae Correct\r
-TooLarge: \r
- decl %ebx\r
- jecxz Return\r
- sub 24(%esp), %eax\r
- sbb 28(%esp), %edx\r
-Correct: \r
- jecxz Return\r
- subl %eax,%esi\r
- sbbl %edx,%edi\r
- movl %esi,(%ecx)\r
- movl %edi,4(%ecx)\r
-Return: \r
- movl %ebx,%eax\r
- xorl %edx,%edx\r
- push %edi \r
- push %esi \r
- push %ebx \r
- ret\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# EnableDisableInterrupts.Asm\r
+#\r
+# Abstract:\r
+#\r
+# EnableDisableInterrupts function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# EnableDisableInterrupts (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _EnableDisableInterrupts\r
+_EnableDisableInterrupts: \r
+ sti\r
+ cli\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# EnableDisableInterrupts.Asm\r
-#\r
-# Abstract:\r
-#\r
-# EnableDisableInterrupts function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# EnableDisableInterrupts (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _EnableDisableInterrupts\r
-_EnableDisableInterrupts: \r
- sti\r
- cli\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# EnableInterrupts.Asm\r
+#\r
+# Abstract:\r
+#\r
+# EnableInterrupts function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# EnableInterrupts (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _EnableInterrupts\r
+_EnableInterrupts: \r
+ sti\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# EnableInterrupts.Asm\r
-#\r
-# Abstract:\r
-#\r
-# EnableInterrupts function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# EnableInterrupts (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _EnableInterrupts\r
-_EnableInterrupts: \r
- sti\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# EnablePaging32.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmEnablePaging32 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmEnablePaging32 (\r
+# IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
+# IN VOID *Context1, OPTIONAL\r
+# IN VOID *Context2, OPTIONAL\r
+# IN VOID *NewStack\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmEnablePaging32\r
+_AsmEnablePaging32: \r
+ movl 4(%esp),%ebx\r
+ movl 8(%esp),%ecx\r
+ movl 12(%esp),%edx\r
+ pushfl\r
+ popl %edi\r
+ cli\r
+ movl %cr0, %eax\r
+ btsl $31,%eax\r
+ movl 16(%esp),%esp\r
+ movl %eax, %cr0\r
+ pushl %edi\r
+ popfl\r
+ pushl %edx\r
+ pushl %ecx\r
+ call *%ebx\r
+ jmp .\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# EnablePaging32.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmEnablePaging32 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmEnablePaging32 (\r
-# IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
-# IN VOID *Context1, OPTIONAL\r
-# IN VOID *Context2, OPTIONAL\r
-# IN VOID *NewStack\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmEnablePaging32\r
-_AsmEnablePaging32: \r
- movl 4(%esp),%ebx\r
- movl 8(%esp),%ecx\r
- movl 12(%esp),%edx\r
- pushfl\r
- popl %edi\r
- cli\r
- movl %cr0, %eax\r
- btsl $31,%eax\r
- movl 16(%esp),%esp\r
- movl %eax, %cr0\r
- pushl %edi\r
- popfl\r
- pushl %edx\r
- pushl %ecx\r
- call *%ebx\r
- jmp .\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# EnablePaging64.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmEnablePaging64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+ \r
+ #.MODEL flat\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmEnablePaging64 (\r
+# IN UINT16 CodeSelector,\r
+# IN UINT64 EntryPoint,\r
+# IN UINT64 Context1, OPTIONAL\r
+# IN UINT64 Context2, OPTIONAL\r
+# IN UINT64 NewStack\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmEnablePaging64\r
+_AsmEnablePaging64:\r
+ cli\r
+ movl $$LongStart, (%esp)\r
+ movl %cr4, %eax\r
+ orb $0x20, %al\r
+ movl %eax, %cr4 # enable PAE\r
+ movl $0xc0000080, %ecx\r
+ rdmsr\r
+ orb $1, %ah # set LME\r
+ wrmsr\r
+ movl %cr0, %eax\r
+ btsl $31, %eax\r
+ movl %eax, %cr0 # enable paging\r
+ lret\r
+LongStart: # long mode starts here\r
+ .byte 0x67,0x48\r
+ movl (%esp), %ebx # mov rbx, [esp]\r
+ .byte 0x67,0x48\r
+ movl 8(%esp), %ecx # mov rcx, [esp + 8]\r
+ .byte 0x67,0x48\r
+ movl 0x10(%esp), %edx # mov rdx, [esp + 10h]\r
+ .byte 0x67,0x48\r
+ movl 0x18(%esp), %esp # mov rsp, [esp + 18h]\r
+ .byte 0x48\r
+ addl $0x-20, %esp # add rsp, -20h\r
+ call *%ebx # call rbx\r
+ jmp .\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# EnablePaging64.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmEnablePaging64 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
- \r
- #.MODEL flat\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmEnablePaging64 (\r
-# IN UINT16 CodeSelector,\r
-# IN UINT64 EntryPoint,\r
-# IN UINT64 Context1, OPTIONAL\r
-# IN UINT64 Context2, OPTIONAL\r
-# IN UINT64 NewStack\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmEnablePaging64\r
-_AsmEnablePaging64:\r
- cli\r
- movl $$LongStart, (%esp)\r
- movl %cr4, %eax\r
- orb $0x20, %al\r
- movl %eax, %cr4 # enable PAE\r
- movl $0xc0000080, %ecx\r
- rdmsr\r
- orb $1, %ah # set LME\r
- wrmsr\r
- movl %cr0, %eax\r
- btsl $31, %eax\r
- movl %eax, %cr0 # enable paging\r
- lret\r
-LongStart: # long mode starts here\r
- .byte 0x67,0x48\r
- movl (%esp), %ebx # mov rbx, [esp]\r
- .byte 0x67,0x48\r
- movl 8(%esp), %ecx # mov rcx, [esp + 8]\r
- .byte 0x67,0x48\r
- movl 0x10(%esp), %edx # mov rdx, [esp + 10h]\r
- .byte 0x67,0x48\r
- movl 0x18(%esp), %esp # mov rsp, [esp + 18h]\r
- .byte 0x48\r
- addl $0x-20, %esp # add rsp, -20h\r
- call *%ebx # call rbx\r
- jmp .\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# FlushCacheLine.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmFlushCacheLine function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmFlushCacheLine (\r
+# IN VOID *LinearAddress\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmFlushCacheLine\r
+_AsmFlushCacheLine: \r
+ movl 4(%esp),%eax\r
+ clflush (%eax)\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# FlushCacheLine.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmFlushCacheLine function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmFlushCacheLine (\r
-# IN VOID *LinearAddress\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmFlushCacheLine\r
-_AsmFlushCacheLine: \r
- movl 4(%esp),%eax\r
- clflush (%eax)\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# FxRestore.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmFxRestore function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmFxRestore (\r
+# IN CONST IA32_FX_BUFFER *Buffer\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmFxRestore\r
+_AsmFxRestore: \r
+ movl 4(%esp),%eax\r
+ fxrstor (%eax)\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# FxRestore.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmFxRestore function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmFxRestore (\r
-# IN CONST IA32_FX_BUFFER *Buffer\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmFxRestore\r
-_AsmFxRestore: \r
- movl 4(%esp),%eax\r
- fxrstor (%eax)\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# FxSave.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmFxSave function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmFxSave (\r
+# OUT IA32_FX_BUFFER *Buffer\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmFxSave\r
+_AsmFxSave: \r
+ movl 4(%esp),%eax\r
+ fxsave (%eax)\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# FxSave.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmFxSave function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmFxSave (\r
-# OUT IA32_FX_BUFFER *Buffer\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmFxSave\r
-_AsmFxSave: \r
- movl 4(%esp),%eax\r
- fxsave (%eax)\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# InterlockedCompareExchange32.Asm\r
+#\r
+# Abstract:\r
+#\r
+# InterlockedCompareExchange32 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID *\r
+# EFIAPI\r
+# InterlockedCompareExchangePointer (\r
+# IN VOID **Value,\r
+# IN VOID *CompareValue,\r
+# IN VOID *ExchangeValue\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _InterlockedCompareExchangePointer\r
+_InterlockedCompareExchangePointer: \r
+ #\r
+ # InterlockedCompareExchangePointer() shares the same code as\r
+ # InterlockedCompareExchange32() on IA32 and thus no code inside this\r
+ # function\r
+ #\r
+\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# InterlockedCompareExchange32 (\r
+# IN UINT32 *Value,\r
+# IN UINT32 CompareValue,\r
+# IN UINT32 ExchangeValue\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _InterlockedCompareExchange32\r
+_InterlockedCompareExchange32: \r
+ movl 4(%esp),%ecx\r
+ movl 8(%esp),%eax\r
+ movl 12(%esp),%edx\r
+ lock cmpxchgl %edx,(%ecx)\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# InterlockedCompareExchange32.Asm\r
-#\r
-# Abstract:\r
-#\r
-# InterlockedCompareExchange32 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID *\r
-# EFIAPI\r
-# InterlockedCompareExchangePointer (\r
-# IN VOID **Value,\r
-# IN VOID *CompareValue,\r
-# IN VOID *ExchangeValue\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _InterlockedCompareExchangePointer\r
-_InterlockedCompareExchangePointer: \r
- #\r
- # InterlockedCompareExchangePointer() shares the same code as\r
- # InterlockedCompareExchange32() on IA32 and thus no code inside this\r
- # function\r
- #\r
-\r
-\r
-#------------------------------------------------------------------------------\r
-# UINT32\r
-# EFIAPI\r
-# InterlockedCompareExchange32 (\r
-# IN UINT32 *Value,\r
-# IN UINT32 CompareValue,\r
-# IN UINT32 ExchangeValue\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _InterlockedCompareExchange32\r
-_InterlockedCompareExchange32: \r
- movl 4(%esp),%ecx\r
- movl 8(%esp),%eax\r
- movl 12(%esp),%edx\r
- lock cmpxchgl %edx,(%ecx)\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# InterlockedCompareExchange64.Asm\r
+#\r
+# Abstract:\r
+#\r
+# InterlockedCompareExchange64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# InterlockedCompareExchange64 (\r
+# IN UINT64 *Value,\r
+# IN UINT64 CompareValue,\r
+# IN UINT64 ExchangeValue\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _InterlockedCompareExchange64\r
+ push %esi\r
+ push %ebx\r
+ movl 12(%esp),%esi\r
+ movl 16(%esp),%eax\r
+ movl 20(%esp),%edx\r
+ movl 24(%esp),%ebx\r
+ movl 28(%esp),%ecx\r
+ lock \r
+ cmpxchg8b (%esi)\r
+ pop %ebx\r
+ pop %esi\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# InterlockedCompareExchange64.Asm\r
-#\r
-# Abstract:\r
-#\r
-# InterlockedCompareExchange64 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# InterlockedCompareExchange64 (\r
-# IN UINT64 *Value,\r
-# IN UINT64 CompareValue,\r
-# IN UINT64 ExchangeValue\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _InterlockedCompareExchange64\r
- push %esi\r
- push %ebx\r
- movl 12(%esp),%esi\r
- movl 16(%esp),%eax\r
- movl 20(%esp),%edx\r
- movl 24(%esp),%ebx\r
- movl 28(%esp),%ecx\r
- lock \r
- cmpxchg8b (%esi)\r
- pop %ebx\r
- pop %esi\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# InterlockedDecrement.Asm\r
+#\r
+# Abstract:\r
+#\r
+# InterlockedDecrement function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# InterlockedDecrement (\r
+# IN UINT32 *Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _InterlockedDecrement\r
+_InterlockedDecrement: \r
+ movl 4(%esp),%eax\r
+ lock \r
+ decl (%eax)\r
+ movl (%eax),%eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# InterlockedDecrement.Asm\r
-#\r
-# Abstract:\r
-#\r
-# InterlockedDecrement function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT32\r
-# EFIAPI\r
-# InterlockedDecrement (\r
-# IN UINT32 *Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _InterlockedDecrement\r
-_InterlockedDecrement: \r
- movl 4(%esp),%eax\r
- lock \r
- decl (%eax)\r
- movl (%eax),%eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# InterlockedIncrement.Asm\r
+#\r
+# Abstract:\r
+#\r
+# InterlockedIncrement function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# InterlockedIncrement (\r
+# IN UINT32 *Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _InterlockedIncrement\r
+_InterlockedIncrement: \r
+ movl 4(%esp),%eax\r
+ lock \r
+ incl (%eax)\r
+ movl (%eax),%eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# InterlockedIncrement.Asm\r
-#\r
-# Abstract:\r
-#\r
-# InterlockedIncrement function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT32\r
-# EFIAPI\r
-# InterlockedIncrement (\r
-# IN UINT32 *Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _InterlockedIncrement\r
-_InterlockedIncrement: \r
- movl 4(%esp),%eax\r
- lock \r
- incl (%eax)\r
- movl (%eax),%eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# Invd.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmInvd function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmInvd (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmInvd\r
+_AsmInvd: \r
+ invd\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# Invd.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmInvd function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmInvd (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmInvd\r
-_AsmInvd: \r
- invd\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# LRotU64.asm\r
+#\r
+# Abstract:\r
+#\r
+# 64-bit left rotation for Ia32\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _LRotU64\r
+ push %ebx\r
+ movb 16(%esp),%cl\r
+ movl 12(%esp),%edx\r
+ movl 8(%esp),%eax\r
+ shldl %cl,%edx,%ebx\r
+ shldl %cl,%eax,%edx\r
+ rorl %cl,%ebx\r
+ shldl %cl,%ebx,%eax\r
+ testb $32,%cl\r
+ cmovnz %eax, %ecx\r
+ cmovnz %edx, %eax \r
+ cmovnz %ecx, %edx\r
+ pop %ebx\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# LRotU64.asm\r
-#\r
-# Abstract:\r
-#\r
-# 64-bit left rotation for Ia32\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _LRotU64\r
- push %ebx\r
- movb 16(%esp),%cl\r
- movl 12(%esp),%edx\r
- movl 8(%esp),%eax\r
- shldl %cl,%edx,%ebx\r
- shldl %cl,%eax,%edx\r
- rorl %cl,%ebx\r
- shldl %cl,%ebx,%eax\r
- testb $32,%cl\r
- cmovnz %eax, %ecx\r
- cmovnz %edx, %eax \r
- cmovnz %ecx, %edx\r
- pop %ebx\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# LongJump.Asm
+#
+# Abstract:
+#
+# Implementation of _LongJump() on IA-32.
+#
+#------------------------------------------------------------------------------
+
+ .386:
+ .code:
+
+.globl _InternalLongJump
+_InternalLongJump:
+ popl %eax
+ popl %edx
+ popl %eax
+ movl (%edx), %ebx
+ movl 4(%edx), %esi
+ movl 8(%edx), %edi
+ movl 12(%edx), %ebp
+ movl 16(%edx), %esp
+ jmp *20(%edx)
+#InternalLongJump ENDP
+
+
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# LongJump.Asm
-#
-# Abstract:
-#
-# Implementation of _LongJump() on IA-32.
-#
-#------------------------------------------------------------------------------
-
- .386:
- .code:
-
-.globl _InternalLongJump
-_InternalLongJump:
- popl %eax
- popl %edx
- popl %eax
- movl (%edx), %ebx
- movl 4(%edx), %esi
- movl 8(%edx), %edi
- movl 12(%edx), %ebp
- movl 16(%edx), %esp
- jmp *20(%edx)
-#InternalLongJump ENDP
-
-
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# DivU64x32.asm\r
+#\r
+# Abstract:\r
+#\r
+# Calculate the remainder of a 64-bit integer by a 32-bit integer\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _ModU64x32\r
+_ModU64x32: \r
+ movl 8(%esp),%eax\r
+ movl 12(%esp),%ecx\r
+ xorl %edx,%edx\r
+ divl %ecx\r
+ movl 4(%esp),%eax\r
+ divl %ecx\r
+ movl %edx,%eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# DivU64x32.asm\r
-#\r
-# Abstract:\r
-#\r
-# Calculate the remainder of a 64-bit integer by a 32-bit integer\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _ModU64x32\r
-_ModU64x32: \r
- movl 8(%esp),%eax\r
- movl 12(%esp),%ecx\r
- xorl %edx,%edx\r
- divl %ecx\r
- movl 4(%esp),%eax\r
- divl %ecx\r
- movl %edx,%eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# Monitor.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmMonitor function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmMonitor (\r
+# IN UINTN Eax,\r
+# IN UINTN Ecx,\r
+# IN UINTN Edx\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmMonitor\r
+_AsmMonitor: \r
+ movl 4(%esp),%eax\r
+ movl 8(%esp),%ecx\r
+ movl 12(%esp),%edx\r
+ monitor %eax,%ecx,%edx\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# Monitor.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmMonitor function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmMonitor (\r
-# IN UINTN Eax,\r
-# IN UINTN Ecx,\r
-# IN UINTN Edx\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmMonitor\r
-_AsmMonitor: \r
- movl 4(%esp),%eax\r
- movl 8(%esp),%ecx\r
- movl 12(%esp),%edx\r
- monitor %eax,%ecx,%edx\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# MultU64x64.asm\r
+#\r
+# Abstract:\r
+#\r
+# Calculate the product of a 64-bit integer and another 64-bit integer\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _MultS64x64\r
+_MultS64x64: \r
+ #\r
+ # MultS64x32 shares the same implementation with _MultU64x32, and thus no\r
+ # code inside this function.\r
+ #\r
+\r
+\r
+.global _MultU64x64\r
+ push %ebx\r
+ movl 8(%esp),%ebx\r
+ movl 16(%esp),%edx\r
+ movl %ebx,%ecx\r
+ movl %edx,%eax\r
+ imull 20(%esp),%ebx\r
+ imull 12(%esp),%edx\r
+ addl %edx,%ebx\r
+ mull %ecx\r
+ addl %ebx,%edx\r
+ pop %ebx\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# MultU64x64.asm\r
-#\r
-# Abstract:\r
-#\r
-# Calculate the product of a 64-bit integer and another 64-bit integer\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _MultS64x64\r
-_MultS64x64: \r
- #\r
- # MultS64x32 shares the same implementation with _MultU64x32, and thus no\r
- # code inside this function.\r
- #\r
-\r
-\r
-.global _MultU64x64\r
- push %ebx\r
- movl 8(%esp),%ebx\r
- movl 16(%esp),%edx\r
- movl %ebx,%ecx\r
- movl %edx,%eax\r
- imull 20(%esp),%ebx\r
- imull 12(%esp),%edx\r
- addl %edx,%ebx\r
- mull %ecx\r
- addl %ebx,%edx\r
- pop %ebx\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# Mwait.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmMwait function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmMwait (\r
+# IN UINTN Eax,\r
+# IN UINTN Ecx\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmMwait\r
+_AsmMwait: \r
+ movl 4(%esp),%eax\r
+ movl 8(%esp),%ecx\r
+ mwait %eax,%ecx\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# Mwait.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmMwait function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmMwait (\r
-# IN UINTN Eax,\r
-# IN UINTN Ecx\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmMwait\r
-_AsmMwait: \r
- movl 4(%esp),%eax\r
- movl 8(%esp),%ecx\r
- mwait %eax,%ecx\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# RRotU64.asm\r
+#\r
+# Abstract:\r
+#\r
+# 64-bit right rotation for Ia32\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _RRotU64\r
+ push %ebx\r
+ movb 16(%esp),%cl\r
+ movl 8(%esp),%eax\r
+ movl 12(%esp),%edx\r
+ shrdl %cl,%eax,%ebx\r
+ shrdl %cl,%edx,%eax\r
+ roll %cl,%ebx\r
+ shrdl %cl,%ebx,%edx\r
+ testb $32,%cl\r
+ cmovnz %eax, %ecx\r
+ cmovnz %edx, %eax\r
+ cmovnz %ecx, %edx\r
+ pop %ebx\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# RRotU64.asm\r
-#\r
-# Abstract:\r
-#\r
-# 64-bit right rotation for Ia32\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _RRotU64\r
- push %ebx\r
- movb 16(%esp),%cl\r
- movl 8(%esp),%eax\r
- movl 12(%esp),%edx\r
- shrdl %cl,%eax,%ebx\r
- shrdl %cl,%edx,%eax\r
- roll %cl,%ebx\r
- shrdl %cl,%ebx,%edx\r
- testb $32,%cl\r
- cmovnz %eax, %ecx\r
- cmovnz %edx, %eax\r
- cmovnz %ecx, %edx\r
- pop %ebx\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadCr0.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadCr0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadCr0 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadCr0\r
+_AsmReadCr0: \r
+ movl %cr0, %eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadCr0.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadCr0 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadCr0 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadCr0\r
-_AsmReadCr0: \r
- movl %cr0, %eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadCr2.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadCr2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadCr2 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadCr2\r
+_AsmReadCr2: \r
+ movl %cr2, %eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadCr2.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadCr2 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadCr2 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadCr2\r
-_AsmReadCr2: \r
- movl %cr2, %eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadCr3.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadCr3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadCr3 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadCr3\r
+_AsmReadCr3: \r
+ movl %cr3, %eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadCr3.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadCr3 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadCr3 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadCr3\r
-_AsmReadCr3: \r
- movl %cr3, %eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadCr4.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadCr4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadCr4 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadCr4\r
+_AsmReadCr4: \r
+ movl %cr4, %eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadCr4.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadCr4 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadCr4 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadCr4\r
-_AsmReadCr4: \r
- movl %cr4, %eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadCs.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadCs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadCs (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadCs\r
+_AsmReadCs: \r
+ movw %cs,%ax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadCs.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadCs function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadCs (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadCs\r
-_AsmReadCs: \r
- movw %cs,%ax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadDr0.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDr0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr0 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDr0\r
+_AsmReadDr0: \r
+ movl %dr0, %eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadDr0.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDr0 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadDr0 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDr0\r
-_AsmReadDr0: \r
- movl %dr0, %eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadDr1.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDr1 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr1 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDr1\r
+_AsmReadDr1: \r
+ movl %dr1, %eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadDr1.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDr1 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadDr1 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDr1\r
-_AsmReadDr1: \r
- movl %dr1, %eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadDr2.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDr2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr2 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDr2\r
+_AsmReadDr2: \r
+ movl %dr2, %eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadDr2.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDr2 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadDr2 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDr2\r
-_AsmReadDr2: \r
- movl %dr2, %eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadDr3.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDr3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr3 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDr3\r
+_AsmReadDr3: \r
+ movl %dr3, %eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadDr3.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDr3 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadDr3 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDr3\r
-_AsmReadDr3: \r
- movl %dr3, %eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadDr4.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDr4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr4 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDr4\r
+_AsmReadDr4: \r
+ movl %dr4, %eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadDr4.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDr4 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadDr4 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDr4\r
-_AsmReadDr4: \r
- movl %dr4, %eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadDr5.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDr5 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr5 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDr5\r
+_AsmReadDr5: \r
+ movl %dr5, %eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadDr5.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDr5 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadDr5 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDr5\r
-_AsmReadDr5: \r
- movl %dr5, %eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadDr6.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDr6 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr6 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDr6\r
+_AsmReadDr6: \r
+ movl %dr6, %eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadDr6.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDr6 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadDr6 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDr6\r
-_AsmReadDr6: \r
- movl %dr6, %eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadDr7.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDr7 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadDr7 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDr7\r
+_AsmReadDr7: \r
+ movl %dr7, %eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadDr7.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDr7 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadDr7 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDr7\r
-_AsmReadDr7: \r
- movl %dr7, %eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadDs.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadDs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadDs (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadDs\r
+_AsmReadDs: \r
+ movw %ds,%ax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadDs.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadDs function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadDs (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadDs\r
-_AsmReadDs: \r
- movw %ds,%ax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadEflags.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadEflags function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadEflags (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadEflags\r
+_AsmReadEflags: \r
+ pushfl\r
+ popl %eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadEflags.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadEflags function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadEflags (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadEflags\r
-_AsmReadEflags: \r
- pushfl\r
- popl %eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadEs.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadEs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadEs (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadEs\r
+_AsmReadEs: \r
+ movw %es,%ax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadEs.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadEs function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadEs (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadEs\r
-_AsmReadEs: \r
- movw %es,%ax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadFs.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadFs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadFs (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadFs\r
+_AsmReadFs: \r
+ movw %fs,%ax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadFs.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadFs function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadFs (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadFs\r
-_AsmReadFs: \r
- movw %fs,%ax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadGdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadGdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmReadGdtr (\r
+# OUT IA32_DESCRIPTOR *Gdtr\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadGdtr\r
+_AsmReadGdtr: \r
+ movl 4(%esp),%eax\r
+ sgdt (%eax)\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadGdtr.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadGdtr function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmReadGdtr (\r
-# OUT IA32_DESCRIPTOR *Gdtr\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadGdtr\r
-_AsmReadGdtr: \r
- movl 4(%esp),%eax\r
- sgdt (%eax)\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadGs.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadGs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadGs (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadGs\r
+_AsmReadGs: \r
+ movw %gs,%ax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadGs.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadGs function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadGs (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadGs\r
-_AsmReadGs: \r
- movw %gs,%ax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadIdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadIdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmReadIdtr (\r
+# OUT IA32_DESCRIPTOR *Idtr\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadIdtr\r
+_AsmReadIdtr: \r
+ movl 4(%esp),%eax\r
+ sidt (%eax)\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadIdtr.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadIdtr function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmReadIdtr (\r
-# OUT IA32_DESCRIPTOR *Idtr\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadIdtr\r
-_AsmReadIdtr: \r
- movl 4(%esp),%eax\r
- sidt (%eax)\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadLdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadLdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadLdtr (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadLdtr\r
+_AsmReadLdtr: \r
+ sldt %eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadLdtr.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadLdtr function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadLdtr (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadLdtr\r
-_AsmReadLdtr: \r
- sldt %eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadMm0.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm0 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm0\r
+_AsmReadMm0: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm0,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadMm0.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm0 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm0 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm0\r
-_AsmReadMm0: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm0,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadMm1.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm1 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm1 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm1\r
+_AsmReadMm1: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm1,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadMm1.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm1 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm1 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm1\r
-_AsmReadMm1: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm1,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadMm2.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm2 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm2\r
+_AsmReadMm2: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm2,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadMm2.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm2 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm2 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm2\r
-_AsmReadMm2: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm2,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadMm3.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm3 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm3\r
+_AsmReadMm3: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm3,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadMm3.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm3 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm3 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm3\r
-_AsmReadMm3: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm3,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadMm4.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm4 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm4\r
+_AsmReadMm4: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm4,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadMm4.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm4 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm4 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm4\r
-_AsmReadMm4: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm4,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadMm5.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm5 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm5 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm5\r
+_AsmReadMm5: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm5,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadMm5.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm5 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm5 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm5\r
-_AsmReadMm5: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm5,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadMm6.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm6 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm6 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm6\r
+_AsmReadMm6: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm6,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadMm6.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm6 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm6 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm6\r
-_AsmReadMm6: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm6,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadMm7.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMm7 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmReadMm7 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMm7\r
+_AsmReadMm7: \r
+ pushl %eax\r
+ pushl %eax\r
+ movq %mm7,(%esp)\r
+ popl %eax\r
+ popl %edx\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadMm7.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMm7 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmReadMm7 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMm7\r
-_AsmReadMm7: \r
- pushl %eax\r
- pushl %eax\r
- movq %mm7,(%esp)\r
- popl %eax\r
- popl %edx\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadMsr64.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadMsr64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# AsmReadMsr32 (\r
+# IN UINT32 Index\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMsr32\r
+_AsmReadMsr32: \r
+ #\r
+ # AsmReadMsr32 shares the same implementation with AsmReadMsr64 and thus no\r
+ # code inside this function\r
+ #\r
+\r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmReadMsr64 (\r
+# IN UINT64 Index\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadMsr64\r
+_AsmReadMsr64: \r
+ movl 4(%esp),%ecx\r
+ rdmsr\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadMsr64.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadMsr64 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT32\r
-# EFIAPI\r
-# AsmReadMsr32 (\r
-# IN UINT32 Index\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMsr32\r
-_AsmReadMsr32: \r
- #\r
- # AsmReadMsr32 shares the same implementation with AsmReadMsr64 and thus no\r
- # code inside this function\r
- #\r
-\r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmReadMsr64 (\r
-# IN UINT64 Index\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadMsr64\r
-_AsmReadMsr64: \r
- movl 4(%esp),%ecx\r
- rdmsr\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadPmc.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadPmc function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmReadPmc (\r
+# IN UINT32 PmcIndex\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadPmc\r
+_AsmReadPmc: \r
+ movl 4(%esp),%ecx\r
+ rdpmc\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadPmc.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadPmc function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmReadPmc (\r
-# IN UINT32 PmcIndex\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadPmc\r
-_AsmReadPmc: \r
- movl 4(%esp),%ecx\r
- rdpmc\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadSs.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadSs function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadSs (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadSs\r
+_AsmReadSs: \r
+ movw %ss,%ax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadSs.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadSs function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadSs (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadSs\r
-_AsmReadSs: \r
- movw %ss,%ax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadTr.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadTr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT16\r
+# EFIAPI\r
+# AsmReadTr (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadTr\r
+_AsmReadTr: \r
+ str %eax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadTr.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadTr function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT16\r
-# EFIAPI\r
-# AsmReadTr (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadTr\r
-_AsmReadTr: \r
- str %eax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# ReadTsc.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmReadTsc function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmReadTsc (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmReadTsc\r
+_AsmReadTsc: \r
+ rdtsc\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# ReadTsc.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmReadTsc function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmReadTsc (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmReadTsc\r
-_AsmReadTsc: \r
- rdtsc\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# SetJump.Asm\r
+#\r
+# Abstract:\r
+#\r
+# Implementation of SetJump() on IA-32.\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+.global _SetJump\r
+_SetJump: \r
+ popl %ecx\r
+ movl (%esp),%edx\r
+ movl %ebx,(%edx)\r
+ movl %esi,4(%edx)\r
+ movl %edi,8(%edx)\r
+ movl %ebp,12(%edx)\r
+ movl %esp,16(%edx)\r
+ movl %ecx,20(%edx)\r
+ xorl %eax,%eax\r
+ jmp *%ecx\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# SetJump.Asm\r
-#\r
-# Abstract:\r
-#\r
-# Implementation of SetJump() on IA-32.\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-.global _SetJump\r
-_SetJump: \r
- popl %ecx\r
- movl (%esp),%edx\r
- movl %ebx,(%edx)\r
- movl %esi,4(%edx)\r
- movl %edi,8(%edx)\r
- movl %ebp,12(%edx)\r
- movl %esp,16(%edx)\r
- movl %ecx,20(%edx)\r
- xorl %eax,%eax\r
- jmp *%ecx\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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
+
+
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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
-
-
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# Thunk.asm\r
+#\r
+# Abstract:\r
+#\r
+# Real mode thunk\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+\r
+ ##########\r
+ # FIXME! #\r
+ ##########\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# Thunk.asm\r
-#\r
-# Abstract:\r
-#\r
-# Real mode thunk\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
-\r
- ##########\r
- # FIXME! #\r
- ##########\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# Wbinvd.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWbinvd function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWbinvd (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWbinvd\r
+_AsmWbinvd: \r
+ wbinvd\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# Wbinvd.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWbinvd function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWbinvd (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWbinvd\r
-_AsmWbinvd: \r
- wbinvd\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteCr0.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteCr0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr0 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteCr0\r
+_AsmWriteCr0: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %cr0\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteCr0.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteCr0 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmWriteCr0 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteCr0\r
-_AsmWriteCr0: \r
- movl 4(%esp),%eax\r
- movl %eax, %cr0\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteCr2.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteCr2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr2 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteCr2\r
+_AsmWriteCr2: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %cr2\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteCr2.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteCr2 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmWriteCr2 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteCr2\r
-_AsmWriteCr2: \r
- movl 4(%esp),%eax\r
- movl %eax, %cr2\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteCr3.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteCr3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr3 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteCr3\r
+_AsmWriteCr3: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %cr3\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteCr3.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteCr3 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmWriteCr3 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteCr3\r
-_AsmWriteCr3: \r
- movl 4(%esp),%eax\r
- movl %eax, %cr3\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteCr4.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteCr4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINTN\r
+# EFIAPI\r
+# AsmWriteCr4 (\r
+# VOID\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteCr4\r
+_AsmWriteCr4: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %cr4\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteCr4.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteCr4 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINTN\r
-# EFIAPI\r
-# AsmWriteCr4 (\r
-# VOID\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteCr4\r
-_AsmWriteCr4: \r
- movl 4(%esp),%eax\r
- movl %eax, %cr4\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteDr0.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteDr0 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteDr0\r
+_AsmWriteDr0: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %dr0\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteDr0.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteDr0 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteDr0 (\r
-# IN UINTN Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteDr0\r
-_AsmWriteDr0: \r
- movl 4(%esp),%eax\r
- movl %eax, %dr0\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteDr1.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr1 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteDr1 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteDr1\r
+_AsmWriteDr1: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %dr1\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteDr1.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteDr1 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteDr1 (\r
-# IN UINTN Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteDr1\r
-_AsmWriteDr1: \r
- movl 4(%esp),%eax\r
- movl %eax, %dr1\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteDr2.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteDr2 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteDr2\r
+_AsmWriteDr2: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %dr2\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteDr2.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteDr2 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteDr2 (\r
-# IN UINTN Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteDr2\r
-_AsmWriteDr2: \r
- movl 4(%esp),%eax\r
- movl %eax, %dr2\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteDr3.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteDr3 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteDr3\r
+_AsmWriteDr3: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %dr3\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteDr3.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteDr3 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteDr3 (\r
-# IN UINTN Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteDr3\r
-_AsmWriteDr3: \r
- movl 4(%esp),%eax\r
- movl %eax, %dr3\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteDr4.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteDr4 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteDr4\r
+_AsmWriteDr4: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %dr4\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteDr4.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteDr4 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteDr4 (\r
-# IN UINTN Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteDr4\r
-_AsmWriteDr4: \r
- movl 4(%esp),%eax\r
- movl %eax, %dr4\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteDr5.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr5 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteDr5 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteDr5\r
+_AsmWriteDr5: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %dr5\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteDr5.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteDr5 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteDr5 (\r
-# IN UINTN Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteDr5\r
-_AsmWriteDr5: \r
- movl 4(%esp),%eax\r
- movl %eax, %dr5\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteDr6.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr6 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteDr6 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteDr6\r
+_AsmWriteDr6: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %dr6\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteDr6.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteDr6 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteDr6 (\r
-# IN UINTN Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteDr6\r
-_AsmWriteDr6: \r
- movl 4(%esp),%eax\r
- movl %eax, %dr6\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteDr7.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteDr7 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteDr7 (\r
+# IN UINTN Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteDr7\r
+_AsmWriteDr7: \r
+ movl 4(%esp),%eax\r
+ movl %eax, %dr7\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteDr7.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteDr7 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteDr7 (\r
-# IN UINTN Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteDr7\r
-_AsmWriteDr7: \r
- movl 4(%esp),%eax\r
- movl %eax, %dr7\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteGdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteGdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteGdtr (\r
+# OUT IA32_DESCRIPTOR *Gdtr\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteGdtr\r
+_AsmWriteGdtr: \r
+ movl 4(%esp),%eax\r
+ lgdt (%eax)\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteGdtr.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteGdtr function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteGdtr (\r
-# OUT IA32_DESCRIPTOR *Gdtr\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteGdtr\r
-_AsmWriteGdtr: \r
- movl 4(%esp),%eax\r
- lgdt (%eax)\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteIdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteIdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteIdtr (\r
+# OUT IA32_DESCRIPTOR *Idtr\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteIdtr\r
+_AsmWriteIdtr: \r
+ movl 4(%esp),%eax\r
+ lidt (%eax)\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteIdtr.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteIdtr function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteIdtr (\r
-# OUT IA32_DESCRIPTOR *Idtr\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteIdtr\r
-_AsmWriteIdtr: \r
- movl 4(%esp),%eax\r
- lidt (%eax)\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteLdtr.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteLdtr function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# VOID\r
+# EFIAPI\r
+# AsmWriteLdtr (\r
+# IN UINT16 Ldtr\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteLdtr\r
+_AsmWriteLdtr: \r
+ movl 4(%esp),%eax\r
+ lldtw %ax\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteLdtr.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteLdtr function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# VOID\r
-# EFIAPI\r
-# AsmWriteLdtr (\r
-# IN UINT16 Ldtr\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteLdtr\r
-_AsmWriteLdtr: \r
- movl 4(%esp),%eax\r
- lldtw %ax\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm0.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm0 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm0 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm0\r
+_AsmWriteMm0: \r
+ movq 4(%esp),%mm0\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteMm0.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm0 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm0 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm0\r
-_AsmWriteMm0: \r
- movq 4(%esp),%mm0\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm1.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm1 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm1 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm1\r
+_AsmWriteMm1: \r
+ movq 4(%esp),%mm1\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteMm1.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm1 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm1 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm1\r
-_AsmWriteMm1: \r
- movq 4(%esp),%mm1\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm2.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm2 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm2 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm2\r
+_AsmWriteMm2: \r
+ movq 4(%esp),%mm2\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteMm2.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm2 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm2 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm2\r
-_AsmWriteMm2: \r
- movq 4(%esp),%mm2\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm3.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm3 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm3 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm3\r
+_AsmWriteMm3: \r
+ movq 4(%esp),%mm3\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteMm3.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm3 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm3 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm3\r
-_AsmWriteMm3: \r
- movq 4(%esp),%mm3\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm4.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm4 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm4 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm4\r
+_AsmWriteMm4: \r
+ movq 4(%esp),%mm4\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteMm4.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm4 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm4 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm4\r
-_AsmWriteMm4: \r
- movq 4(%esp),%mm4\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm5.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm5 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm5 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm5\r
+_AsmWriteMm5: \r
+ movq 4(%esp),%mm5\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteMm5.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm5 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm5 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm5\r
-_AsmWriteMm5: \r
- movq 4(%esp),%mm5\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm6.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm6 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm6 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm6\r
+_AsmWriteMm6: \r
+ movq 4(%esp),%mm6\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteMm6.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm6 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm6 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm6\r
-_AsmWriteMm6: \r
- movq 4(%esp),%mm6\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMm7.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMm7 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMm7 (\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMm7\r
+_AsmWriteMm7: \r
+ movq 4(%esp),%mm7\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteMm7.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMm7 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMm7 (\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMm7\r
-_AsmWriteMm7: \r
- movq 4(%esp),%mm7\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMsr32.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMsr32 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT32\r
+# EFIAPI\r
+# AsmWriteMsr32 (\r
+# IN UINT32 Index,\r
+# IN UINT32 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMsr32\r
+_AsmWriteMsr32: \r
+ movl 8(%esp),%eax\r
+ xorl %edx,%edx\r
+ movl 4(%esp),%ecx\r
+ wrmsr\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteMsr32.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMsr32 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT32\r
-# EFIAPI\r
-# AsmWriteMsr32 (\r
-# IN UINT32 Index,\r
-# IN UINT32 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMsr32\r
-_AsmWriteMsr32: \r
- movl 8(%esp),%eax\r
- xorl %edx,%edx\r
- movl 4(%esp),%ecx\r
- wrmsr\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------\r
+#\r
+# Copyright (c) 2006, Intel Corporation\r
+# All rights reserved. This program and the accompanying materials\r
+# are licensed and made available under the terms and conditions of the BSD License\r
+# which accompanies this distribution. The full text of the license may be found at\r
+# http://opensource.org/licenses/bsd-license.php\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+# Module Name:\r
+#\r
+# WriteMsr64.Asm\r
+#\r
+# Abstract:\r
+#\r
+# AsmWriteMsr64 function\r
+#\r
+# Notes:\r
+#\r
+#------------------------------------------------------------------------------\r
+\r
+\r
+\r
+ \r
+\r
+#------------------------------------------------------------------------------\r
+# UINT64\r
+# EFIAPI\r
+# AsmWriteMsr64 (\r
+# IN UINT32 Index,\r
+# IN UINT64 Value\r
+# );\r
+#------------------------------------------------------------------------------\r
+.global _AsmWriteMsr64\r
+_AsmWriteMsr64: \r
+ movl 12(%esp),%edx\r
+ movl 8(%esp),%eax\r
+ movl 4(%esp),%ecx\r
+ wrmsr\r
+ ret\r
+\r
+\r
+\r
+++ /dev/null
-#------------------------------------------------------------------------------\r
-#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-# Module Name:\r
-#\r
-# WriteMsr64.Asm\r
-#\r
-# Abstract:\r
-#\r
-# AsmWriteMsr64 function\r
-#\r
-# Notes:\r
-#\r
-#------------------------------------------------------------------------------\r
-\r
-\r
-\r
- \r
-\r
-#------------------------------------------------------------------------------\r
-# UINT64\r
-# EFIAPI\r
-# AsmWriteMsr64 (\r
-# IN UINT32 Index,\r
-# IN UINT64 Value\r
-# );\r
-#------------------------------------------------------------------------------\r
-.global _AsmWriteMsr64\r
-_AsmWriteMsr64: \r
- movl 12(%esp),%edx\r
- movl 8(%esp),%eax\r
- movl 4(%esp),%ecx\r
- wrmsr\r
- ret\r
-\r
-\r
-\r
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# CompareMem.Asm
+#
+# Abstract:
+#
+# CompareMem function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .code:
+
+.global _InternalMemCompareMem
+_InternalMemCompareMem:
+ push %esi
+ push %edi
+ movl 12(%esp), %esi
+ movl 16(%esp), %edi
+ movl 20(%esp), %ecx
+ repe cmpsb
+ movzbl -1(%esi), %eax
+ movzbl -1(%edi), %edx
+ subl %edx, %eax
+ subl %edx, %eax
+ pop %edi
+ pop %esi
+ ret
+
+
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# CompareMem.Asm
-#
-# Abstract:
-#
-# CompareMem function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .code:
-
-.global _InternalMemCompareMem
-_InternalMemCompareMem:
- push %esi
- push %edi
- movl 12(%esp), %esi
- movl 16(%esp), %edi
- movl 20(%esp), %ecx
- repe cmpsb
- movzbl -1(%esi), %eax
- movzbl -1(%edi), %edx
- subl %edx, %eax
- subl %edx, %eax
- pop %edi
- pop %esi
- ret
-
-
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# CopyMem.asm
+#
+# Abstract:
+#
+# CopyMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .xmm:
+ .code:
+
+#------------------------------------------------------------------------------
+# VOID *
+# _mem_CopyMem (
+# IN VOID *Destination,
+# IN VOID *Source,
+# IN UINTN Count
+# )
+#------------------------------------------------------------------------------
+.global _InternalMemCopyMem
+_InternalMemCopyMem:
+ push %esi
+ push %edi
+ movl 16(%esp), %esi # esi <- Source
+ movl 12(%esp), %edi # edi <- Destination
+ movl 20(%esp), %edx # edx <- Count
+ leal -1(%edi,%edx,), %eax # eax <- End of Destination
+ cmpl %edi, %esi
+ jae L0
+ cmpl %esi, %eax # Overlapped?
+ jae @CopyBackward # Copy backward if overlapped
+L0:
+ xorl %ecx, %ecx
+ subl %esi, %ecx
+ andl $7, %ecx # ecx + esi aligns on 8-byte boundary
+ jz L1
+ cmpl %edx, %ecx
+ cmova %edx, %ecx
+ subl %ecx, %edx # edx <- remaining bytes to copy
+ rep
+ movsb
+L1:
+ movl %edx, %ecx
+ andl $7, %edx
+ shrl $3, %ecx # ecx <- # of Qwords to copy
+ jz @CopyBytes
+ pushl %eax
+ pushl %eax
+ movq %mm0, (%esp) # save mm0
+L2:
+ movq (%esi), %mm0
+ movntq %mm0, (%edi)
+ addl $8, %esi
+ addl $8, %edi
+ loop L2
+ mfence
+ movq (%esp), %mm0 # restore mm0
+ popl %ecx # stack cleanup
+ popl %ecx # stack cleanup
+ jmp @CopyBytes
+@CopyBackward:
+ movl %eax, %edi # edi <- Last byte in Destination
+ leal -1(%esi,%edx,), %esi # esi <- Last byte in Source
+ std
+@CopyBytes:
+ movl %edx, %ecx
+ rep
+ movsb
+ cld
+ movl 12(%esp), %eax
+ push %esi
+ push %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# CopyMem.asm
-#
-# Abstract:
-#
-# CopyMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .xmm:
- .code:
-
-#------------------------------------------------------------------------------
-# VOID *
-# _mem_CopyMem (
-# IN VOID *Destination,
-# IN VOID *Source,
-# IN UINTN Count
-# )
-#------------------------------------------------------------------------------
-.global _InternalMemCopyMem
-_InternalMemCopyMem:
- push %esi
- push %edi
- movl 16(%esp), %esi # esi <- Source
- movl 12(%esp), %edi # edi <- Destination
- movl 20(%esp), %edx # edx <- Count
- leal -1(%edi,%edx,), %eax # eax <- End of Destination
- cmpl %edi, %esi
- jae L0
- cmpl %esi, %eax # Overlapped?
- jae @CopyBackward # Copy backward if overlapped
-L0:
- xorl %ecx, %ecx
- subl %esi, %ecx
- andl $7, %ecx # ecx + esi aligns on 8-byte boundary
- jz L1
- cmpl %edx, %ecx
- cmova %edx, %ecx
- subl %ecx, %edx # edx <- remaining bytes to copy
- rep
- movsb
-L1:
- movl %edx, %ecx
- andl $7, %edx
- shrl $3, %ecx # ecx <- # of Qwords to copy
- jz @CopyBytes
- pushl %eax
- pushl %eax
- movq %mm0, (%esp) # save mm0
-L2:
- movq (%esi), %mm0
- movntq %mm0, (%edi)
- addl $8, %esi
- addl $8, %edi
- loop L2
- mfence
- movq (%esp), %mm0 # restore mm0
- popl %ecx # stack cleanup
- popl %ecx # stack cleanup
- jmp @CopyBytes
-@CopyBackward:
- movl %eax, %edi # edi <- Last byte in Destination
- leal -1(%esi,%edx,), %esi # esi <- Last byte in Source
- std
-@CopyBytes:
- movl %edx, %ecx
- rep
- movsb
- cld
- movl 12(%esp), %eax
- push %esi
- push %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem16.Asm
+#
+# Abstract:
+#
+# ScanMem16 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .code:
+
+.global _InternalMemScanMem16
+_InternalMemScanMem16:
+ push %edi
+ movl 12(%esp), %ecx
+ movl 8(%esp), %edi
+ movl 16(%esp), %eax
+ repne scasw
+ leal -2(%edi), %eax
+ cmovnz %ecx, %eax
+ pop %edi
+ ret
+
+
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem16.Asm
-#
-# Abstract:
-#
-# ScanMem16 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .code:
-
-.global _InternalMemScanMem16
-_InternalMemScanMem16:
- push %edi
- movl 12(%esp), %ecx
- movl 8(%esp), %edi
- movl 16(%esp), %eax
- repne scasw
- leal -2(%edi), %eax
- cmovnz %ecx, %eax
- pop %edi
- ret
-
-
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem32.Asm
+#
+# Abstract:
+#
+# ScanMem32 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .code:
+
+.global _InternalMemScanMem32
+_InternalMemScanMem32:
+ push %edi
+ movl 12(%esp), %ecx
+ movl 8(%esp), %edi
+ movl 16(%esp), %eax
+ repne scasl
+ leal -4(%edi), %eax
+ cmovnz %ecx, %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem32.Asm
-#
-# Abstract:
-#
-# ScanMem32 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .code:
-
-.global _InternalMemScanMem32
-_InternalMemScanMem32:
- push %edi
- movl 12(%esp), %ecx
- movl 8(%esp), %edi
- movl 16(%esp), %eax
- repne scasl
- leal -4(%edi), %eax
- cmovnz %ecx, %eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem64.Asm
+#
+# Abstract:
+#
+# ScanMem64 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .code:
+
+.global _InternalMemScanMem64
+_InternalMemScanMem64:
+ push %edi
+ movl 12(%esp), %ecx
+ movl 16(%esp), %eax
+ movl 20(%esp), %edx
+ movl 8(%esp), %edi
+L0:
+ cmpl (%edi), %eax
+ leal 8(%edi), %edi
+ loopne L0
+ jne L1
+ cmpl -4(%edi), %edx
+ jecxz L1
+ jne L0
+L1:
+ leal -8(%edi), %eax
+ cmovne %ecx, %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem64.Asm
-#
-# Abstract:
-#
-# ScanMem64 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .code:
-
-.global _InternalMemScanMem64
-_InternalMemScanMem64:
- push %edi
- movl 12(%esp), %ecx
- movl 16(%esp), %eax
- movl 20(%esp), %edx
- movl 8(%esp), %edi
-L0:
- cmpl (%edi), %eax
- leal 8(%edi), %edi
- loopne L0
- jne L1
- cmpl -4(%edi), %edx
- jecxz L1
- jne L0
-L1:
- leal -8(%edi), %eax
- cmovne %ecx, %eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem8.Asm
+#
+# Abstract:
+#
+# ScanMem8 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .code:
+
+.global _InternalMemScanMem8
+_InternalMemScanMem8:
+ push %edi
+ movl 12(%esp), %ecx
+ movl 8(%esp), %edi
+ movb 16(%esp), %al
+ repne scasb
+ leal -1(%edi), %eax
+ cmovnz %ecx, %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem8.Asm
-#
-# Abstract:
-#
-# ScanMem8 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .code:
-
-.global _InternalMemScanMem8
-_InternalMemScanMem8:
- push %edi
- movl 12(%esp), %ecx
- movl 8(%esp), %edi
- movb 16(%esp), %al
- repne scasb
- leal -1(%edi), %eax
- cmovnz %ecx, %eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem.asm
+#
+# Abstract:
+#
+# SetMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .xmm:
+ .code:
+
+#------------------------------------------------------------------------------
+# VOID *
+# _mem_SetMem (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT8 Value
+# )
+#------------------------------------------------------------------------------
+.global _InternalMemSetMem
+_InternalMemSetMem:
+ push %edi
+ movl 12(%esp), %ecx # ecx <- Count
+ movl 8(%esp), %edi # edi <- Buffer
+ movl %ecx, %edx
+ shrl $3, %ecx # # of Qwords to set
+ movb 16(%esp), %al # al <- Value
+ jz @SetBytes
+ movb %al, %ah # ax <- Value | (Value << 8)
+ pushl %ecx
+ pushl %ecx
+ movq %mm0, (%esp) # save mm0
+ movd %eax, %mm0
+ pshufw $0x0,%mm0,%mm0
+L0:
+ movntq %mm0, (%edi)
+ addl $8, %edi
+ loop L0
+ mfence
+ movq (%esp), %mm0 # restore mm0
+ popl %ecx # stack cleanup
+ popl %ecx
+@SetBytes:
+ andl $7, %edx
+ movl %edx, %ecx
+ rep
+ stosb
+ movl 8(%esp), %eax # eax <- Buffer as return value
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem.asm
-#
-# Abstract:
-#
-# SetMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .xmm:
- .code:
-
-#------------------------------------------------------------------------------
-# VOID *
-# _mem_SetMem (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT8 Value
-# )
-#------------------------------------------------------------------------------
-.global _InternalMemSetMem
-_InternalMemSetMem:
- push %edi
- movl 12(%esp), %ecx # ecx <- Count
- movl 8(%esp), %edi # edi <- Buffer
- movl %ecx, %edx
- shrl $3, %ecx # # of Qwords to set
- movb 16(%esp), %al # al <- Value
- jz @SetBytes
- movb %al, %ah # ax <- Value | (Value << 8)
- pushl %ecx
- pushl %ecx
- movq %mm0, (%esp) # save mm0
- movd %eax, %mm0
- pshufw $0x0,%mm0,%mm0
-L0:
- movntq %mm0, (%edi)
- addl $8, %edi
- loop L0
- mfence
- movq (%esp), %mm0 # restore mm0
- popl %ecx # stack cleanup
- popl %ecx
-@SetBytes:
- andl $7, %edx
- movl %edx, %ecx
- rep
- stosb
- movl 8(%esp), %eax # eax <- Buffer as return value
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem16.asm
+#
+# Abstract:
+#
+# SetMem16 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .xmm:
+ .code:
+
+#------------------------------------------------------------------------------
+# VOID *
+# _mem_SetMem16 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT16 Value
+# )
+#------------------------------------------------------------------------------
+.global _InternalMemSetMem16
+_InternalMemSetMem16:
+ push %edi
+ movl 12(%esp), %edx
+ movl 8(%esp), %edi
+ movl %edx, %ecx
+ andl $3, %edx
+ shrl $2, %ecx
+ movl 16(%esp), %eax
+ jz @SetWords
+ movd %eax, %mm0
+ pshufw $0, %mm0, %mm0
+L0:
+ movntq %mm0, (%edi)
+ addl $8, %edi
+ loop L0
+ mfence
+@SetWords:
+ movl %edx, %ecx
+ rep
+ stosw
+ movl 8(%esp), %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem16.asm
-#
-# Abstract:
-#
-# SetMem16 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .xmm:
- .code:
-
-#------------------------------------------------------------------------------
-# VOID *
-# _mem_SetMem16 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT16 Value
-# )
-#------------------------------------------------------------------------------
-.global _InternalMemSetMem16
-_InternalMemSetMem16:
- push %edi
- movl 12(%esp), %edx
- movl 8(%esp), %edi
- movl %edx, %ecx
- andl $3, %edx
- shrl $2, %ecx
- movl 16(%esp), %eax
- jz @SetWords
- movd %eax, %mm0
- pshufw $0, %mm0, %mm0
-L0:
- movntq %mm0, (%edi)
- addl $8, %edi
- loop L0
- mfence
-@SetWords:
- movl %edx, %ecx
- rep
- stosw
- movl 8(%esp), %eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem32.asm
+#
+# Abstract:
+#
+# SetMem32 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .xmm:
+ .code:
+
+#------------------------------------------------------------------------------
+# VOID *
+# _mem_SetMem32 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT32 Value
+# )
+#------------------------------------------------------------------------------
+.global _InternalMemSetMem32
+_InternalMemSetMem32:
+ push %edi
+ movl 12(%esp), %edx
+ movl 8(%esp), %edi
+ movl %edx, %ecx
+ shrl %ecx
+ movd 16(%esp), %mm0
+ movl %edi, %eax
+ jz @SetDwords
+ pshufw $0x44, %mm0, %mm0
+L0:
+ movntq %mm0, (%edi)
+ addl $8, %edi
+ loopl L0
+ mfence
+@SetDwords:
+ testb $1, %dl
+ jz @F
+ movd %mm0, (%edi)
+L1:
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem32.asm
-#
-# Abstract:
-#
-# SetMem32 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .xmm:
- .code:
-
-#------------------------------------------------------------------------------
-# VOID *
-# _mem_SetMem32 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT32 Value
-# )
-#------------------------------------------------------------------------------
-.global _InternalMemSetMem32
-_InternalMemSetMem32:
- push %edi
- movl 12(%esp), %edx
- movl 8(%esp), %edi
- movl %edx, %ecx
- shrl %ecx
- movd 16(%esp), %mm0
- movl %edi, %eax
- jz @SetDwords
- pshufw $0x44, %mm0, %mm0
-L0:
- movntq %mm0, (%edi)
- addl $8, %edi
- loopl L0
- mfence
-@SetDwords:
- testb $1, %dl
- jz @F
- movd %mm0, (%edi)
-L1:
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem64.asm
+#
+# Abstract:
+#
+# SetMem64 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .xmm:
+ .code:
+
+#------------------------------------------------------------------------------
+# VOID *
+# _mem_SetMem64 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT64 Value
+# )
+#------------------------------------------------------------------------------
+.global _InternalMemSetMem64
+_InternalMemSetMem64:
+ push %edi
+ movq 16(%esp), %mm0
+ movl 12(%esp), %ecx
+ movl 8(%esp), %edi
+ movl %edi, %eax
+L0:
+ movntq %mm0, (%edi)
+ addl $8, %edi
+ loopl L0
+ mfence
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem64.asm
-#
-# Abstract:
-#
-# SetMem64 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .xmm:
- .code:
-
-#------------------------------------------------------------------------------
-# VOID *
-# _mem_SetMem64 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT64 Value
-# )
-#------------------------------------------------------------------------------
-.global _InternalMemSetMem64
-_InternalMemSetMem64:
- push %edi
- movq 16(%esp), %mm0
- movl 12(%esp), %ecx
- movl 8(%esp), %edi
- movl %edi, %eax
-L0:
- movntq %mm0, (%edi)
- addl $8, %edi
- loopl L0
- mfence
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ZeroMem.asm
+#
+# Abstract:
+#
+# ZeroMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .xmm:
+ .code:
+
+#------------------------------------------------------------------------------
+# VOID *
+# _mem_ZeroMem (
+# IN VOID *Buffer,
+# IN UINTN Count
+# )
+#------------------------------------------------------------------------------
+.global _InternalMemZeroMem
+_InternalMemZeroMem:
+ push %edi
+ movl 8(%esp), %edi
+ movl 12(%esp), %ecx
+ movl %ecx, %edx
+ shrl $3, %ecx
+ jz @ZeroBytes
+ pxor %mm0, %mm0
+L0:
+ movntq %mm0, (%edi)
+ addl $8, %edi
+ loop L0
+ mfence
+@ZeroBytes:
+ andl $7, %edx
+ xorl %eax, %eax
+ movl %edx, %ecx
+ rep
+ stosb
+ movl 8(%esp), %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ZeroMem.asm
-#
-# Abstract:
-#
-# ZeroMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .xmm:
- .code:
-
-#------------------------------------------------------------------------------
-# VOID *
-# _mem_ZeroMem (
-# IN VOID *Buffer,
-# IN UINTN Count
-# )
-#------------------------------------------------------------------------------
-.global _InternalMemZeroMem
-_InternalMemZeroMem:
- push %edi
- movl 8(%esp), %edi
- movl 12(%esp), %ecx
- movl %ecx, %edx
- shrl $3, %ecx
- jz @ZeroBytes
- pxor %mm0, %mm0
-L0:
- movntq %mm0, (%edi)
- addl $8, %edi
- loop L0
- mfence
-@ZeroBytes:
- andl $7, %edx
- xorl %eax, %eax
- movl %edx, %ecx
- rep
- stosb
- movl 8(%esp), %eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# CompareMem.Asm
+#
+# Abstract:
+#
+# CompareMem function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ .code:
+
+.global _InternalMemCompareMem
+_InternalMemCompareMem:
+ push %esi
+ push %edi
+ movl 12(%esp),%esi
+ movl 16(%esp),%edi
+ movl 20(%esp),%ecx
+ repe cmpsb
+ movzbl -1(%esi), %eax
+ movzbl -1(%edi), %edx
+ subl %edx,%eax
+ pop %edi
+ pop %esi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# CompareMem.Asm
-#
-# Abstract:
-#
-# CompareMem function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
- .686:
- .code:
-
-.global _InternalMemCompareMem
-_InternalMemCompareMem:
- push %esi
- push %edi
- movl 12(%esp),%esi
- movl 16(%esp),%edi
- movl 20(%esp),%ecx
- repe cmpsb
- movzbl -1(%esi), %eax
- movzbl -1(%edi), %edx
- subl %edx,%eax
- pop %edi
- pop %esi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# CopyMem.Asm
+#
+# Abstract:
+#
+# CopyMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .386:
+ .code:
+
+.global _InternalMemCopyMem
+_InternalMemCopyMem:
+ push %esi
+ push %edi
+ movl 16(%esp),%esi # esi <- Source
+ movl 12(%esp),%edi # edi <- Destination
+ movl 20(%esp),%edx # edx <- Count
+ leal -1(%edi,%edx),%eax # eax <- End of Destination
+ cmpl %edi,%esi
+ jae L0
+ cmpl %esi,%eax
+ jae @CopyBackward # Copy backward if overlapped
+L0:
+ movl %edx,%ecx
+ andl $3,%edx
+ shrl $2,%ecx
+ rep
+ movsl # Copy as many Dwords as possible
+ jmp @CopyBytes
+@CopyBackward:
+ movl %eax,%edi # edi <- End of Destination
+ leal -1(%esi,%edx),%esi # esi <- End of Source
+ std
+@CopyBytes:
+ movl %edx,%ecx
+ rep
+ movsb # Copy bytes backward
+ cld
+ movl 12(%esp),%eax # eax <- Destination as return value
+ push %edi
+ push %esi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# CopyMem.Asm
-#
-# Abstract:
-#
-# CopyMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .386:
- .code:
-
-.global _InternalMemCopyMem
-_InternalMemCopyMem:
- push %esi
- push %edi
- movl 16(%esp),%esi # esi <- Source
- movl 12(%esp),%edi # edi <- Destination
- movl 20(%esp),%edx # edx <- Count
- leal -1(%edi,%edx),%eax # eax <- End of Destination
- cmpl %edi,%esi
- jae L0
- cmpl %esi,%eax
- jae @CopyBackward # Copy backward if overlapped
-L0:
- movl %edx,%ecx
- andl $3,%edx
- shrl $2,%ecx
- rep
- movsl # Copy as many Dwords as possible
- jmp @CopyBytes
-@CopyBackward:
- movl %eax,%edi # edi <- End of Destination
- leal -1(%esi,%edx),%esi # esi <- End of Source
- std
-@CopyBytes:
- movl %edx,%ecx
- rep
- movsb # Copy bytes backward
- cld
- movl 12(%esp),%eax # eax <- Destination as return value
- push %edi
- push %esi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem16.Asm
+#
+# Abstract:
+#
+# ScanMem16 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ .code:
+
+.global _InternalMemScanMem16
+_InternalMemScanMem16:
+ push %edi
+ movl 12(%esp),%ecx
+ movl 8(%esp),%edi
+ movl 16(%esp),%eax
+ repne scasw
+ leal -2(%edi),%eax
+ cmovnz %ecx, %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem16.Asm
-#
-# Abstract:
-#
-# ScanMem16 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
- .686:
- .code:
-
-.global _InternalMemScanMem16
-_InternalMemScanMem16:
- push %edi
- movl 12(%esp),%ecx
- movl 8(%esp),%edi
- movl 16(%esp),%eax
- repne scasw
- leal -2(%edi),%eax
- cmovnz %ecx, %eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem32.Asm
+#
+# Abstract:
+#
+# ScanMem32 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ .code:
+
+.global _InternalMemScanMem32
+_InternalMemScanMem32:
+ push %edi
+ movl 12(%esp),%ecx
+ movl 8(%esp),%edi
+ movl 16(%esp),%eax
+ repne scasl
+ leal -4(%edi),%eax
+ cmovnz %ecx, %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem32.Asm
-#
-# Abstract:
-#
-# ScanMem32 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
- .686:
- .code:
-
-.global _InternalMemScanMem32
-_InternalMemScanMem32:
- push %edi
- movl 12(%esp),%ecx
- movl 8(%esp),%edi
- movl 16(%esp),%eax
- repne scasl
- leal -4(%edi),%eax
- cmovnz %ecx, %eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem64.Asm
+#
+# Abstract:
+#
+# ScanMem64 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ .code:
+
+.global _InternalMemScanMem64
+_InternalMemScanMem64:
+ push %edi
+ movl 12(%esp),%ecx
+ movl 16(%esp),%eax
+ movl 20(%esp),%edx
+ movl 8(%esp),%edi
+L0:
+ cmpl (%edi),%eax
+ leal 8(%edi),%edi
+ loopne L0
+ jne L1
+ cmpl -4(%edi),%edx
+ jecxz L1
+ jne L0
+L1:
+ leal -8(%edi),%eax
+ cmovne %ecx, %eax
+ pop %edi
+ ret
+
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem64.Asm
-#
-# Abstract:
-#
-# ScanMem64 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
- .686:
- .code:
-
-.global _InternalMemScanMem64
-_InternalMemScanMem64:
- push %edi
- movl 12(%esp),%ecx
- movl 16(%esp),%eax
- movl 20(%esp),%edx
- movl 8(%esp),%edi
-L0:
- cmpl (%edi),%eax
- leal 8(%edi),%edi
- loopne L0
- jne L1
- cmpl -4(%edi),%edx
- jecxz L1
- jne L0
-L1:
- leal -8(%edi),%eax
- cmovne %ecx, %eax
- pop %edi
- ret
-
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem8.Asm
+#
+# Abstract:
+#
+# ScanMem8 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ .code:
+
+.global _InternalMemScanMem8
+_InternalMemScanMem8:
+ push %edi
+ movl 12(%esp),%ecx
+ movl 8(%esp),%edi
+ movb 16(%esp),%al
+ repne scasb
+ leal -1(%edi),%eax
+ cmovnz %ecx, %eax
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem8.Asm
-#
-# Abstract:
-#
-# ScanMem8 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
- .686:
- .code:
-
-.global _InternalMemScanMem8
-_InternalMemScanMem8:
- push %edi
- movl 12(%esp),%ecx
- movl 8(%esp),%edi
- movb 16(%esp),%al
- repne scasb
- leal -1(%edi),%eax
- cmovnz %ecx, %eax
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem.Asm
+#
+# Abstract:
+#
+# SetMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .386:
+ .code:
+
+.global _InternalMemSetMem
+_InternalMemSetMem:
+ push %edi
+ movl 16(%esp),%eax
+ movl 8(%esp),%edi
+ movl 12(%esp),%ecx
+ rep
+ stosb
+ movl 8(%esp),%eax
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem.Asm
-#
-# Abstract:
-#
-# SetMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .386:
- .code:
-
-.global _InternalMemSetMem
-_InternalMemSetMem:
- push %edi
- movl 16(%esp),%eax
- movl 8(%esp),%edi
- movl 12(%esp),%ecx
- rep
- stosb
- movl 8(%esp),%eax
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem16.Asm
+#
+# Abstract:
+#
+# SetMem16 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .386:
+ .code:
+
+.global _InternalMemSetMem16
+_InternalMemSetMem16:
+ push %edi
+ movl 16(%esp),%eax
+ movl 8(%esp),%edi
+ movl 12(%esp),%ecx
+ rep
+ stosw
+ movl 8(%esp),%eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem16.Asm
-#
-# Abstract:
-#
-# SetMem16 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .386:
- .code:
-
-.global _InternalMemSetMem16
-_InternalMemSetMem16:
- push %edi
- movl 16(%esp),%eax
- movl 8(%esp),%edi
- movl 12(%esp),%ecx
- rep
- stosw
- movl 8(%esp),%eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem32.Asm
+#
+# Abstract:
+#
+# SetMem32 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .386:
+ .code:
+
+.global _InternalMemSetMem32
+_InternalMemSetMem32:
+ push %edi
+ movl 16(%esp),%eax
+ movl 8(%esp),%edi
+ movl 12(%esp),%ecx
+ rep
+ stosl
+ movl 8(%esp),%eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem32.Asm
-#
-# Abstract:
-#
-# SetMem32 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .386:
- .code:
-
-.global _InternalMemSetMem32
-_InternalMemSetMem32:
- push %edi
- movl 16(%esp),%eax
- movl 8(%esp),%edi
- movl 12(%esp),%ecx
- rep
- stosl
- movl 8(%esp),%eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem64.Asm
+#
+# Abstract:
+#
+# SetMem64 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .386:
+ #.MODEL flat,C
+ .code:
+
+.global _InternalMemSetMem64
+_InternalMemSetMem64:
+ push %edi
+ movl 12(%esp), %ecx
+ movl 16(%esp), %eax
+ movl 20(%esp), %edx
+ movl 8(%esp), %edi
+L0:
+ mov %eax,-8(%edi,%ecx,8)
+ mov %edx,-4(%edi,%ecx,8)
+ loop L0
+ movl %edi, %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem64.Asm
-#
-# Abstract:
-#
-# SetMem64 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .386:
- #.MODEL flat,C
- .code:
-
-.global _InternalMemSetMem64
-_InternalMemSetMem64:
- push %edi
- movl 12(%esp), %ecx
- movl 16(%esp), %eax
- movl 20(%esp), %edx
- movl 8(%esp), %edi
-L0:
- mov %eax,-8(%edi,%ecx,8)
- mov %edx,-4(%edi,%ecx,8)
- loop L0
- movl %edi, %eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ZeroMem.Asm
+#
+# Abstract:
+#
+# ZeroMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .386:
+ .code:
+
+.global _InternalMemZeroMem
+_InternalMemZeroMem:
+ push %edi
+ xorl %eax,%eax
+ movl 8(%esp),%edi
+ movl 12(%esp),%ecx
+ movl %ecx,%edx
+ shrl $2,%ecx
+ andl $3,%edx
+ pushl %edi
+ rep
+ stosl
+ movl %edx,%ecx
+ rep
+ stosb
+ popl %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ZeroMem.Asm
-#
-# Abstract:
-#
-# ZeroMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .386:
- .code:
-
-.global _InternalMemZeroMem
-_InternalMemZeroMem:
- push %edi
- xorl %eax,%eax
- movl 8(%esp),%edi
- movl 12(%esp),%ecx
- movl %ecx,%edx
- shrl $2,%ecx
- andl $3,%edx
- pushl %edi
- rep
- stosl
- movl %edx,%ecx
- rep
- stosb
- popl %eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# CompareMem.Asm
+#
+# Abstract:
+#
+# CompareMem function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .code:
+
+.global _InternalMemCompareMem
+_InternalMemCompareMem:
+ push %esi
+ push %edi
+ movl 12(%esp), %esi
+ movl 16(%esp), %edi
+ movl 20(%esp), %ecx
+ repe cmpsb
+ movzbl -1(%esi), %eax
+ movzbl -1(%edi), %edx
+ subl %edx, %eax
+ subl %edx, %eax
+ pop %edi
+ pop %esi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# CompareMem.Asm
-#
-# Abstract:
-#
-# CompareMem function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .code:
-
-.global _InternalMemCompareMem
-_InternalMemCompareMem:
- push %esi
- push %edi
- movl 12(%esp), %esi
- movl 16(%esp), %edi
- movl 20(%esp), %ecx
- repe cmpsb
- movzbl -1(%esi), %eax
- movzbl -1(%edi), %edx
- subl %edx, %eax
- subl %edx, %eax
- pop %edi
- pop %esi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# CopyMem.asm
+#
+# Abstract:
+#
+# CopyMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .xmm:
+ .code:
+
+#------------------------------------------------------------------------------
+# VOID *
+# _mem_CopyMem (
+# IN VOID *Destination,
+# IN VOID *Source,
+# IN UINTN Count
+# )
+#------------------------------------------------------------------------------
+.global _InternalMemCopyMem
+_InternalMemCopyMem:
+ push %esi
+ push %edi
+ movl 16(%esp), %esi # esi <- Source
+ movl 12(%esp), %edi # edi <- Destination
+ movl 20(%esp), %edx # edx <- Count
+ leal -1(%edi,%edx,), %eax # eax <- End of Destination
+ cmpl %edi, %esi
+ jae L0
+ cmpl %esi, %eax # Overlapped?
+ jae @CopyBackward # Copy backward if overlapped
+L0:
+ xorl %ecx, %ecx
+ subl %edi, %ecx
+ andl $15, %ecx # ecx + edi aligns on 16-byte boundary
+ jz L1
+ cmpl %edx, %ecx
+ cmova %edx, %ecx
+ subl %ecx, %edx # edx <- remaining bytes to copy
+ rep
+ movsb
+L1:
+ movl %edx, %ecx
+ andl $15, %edx
+ shrl $4, %ecx # ecx <- # of DQwords to copy
+ jz @CopyBytes
+ addl $-16, %esp
+ movdqu %xmm0, (%esp)
+L2:
+ movdqu (%esi), %xmm0
+ movntdq %xmm0, (%edi)
+ addl $16, %esi
+ addl $16, %edi
+ loop L2
+ mfence
+ movdqu (%esp),%xmm0
+ addl $16, %esp # stack cleanup
+ jmp @CopyBytes
+@CopyBackward:
+ movl %eax, %edi # edi <- Last byte in Destination
+ leal -1(%esi,%edx,), %esi # esi <- Last byte in Source
+ std
+@CopyBytes:
+ movl %edx, %ecx
+ rep
+ movsb
+ cld
+ movl 12(%esp), %eax # eax <- Destination as return value
+ pop %edi
+ pop %esi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# CopyMem.asm
-#
-# Abstract:
-#
-# CopyMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .xmm:
- .code:
-
-#------------------------------------------------------------------------------
-# VOID *
-# _mem_CopyMem (
-# IN VOID *Destination,
-# IN VOID *Source,
-# IN UINTN Count
-# )
-#------------------------------------------------------------------------------
-.global _InternalMemCopyMem
-_InternalMemCopyMem:
- push %esi
- push %edi
- movl 16(%esp), %esi # esi <- Source
- movl 12(%esp), %edi # edi <- Destination
- movl 20(%esp), %edx # edx <- Count
- leal -1(%edi,%edx,), %eax # eax <- End of Destination
- cmpl %edi, %esi
- jae L0
- cmpl %esi, %eax # Overlapped?
- jae @CopyBackward # Copy backward if overlapped
-L0:
- xorl %ecx, %ecx
- subl %edi, %ecx
- andl $15, %ecx # ecx + edi aligns on 16-byte boundary
- jz L1
- cmpl %edx, %ecx
- cmova %edx, %ecx
- subl %ecx, %edx # edx <- remaining bytes to copy
- rep
- movsb
-L1:
- movl %edx, %ecx
- andl $15, %edx
- shrl $4, %ecx # ecx <- # of DQwords to copy
- jz @CopyBytes
- addl $-16, %esp
- movdqu %xmm0, (%esp)
-L2:
- movdqu (%esi), %xmm0
- movntdq %xmm0, (%edi)
- addl $16, %esi
- addl $16, %edi
- loop L2
- mfence
- movdqu (%esp),%xmm0
- addl $16, %esp # stack cleanup
- jmp @CopyBytes
-@CopyBackward:
- movl %eax, %edi # edi <- Last byte in Destination
- leal -1(%esi,%edx,), %esi # esi <- Last byte in Source
- std
-@CopyBytes:
- movl %edx, %ecx
- rep
- movsb
- cld
- movl 12(%esp), %eax # eax <- Destination as return value
- pop %edi
- pop %esi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem16.Asm
+#
+# Abstract:
+#
+# ScanMem16 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .code:
+
+.global _InternalMemScanMem16
+_InternalMemScanMem16:
+ push %edi
+ movl 12(%esp), %ecx
+ movl 8(%esp), %edi
+ movl 16(%esp), %eax
+ repne scasw
+ leal -2(%edi), %eax
+ cmovnz %ecx, %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem16.Asm
-#
-# Abstract:
-#
-# ScanMem16 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .code:
-
-.global _InternalMemScanMem16
-_InternalMemScanMem16:
- push %edi
- movl 12(%esp), %ecx
- movl 8(%esp), %edi
- movl 16(%esp), %eax
- repne scasw
- leal -2(%edi), %eax
- cmovnz %ecx, %eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem32.Asm
+#
+# Abstract:
+#
+# ScanMem32 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .code:
+
+.global _InternalMemScanMem32
+_InternalMemScanMem32:
+ push %edi
+ movl 12(%esp), %ecx
+ movl 8(%esp), %edi
+ movl 16(%esp), %eax
+ repnz scasl
+ leal -4(%edi), %eax
+ cmovnz %ecx, %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem32.Asm
-#
-# Abstract:
-#
-# ScanMem32 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .code:
-
-.global _InternalMemScanMem32
-_InternalMemScanMem32:
- push %edi
- movl 12(%esp), %ecx
- movl 8(%esp), %edi
- movl 16(%esp), %eax
- repnz scasl
- leal -4(%edi), %eax
- cmovnz %ecx, %eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem64.Asm
+#
+# Abstract:
+#
+# ScanMem64 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .code:
+
+.global _InternalMemScanMem64
+_InternalMemScanMem64:
+ push %edi
+ movl 12(%esp), %ecx
+ movl 16(%esp), %eax
+ movl 20(%esp), %edx
+ movl 8(%esp), %edi
+L0:
+ cmpl (%edi), %eax
+ leal 8(%edi), %edi
+ loopne L0
+ jne L1
+ cmpl -4(%edi), %edx
+ jecxz L1
+ jne L0
+L1:
+ leal -8(%edi), %eax
+ cmovne %ecx, %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem64.Asm
-#
-# Abstract:
-#
-# ScanMem64 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .code:
-
-.global _InternalMemScanMem64
-_InternalMemScanMem64:
- push %edi
- movl 12(%esp), %ecx
- movl 16(%esp), %eax
- movl 20(%esp), %edx
- movl 8(%esp), %edi
-L0:
- cmpl (%edi), %eax
- leal 8(%edi), %edi
- loopne L0
- jne L1
- cmpl -4(%edi), %edx
- jecxz L1
- jne L0
-L1:
- leal -8(%edi), %eax
- cmovne %ecx, %eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ScanMem8.Asm
+#
+# Abstract:
+#
+# ScanMem8 function
+#
+# Notes:
+#
+# The following BaseMemoryLib instances share the same version of this file:
+#
+# BaseMemoryLibRepStr
+# BaseMemoryLibMmx
+# BaseMemoryLibSse2
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .code:
+
+.global _InternalMemScanMem8
+_InternalMemScanMem8:
+ push %edi
+ movl 12(%esp), %ecx
+ movl 8(%esp), %edi
+ movb 16(%esp), %al
+ repne scasb
+ leal -1(%edi), %eax
+ cmovnz %ecx, %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ScanMem8.Asm
-#
-# Abstract:
-#
-# ScanMem8 function
-#
-# Notes:
-#
-# The following BaseMemoryLib instances share the same version of this file:
-#
-# BaseMemoryLibRepStr
-# BaseMemoryLibMmx
-# BaseMemoryLibSse2
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .code:
-
-.global _InternalMemScanMem8
-_InternalMemScanMem8:
- push %edi
- movl 12(%esp), %ecx
- movl 8(%esp), %edi
- movb 16(%esp), %al
- repne scasb
- leal -1(%edi), %eax
- cmovnz %ecx, %eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem.asm
+#
+# Abstract:
+#
+# SetMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .xmm:
+ .code:
+
+#------------------------------------------------------------------------------
+# VOID *
+# _mem_SetMem (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT8 Value
+# )
+#------------------------------------------------------------------------------
+.global _InternalMemSetMem
+_InternalMemSetMem:
+ push %edi
+ movl 12(%esp), %edx # edx <- Count
+ movl 8(%esp), %edi # edi <- Buffer
+ movb 16(%esp), %al # al <- Value
+ xorl %ecx, %ecx
+ subl %edi, %ecx
+ andl $15, %ecx # ecx + edi aligns on 16-byte boundary
+ jz L0
+ cmpl %edx, %ecx
+ cmova %edx, %ecx
+ subl %ecx, %edx
+ rep
+ stosb
+L0:
+ movl %edx, %ecx
+ andl $15, %edx
+ shrl $4, %ecx # ecx <- # of DQwords to set
+ jz @SetBytes
+ movb %al, %ah # ax <- Value | (Value << 8)
+ addl $-16, %esp
+ movdqu %xmm0, (%esp)
+ movd %eax, %xmm0
+ pshuflw $0, %xmm0, %xmm0
+ movlhps %xmm0, %xmm0
+L1:
+ movntdq %xmm0, (%edi)
+ addl $16, %edi
+ loop L1
+ mfence
+ movdqu (%esp), %xmm0
+ addl $16, %esp # stack cleanup
+@SetBytes:
+ movl %edx, %ecx
+ rep
+ stosb
+ movl 8(%esp), %eax # eax <- Buffer as return value
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem.asm
-#
-# Abstract:
-#
-# SetMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .xmm:
- .code:
-
-#------------------------------------------------------------------------------
-# VOID *
-# _mem_SetMem (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT8 Value
-# )
-#------------------------------------------------------------------------------
-.global _InternalMemSetMem
-_InternalMemSetMem:
- push %edi
- movl 12(%esp), %edx # edx <- Count
- movl 8(%esp), %edi # edi <- Buffer
- movb 16(%esp), %al # al <- Value
- xorl %ecx, %ecx
- subl %edi, %ecx
- andl $15, %ecx # ecx + edi aligns on 16-byte boundary
- jz L0
- cmpl %edx, %ecx
- cmova %edx, %ecx
- subl %ecx, %edx
- rep
- stosb
-L0:
- movl %edx, %ecx
- andl $15, %edx
- shrl $4, %ecx # ecx <- # of DQwords to set
- jz @SetBytes
- movb %al, %ah # ax <- Value | (Value << 8)
- addl $-16, %esp
- movdqu %xmm0, (%esp)
- movd %eax, %xmm0
- pshuflw $0, %xmm0, %xmm0
- movlhps %xmm0, %xmm0
-L1:
- movntdq %xmm0, (%edi)
- addl $16, %edi
- loop L1
- mfence
- movdqu (%esp), %xmm0
- addl $16, %esp # stack cleanup
-@SetBytes:
- movl %edx, %ecx
- rep
- stosb
- movl 8(%esp), %eax # eax <- Buffer as return value
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem16.asm
+#
+# Abstract:
+#
+# SetMem16 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .xmm:
+ .code:
+
+#------------------------------------------------------------------------------
+# VOID *
+# _mem_SetMem16 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT16 Value
+# )
+#------------------------------------------------------------------------------
+.global _InternalMemSetMem16
+_InternalMemSetMem16:
+ push %edi
+ movl 12(%esp), %edx
+ movl 8(%esp), %edi
+ xorl %ecx, %ecx
+ subl %edi, %ecx
+ andl $15, %ecx # ecx + edi aligns on 16-byte boundary
+ movl 16(%esp), %eax
+ jz L0
+ shrl %ecx
+ cmpl %edx, %ecx
+ cmova %edx, %ecx
+ subl %ecx, %edx
+ rep
+ stosw
+L0:
+ movl %edx, %ecx
+ andl $7, %edx
+ shrl $3, %ecx
+ jz @SetWords
+ movd %eax, %xmm0
+ pshuflw $0, %xmm0, %xmm0
+ movlhps %xmm0, %xmm0
+L1:
+ movntdq %xmm0, (%edi)
+ addl $16, %edi
+ loop L1
+ mfence
+@SetWords:
+ movl %edx, %ecx
+ rep
+ stosw
+ movl 8(%esp), %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem16.asm
-#
-# Abstract:
-#
-# SetMem16 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .xmm:
- .code:
-
-#------------------------------------------------------------------------------
-# VOID *
-# _mem_SetMem16 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT16 Value
-# )
-#------------------------------------------------------------------------------
-.global _InternalMemSetMem16
-_InternalMemSetMem16:
- push %edi
- movl 12(%esp), %edx
- movl 8(%esp), %edi
- xorl %ecx, %ecx
- subl %edi, %ecx
- andl $15, %ecx # ecx + edi aligns on 16-byte boundary
- movl 16(%esp), %eax
- jz L0
- shrl %ecx
- cmpl %edx, %ecx
- cmova %edx, %ecx
- subl %ecx, %edx
- rep
- stosw
-L0:
- movl %edx, %ecx
- andl $7, %edx
- shrl $3, %ecx
- jz @SetWords
- movd %eax, %xmm0
- pshuflw $0, %xmm0, %xmm0
- movlhps %xmm0, %xmm0
-L1:
- movntdq %xmm0, (%edi)
- addl $16, %edi
- loop L1
- mfence
-@SetWords:
- movl %edx, %ecx
- rep
- stosw
- movl 8(%esp), %eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem32.asm
+#
+# Abstract:
+#
+# SetMem32 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .xmm:
+ .code:
+
+#------------------------------------------------------------------------------
+# VOID *
+# _mem_SetMem32 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT32 Value
+# )
+#------------------------------------------------------------------------------
+.global _InternalMemSetMem32
+_InternalMemSetMem32:
+ push %edi
+ movl 12(%esp), %edx
+ movl 8(%esp), %edi
+ xorl %ecx, %ecx
+ subl %edi, %ecx
+ andl $15, %ecx # ecx + edi aligns on 16-byte boundary
+ movl 16(%esp), %eax
+ jz L0
+ shrl $2, %ecx
+ cmpl %edx, %ecx
+ cmova %edx, %ecx
+ subl %ecx, %edx
+ rep
+ stosl
+L0:
+ movl %edx, %ecx
+ andl $3, %edx
+ shrl $2, %ecx
+ jz @SetDwords
+ movd %eax, %xmm0
+ pshufd $0, %xmm0, %xmm0
+L1:
+ movntdq %xmm0, (%edi)
+ addl $16, %edi
+ loop L1
+ mfence
+@SetDwords:
+ movl %edx, %ecx
+ rep
+ stosl
+ movl 8(%esp), %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem32.asm
-#
-# Abstract:
-#
-# SetMem32 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .xmm:
- .code:
-
-#------------------------------------------------------------------------------
-# VOID *
-# _mem_SetMem32 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT32 Value
-# )
-#------------------------------------------------------------------------------
-.global _InternalMemSetMem32
-_InternalMemSetMem32:
- push %edi
- movl 12(%esp), %edx
- movl 8(%esp), %edi
- xorl %ecx, %ecx
- subl %edi, %ecx
- andl $15, %ecx # ecx + edi aligns on 16-byte boundary
- movl 16(%esp), %eax
- jz L0
- shrl $2, %ecx
- cmpl %edx, %ecx
- cmova %edx, %ecx
- subl %ecx, %edx
- rep
- stosl
-L0:
- movl %edx, %ecx
- andl $3, %edx
- shrl $2, %ecx
- jz @SetDwords
- movd %eax, %xmm0
- pshufd $0, %xmm0, %xmm0
-L1:
- movntdq %xmm0, (%edi)
- addl $16, %edi
- loop L1
- mfence
-@SetDwords:
- movl %edx, %ecx
- rep
- stosl
- movl 8(%esp), %eax
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# SetMem64.asm
+#
+# Abstract:
+#
+# SetMem64 function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .xmm:
+ .code:
+
+#------------------------------------------------------------------------------
+# VOID *
+# _mem_SetMem64 (
+# IN VOID *Buffer,
+# IN UINTN Count,
+# IN UINT64 Value
+# )
+#------------------------------------------------------------------------------
+.global _InternalMemSetMem64
+_InternalMemSetMem64:
+ push %edi
+ movl 12(%esp), %ecx
+ movl 8(%esp), %edi
+ testl $8, %edi
+ movddup 16(%esp), %xmm0
+ jz L0
+ movq %xmm0, (%edi)
+ addl $8, %edi
+ decl %ecx
+L0:
+ movl %ecx, %edx
+ shrl %ecx
+ jz @SetQwords
+L1:
+ movntdq %xmm0, (%edi)
+ addl $16, %edi
+ loop L1
+ mfence
+@SetQwords:
+ testb $1, %dl
+ jz L2
+ movq %xmm0, (%edi)
+L2:
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# SetMem64.asm
-#
-# Abstract:
-#
-# SetMem64 function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .xmm:
- .code:
-
-#------------------------------------------------------------------------------
-# VOID *
-# _mem_SetMem64 (
-# IN VOID *Buffer,
-# IN UINTN Count,
-# IN UINT64 Value
-# )
-#------------------------------------------------------------------------------
-.global _InternalMemSetMem64
-_InternalMemSetMem64:
- push %edi
- movl 12(%esp), %ecx
- movl 8(%esp), %edi
- testl $8, %edi
- movddup 16(%esp), %xmm0
- jz L0
- movq %xmm0, (%edi)
- addl $8, %edi
- decl %ecx
-L0:
- movl %ecx, %edx
- shrl %ecx
- jz @SetQwords
-L1:
- movntdq %xmm0, (%edi)
- addl $16, %edi
- loop L1
- mfence
-@SetQwords:
- testb $1, %dl
- jz L2
- movq %xmm0, (%edi)
-L2:
- pop %edi
- ret
--- /dev/null
+#------------------------------------------------------------------------------
+#
+# 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:
+#
+# ZeroMem.asm
+#
+# Abstract:
+#
+# ZeroMem function
+#
+# Notes:
+#
+#------------------------------------------------------------------------------
+
+ .686:
+ #.MODEL flat,C
+ .xmm:
+ .code:
+
+#------------------------------------------------------------------------------
+# VOID *
+# _mem_ZeroMem (
+# IN VOID *Buffer,
+# IN UINTN Count
+# )
+#------------------------------------------------------------------------------
+.global _InternalMemZeroMem
+_InternalMemZeroMem:
+ push %edi
+ movl 8(%esp), %edi
+ movl 12(%esp), %edx
+ xorl %ecx, %ecx
+ subl %edi, %ecx
+ xorl %eax, %eax
+ andl $15, %ecx
+ jz L0
+ cmpl %edx, %ecx
+ cmova %edx, %ecx
+ subl %ecx, %edx
+ rep
+ stosb
+L0:
+ movl %edx, %ecx
+ andl $15, %edx
+ shrl $4, %ecx
+ jz @ZeroBytes
+ pxor %xmm0, %xmm0
+L1:
+ movntdq %xmm0, (%edi)
+ addl $16, %edi
+ loop L1
+ mfence
+@ZeroBytes:
+ movl %edx, %ecx
+ rep
+ stosb
+ movl 8(%esp), %eax
+ pop %edi
+ ret
+++ /dev/null
-#------------------------------------------------------------------------------
-#
-# 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:
-#
-# ZeroMem.asm
-#
-# Abstract:
-#
-# ZeroMem function
-#
-# Notes:
-#
-#------------------------------------------------------------------------------
-
- .686:
- #.MODEL flat,C
- .xmm:
- .code:
-
-#------------------------------------------------------------------------------
-# VOID *
-# _mem_ZeroMem (
-# IN VOID *Buffer,
-# IN UINTN Count
-# )
-#------------------------------------------------------------------------------
-.global _InternalMemZeroMem
-_InternalMemZeroMem:
- push %edi
- movl 8(%esp), %edi
- movl 12(%esp), %edx
- xorl %ecx, %ecx
- subl %edi, %ecx
- xorl %eax, %eax
- andl $15, %ecx
- jz L0
- cmpl %edx, %ecx
- cmova %edx, %ecx
- subl %ecx, %edx
- rep
- stosb
-L0:
- movl %edx, %ecx
- andl $15, %edx
- shrl $4, %ecx
- jz @ZeroBytes
- pxor %xmm0, %xmm0
-L1:
- movntdq %xmm0, (%edi)
- addl $16, %edi
- loop L1
- mfence
-@ZeroBytes:
- movl %edx, %ecx
- rep
- stosb
- movl 8(%esp), %eax
- pop %edi
- ret
<macrodef name="Build_GCC_Assembly_Code">\r
<attribute name="FILEPATH"/>\r
<attribute name="FILENAME"/>\r
- <attribute name="FILEEXT" default="s"/>\r
+ <attribute name="FILEEXT" default="S"/>\r
\r
<element name="EXTRA.INC" optional="yes"/>\r
<element name="EXTRA.ARG" optional="yes"/>\r