1. Fix bugs in assembly instructions
2. Change module names in comments from .asm to .S
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6196
6f19259b-4bc3-4df7-8a09-
765794883524
#------------------------------------------------------------------------------
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006, Intel Corporation
+# 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
# 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
#------------------------------------------------------------------------------
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006, Intel Corporation
+# 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
# 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
ASM_PFX(InternalX86DisablePaging64):
cli
shl $0x20,%rcx
ASM_PFX(InternalX86DisablePaging64):
cli
shl $0x20,%rcx
- lea (%rip), %eax
- mov %eax,%ecx
- push %rcx
- mov %edx,%ebx
- mov %r8d,%esi
- mov %r9d,%edi
- mov 0x28(%rsp),%eax
- lret
+ lea L1, %eax
+ mov %r8d, %esi \r
+ or %rax, %rcx\r
+ mov %r9d, %edi \r
+ mov 0x28(%rsp), %eax\r
+ push %rcx\r
+ ret\r
L1:
mov %eax,%esp
mov %cr0,%rax
L1:
mov %eax,%esp
mov %cr0,%rax
mov %rax,%cr4
push %rdi
push %rsi
mov %rax,%cr4
push %rdi
push %rsi
#------------------------------------------------------------------------------
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006, Intel Corporation
+# 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
# 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
#------------------------------------------------------------------------------
.global ASM_PFX(AsmFlushCacheLine)
ASM_PFX(AsmFlushCacheLine):
#------------------------------------------------------------------------------
.global ASM_PFX(AsmFlushCacheLine)
ASM_PFX(AsmFlushCacheLine):
- clflush (%rdi)
- mov %rdi, %rax
+ clflush (%rcx)
+ mov %rcx, %rax
#------------------------------------------------------------------------------\r
#\r
#------------------------------------------------------------------------------\r
#\r
-# Copyright (c) 2006, Intel Corporation\r
+# Copyright (c) 2006 - 2008, 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
# 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
-# InterlockedCompareExchange32.Asm\r
+# InterlockedCompareExchange32.S\r
#------------------------------------------------------------------------------
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006, Intel Corporation
+# 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
# 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
.global ASM_PFX(InternalSyncCompareExchange64)
.align 16
ASM_PFX(InternalSyncCompareExchange64):
.global ASM_PFX(InternalSyncCompareExchange64)
.align 16
ASM_PFX(InternalSyncCompareExchange64):
- mov %rsi, %rax
- lock cmpxchg %rdx,(%rdi)
+ mov %rdx, %rax
+ lock cmpxchg %r8,(%rcx)
#------------------------------------------------------------------------------
#
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006, Intel Corporation
+# 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
# 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
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm0)
ASM_PFX(AsmWriteMm0):
#------------------------------------------------------------------------------
.global ASM_PFX(AsmWriteMm0)
ASM_PFX(AsmWriteMm0):