Update to use DOS format

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6360 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8
2008-11-03 09:25:10 +00:00
parent db835e01d3
commit b1ff428c96
182 changed files with 8928 additions and 8928 deletions

View File

@@ -1,67 +1,67 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# CpuIdEx.S
#
# 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 ASM_PFX(AsmCpuidEx)
ASM_PFX(AsmCpuidEx):
push %ebx
push %ebp
movl %esp, %ebp
movl 12(%ebp), %eax
movl 16(%ebp), %ecx
cpuid
push %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
leave
pop %ebx
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# CpuIdEx.S
#
# 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 ASM_PFX(AsmCpuidEx)
ASM_PFX(AsmCpuidEx):
push %ebx
push %ebp
movl %esp, %ebp
movl 12(%ebp), %eax
movl 16(%ebp), %ecx
cpuid
push %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
leave
pop %ebx
ret

View File

@@ -1,41 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# DivU64x32.S
#
# Abstract:
#
# Calculate the quotient of a 64-bit integer by a 32-bit integer
#
#------------------------------------------------------------------------------
.globl ASM_PFX(InternalMathDivU64x32)
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# InternalMathDivU64x32 (
# IN UINT64 Dividend,
# IN UINT32 Divisor
# );
#------------------------------------------------------------------------------
ASM_PFX(InternalMathDivU64x32):
movl 8(%esp), %eax
movl 12(%esp), %ecx
xorl %edx, %edx
divl %ecx
push %eax # save quotient on stack
movl 8(%esp), %eax
divl %ecx
pop %edx # restore high-order dword of the quotient
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# DivU64x32.S
#
# Abstract:
#
# Calculate the quotient of a 64-bit integer by a 32-bit integer
#
#------------------------------------------------------------------------------
.globl ASM_PFX(InternalMathDivU64x32)
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# InternalMathDivU64x32 (
# IN UINT64 Dividend,
# IN UINT32 Divisor
# );
#------------------------------------------------------------------------------
ASM_PFX(InternalMathDivU64x32):
movl 8(%esp), %eax
movl 12(%esp), %ecx
xorl %edx, %edx
divl %ecx
push %eax # save quotient on stack
movl 8(%esp), %eax
divl %ecx
pop %edx # restore high-order dword of the quotient
ret

View File

@@ -1,41 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# LShiftU64.S
#
# Abstract:
#
# 64-bit left shift function for IA-32
#
#------------------------------------------------------------------------------
.globl ASM_PFX(InternalMathLShiftU64)
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# InternalMathLShiftU64 (
# IN UINT64 Operand,
# IN UINTN Count
# );
#------------------------------------------------------------------------------
ASM_PFX(InternalMathLShiftU64):
movb 12(%esp), %cl
xorl %eax, %eax
movl 4(%esp), %edx
testb $32, %cl # Count >= 32?
cmovz %edx, %eax
cmovz 0x8(%esp), %edx
shld %cl, %eax, %edx
shl %cl, %eax
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# LShiftU64.S
#
# Abstract:
#
# 64-bit left shift function for IA-32
#
#------------------------------------------------------------------------------
.globl ASM_PFX(InternalMathLShiftU64)
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# InternalMathLShiftU64 (
# IN UINT64 Operand,
# IN UINTN Count
# );
#------------------------------------------------------------------------------
ASM_PFX(InternalMathLShiftU64):
movb 12(%esp), %cl
xorl %eax, %eax
movl 4(%esp), %edx
testb $32, %cl # Count >= 32?
cmovz %edx, %eax
cmovz 0x8(%esp), %edx
shld %cl, %eax, %edx
shl %cl, %eax
ret

View File

@@ -1,41 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# LongJump.S
#
# Abstract:
#
# Implementation of _LongJump() on IA-32.
#
#------------------------------------------------------------------------------
.globl ASM_PFX(InternalLongJump)
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalLongJump (
# IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,
# IN UINTN Value
# );
#------------------------------------------------------------------------------
ASM_PFX(InternalLongJump):
pop %eax # skip return address
pop %edx # edx <- JumpBuffer
pop %eax # eax <- Value
movl (%edx), %ebx
movl 4(%edx), %esi
movl 8(%edx), %edi
movl 12(%edx), %ebp
movl 16(%edx), %esp
jmp *20(%edx) # restore "eip"
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# LongJump.S
#
# Abstract:
#
# Implementation of _LongJump() on IA-32.
#
#------------------------------------------------------------------------------
.globl ASM_PFX(InternalLongJump)
#------------------------------------------------------------------------------
# VOID
# EFIAPI
# InternalLongJump (
# IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,
# IN UINTN Value
# );
#------------------------------------------------------------------------------
ASM_PFX(InternalLongJump):
pop %eax # skip return address
pop %edx # edx <- JumpBuffer
pop %eax # eax <- Value
movl (%edx), %ebx
movl 4(%edx), %esi
movl 8(%edx), %edi
movl 12(%edx), %ebp
movl 16(%edx), %esp
jmp *20(%edx) # restore "eip"

View File

@@ -1,41 +1,41 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# MultU64x32.S
#
# Abstract:
#
# Calculate the product of a 64-bit integer and a 32-bit integer
#
#------------------------------------------------------------------------------
.386:
.code:
.globl ASM_PFX(InternalMathMultU64x32)
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# InternalMathMultU64x32 (
# IN UINT64 Multiplicand,
# IN UINT32 Multiplier
# );
#------------------------------------------------------------------------------
ASM_PFX(InternalMathMultU64x32):
movl 12(%esp), %ecx
movl %ecx, %eax
imull 8(%esp), %ecx # overflow not detectable
mull 0x4(%esp)
addl %ecx, %edx
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# MultU64x32.S
#
# Abstract:
#
# Calculate the product of a 64-bit integer and a 32-bit integer
#
#------------------------------------------------------------------------------
.386:
.code:
.globl ASM_PFX(InternalMathMultU64x32)
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# InternalMathMultU64x32 (
# IN UINT64 Multiplicand,
# IN UINT32 Multiplier
# );
#------------------------------------------------------------------------------
ASM_PFX(InternalMathMultU64x32):
movl 12(%esp), %ecx
movl %ecx, %eax
imull 8(%esp), %ecx # overflow not detectable
mull 0x4(%esp)
addl %ecx, %edx
ret

View File

@@ -1,44 +1,44 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# RShiftU64.S
#
# Abstract:
#
# 64-bit logical right shift function for IA-32
#
#------------------------------------------------------------------------------
.686:
.code:
.globl ASM_PFX(InternalMathRShiftU64)
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# InternalMathRShiftU64 (
# IN UINT64 Operand,
# IN UINTN Count
# );
#------------------------------------------------------------------------------
ASM_PFX(InternalMathRShiftU64):
movb 12(%esp), %cl # cl <- Count
xorl %edx, %edx
movl 8(%esp), %eax
testb $32, %cl # Count >= 32?
cmovz %eax, %edx
cmovz 0x4(%esp), %eax
shrdl %cl, %edx, %eax
shr %cl, %edx
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# RShiftU64.S
#
# Abstract:
#
# 64-bit logical right shift function for IA-32
#
#------------------------------------------------------------------------------
.686:
.code:
.globl ASM_PFX(InternalMathRShiftU64)
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# InternalMathRShiftU64 (
# IN UINT64 Operand,
# IN UINTN Count
# );
#------------------------------------------------------------------------------
ASM_PFX(InternalMathRShiftU64):
movb 12(%esp), %cl # cl <- Count
xorl %edx, %edx
movl 8(%esp), %eax
testb $32, %cl # Count >= 32?
cmovz %eax, %edx
cmovz 0x4(%esp), %eax
shrdl %cl, %edx, %eax
shr %cl, %edx
ret

View File

@@ -1,38 +1,38 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# CpuId.S
#
# Abstract:
#
# AsmCpuid function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# InternalMathSwapBytes64 (
# IN UINT64 Operand
# );
#------------------------------------------------------------------------------
.globl ASM_PFX(InternalMathSwapBytes64)
ASM_PFX(InternalMathSwapBytes64):
movl 8(%esp), %eax # eax <- upper 32 bits
movl 4(%esp), %edx # edx <- lower 32 bits
bswapl %eax
bswapl %edx
ret
#------------------------------------------------------------------------------
#
# Copyright (c) 2006 - 2008, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
# Module Name:
#
# CpuId.S
#
# Abstract:
#
# AsmCpuid function
#
# Notes:
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# UINT64
# EFIAPI
# InternalMathSwapBytes64 (
# IN UINT64 Operand
# );
#------------------------------------------------------------------------------
.globl ASM_PFX(InternalMathSwapBytes64)
ASM_PFX(InternalMathSwapBytes64):
movl 8(%esp), %eax # eax <- upper 32 bits
movl 4(%esp), %edx # edx <- lower 32 bits
bswapl %eax
bswapl %edx
ret