mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 23:54:02 +02:00
1. Remove .extern from GCC assembly.
2. Define macro for .global/.globl in GCC assembly. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8344 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
dedfc3bbc9
commit
d5172f911d
@ -42,8 +42,8 @@
|
|||||||
.equ LOADER_FILENAME_PART2, 0x020205244 # "DR__"
|
.equ LOADER_FILENAME_PART2, 0x020205244 # "DR__"
|
||||||
.equ LOADER_FILENAME_PART3, 0x020202020 # "____"
|
.equ LOADER_FILENAME_PART3, 0x020202020 # "____"
|
||||||
|
|
||||||
.org 0x0
|
.org 0x0
|
||||||
.global _start
|
ASM_GLOBAL _start
|
||||||
_start:
|
_start:
|
||||||
Ia32Jump:
|
Ia32Jump:
|
||||||
jmp BootSectorEntryPoint # JMP inst - 3 bytes
|
jmp BootSectorEntryPoint # JMP inst - 3 bytes
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
.equ LOADER_FILENAME_PART2, 0x036315244 # "DR16"
|
.equ LOADER_FILENAME_PART2, 0x036315244 # "DR16"
|
||||||
.equ LOADER_FILENAME_PART3, 0x020202036 # "6___"
|
.equ LOADER_FILENAME_PART3, 0x020202036 # "6___"
|
||||||
|
|
||||||
.org 0x0
|
.org 0x0
|
||||||
.global _start
|
ASM_GLOBAL _start
|
||||||
_start:
|
_start:
|
||||||
Ia32Jump:
|
Ia32Jump:
|
||||||
jmp BootSectorEntryPoint # JMP inst - 3 bytes
|
jmp BootSectorEntryPoint # JMP inst - 3 bytes
|
||||||
|
@ -30,8 +30,8 @@
|
|||||||
.equ LOADER_FILENAME_PART2, 0x30325244 # "DR20"
|
.equ LOADER_FILENAME_PART2, 0x30325244 # "DR20"
|
||||||
.equ LOADER_FILENAME_PART3, 0x20202030 # "0___"
|
.equ LOADER_FILENAME_PART3, 0x20202030 # "0___"
|
||||||
|
|
||||||
.org 0x0
|
.org 0x0
|
||||||
.global _start
|
ASM_GLOBAL _start
|
||||||
_start:
|
_start:
|
||||||
Ia32Jump:
|
Ia32Jump:
|
||||||
jmp BootSectorEntryPoint # JMP inst - 3 bytes
|
jmp BootSectorEntryPoint # JMP inst - 3 bytes
|
||||||
|
@ -26,8 +26,8 @@
|
|||||||
.equ BLOCK_MASK, 0x01ff
|
.equ BLOCK_MASK, 0x01ff
|
||||||
.equ BLOCK_SHIFT, 9
|
.equ BLOCK_SHIFT, 9
|
||||||
|
|
||||||
.org 0x00
|
.org 0x00
|
||||||
.global _start
|
ASM_GLOBAL _start
|
||||||
_start:
|
_start:
|
||||||
Ia32Jump:
|
Ia32Jump:
|
||||||
jmp BootSectorEntryPoint # JMP inst - 3 bytes
|
jmp BootSectorEntryPoint # JMP inst - 3 bytes
|
||||||
@ -452,7 +452,7 @@ gdtr: .word GDT_END - GDT_BASE - 1 # GDT limit
|
|||||||
|
|
||||||
.align 0x2
|
.align 0x2
|
||||||
|
|
||||||
.global GDT_BASE
|
ASM_GLOBAL GDT_BASE
|
||||||
GDT_BASE:
|
GDT_BASE:
|
||||||
# null descriptor
|
# null descriptor
|
||||||
.equ NULL_SEL, .-GDT_BASE
|
.equ NULL_SEL, .-GDT_BASE
|
||||||
@ -546,7 +546,7 @@ idtr: .word IDT_END - IDT_BASE - 1 # IDT limit
|
|||||||
#idt_tag db "IDT",0
|
#idt_tag db "IDT",0
|
||||||
.align 0x2
|
.align 0x2
|
||||||
|
|
||||||
.global IDT_BASE
|
ASM_GLOBAL IDT_BASE
|
||||||
IDT_BASE:
|
IDT_BASE:
|
||||||
# divide by zero (INT 0)
|
# divide by zero (INT 0)
|
||||||
.equ DIV_ZERO_SEL, .-IDT_BASE
|
.equ DIV_ZERO_SEL, .-IDT_BASE
|
||||||
|
@ -33,10 +33,10 @@
|
|||||||
#
|
#
|
||||||
# Destroys no working registers.
|
# Destroys no working registers.
|
||||||
#****************************************************************************
|
#****************************************************************************
|
||||||
.global _CopyMem;
|
ASM_GLOBAL _CopyMem;
|
||||||
|
|
||||||
# VOID EbcLLCALLEXNative(UINTN FuncAddr, UINTN NewStackPointer, VOID *FramePtr)
|
# VOID EbcLLCALLEXNative(UINTN FuncAddr, UINTN NewStackPointer, VOID *FramePtr)
|
||||||
.global ASM_PFX(EbcLLCALLEXNative);
|
ASM_GLOBAL ASM_PFX(EbcLLCALLEXNative);
|
||||||
ASM_PFX(EbcLLCALLEXNative):
|
ASM_PFX(EbcLLCALLEXNative):
|
||||||
push %rbp
|
push %rbp
|
||||||
push %rbx
|
push %rbx
|
||||||
@ -84,7 +84,7 @@ ASM_PFX(EbcLLCALLEXNative):
|
|||||||
# Returns:
|
# Returns:
|
||||||
# The contents of the register in which the entry point is passed.
|
# The contents of the register in which the entry point is passed.
|
||||||
#
|
#
|
||||||
.global ASM_PFX(EbcLLGetEbcEntryPoint);
|
ASM_GLOBAL ASM_PFX(EbcLLGetEbcEntryPoint);
|
||||||
ASM_PFX(EbcLLGetEbcEntryPoint):
|
ASM_PFX(EbcLLGetEbcEntryPoint):
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ ASM_PFX(EbcLLGetEbcEntryPoint):
|
|||||||
#--*/
|
#--*/
|
||||||
|
|
||||||
# UINTN EbcLLGetStackPointer()
|
# UINTN EbcLLGetStackPointer()
|
||||||
.global ASM_PFX(EbcLLGetStackPointer);
|
ASM_GLOBAL ASM_PFX(EbcLLGetStackPointer);
|
||||||
ASM_PFX(EbcLLGetStackPointer):
|
ASM_PFX(EbcLLGetStackPointer):
|
||||||
mov %rsp, %rax
|
mov %rsp, %rax
|
||||||
# Stack adjusted by this much when we were called,
|
# Stack adjusted by this much when we were called,
|
||||||
@ -115,7 +115,7 @@ ASM_PFX(EbcLLGetStackPointer):
|
|||||||
add $4, %rax
|
add $4, %rax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.global ASM_PFX(EbcLLGetReturnValue);
|
ASM_GLOBAL ASM_PFX(EbcLLGetReturnValue);
|
||||||
ASM_PFX(EbcLLGetReturnValue):
|
ASM_PFX(EbcLLGetReturnValue):
|
||||||
# UINT64 EbcLLGetReturnValue(VOID);
|
# UINT64 EbcLLGetReturnValue(VOID);
|
||||||
# Routine Description:
|
# Routine Description:
|
||||||
|
@ -341,6 +341,11 @@ typedef INT32 INTN;
|
|||||||
#else
|
#else
|
||||||
#define ASM_PFX(name) _##name
|
#define ASM_PFX(name) _##name
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
#define ASM_GLOBAL .globl
|
||||||
|
#else
|
||||||
|
#define ASM_GLOBAL .global
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -405,6 +405,11 @@ typedef INT64 INTN;
|
|||||||
#else
|
#else
|
||||||
#define ASM_PFX(name) _##name
|
#define ASM_PFX(name) _##name
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
#define ASM_GLOBAL .globl
|
||||||
|
#else
|
||||||
|
#define ASM_GLOBAL .global
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
.global ASM_PFX(CpuFlushTlb)
|
ASM_GLOBAL ASM_PFX(CpuFlushTlb)
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# VOID
|
# VOID
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(CpuSleep)
|
ASM_GLOBAL ASM_PFX(CpuSleep)
|
||||||
ASM_PFX(CpuSleep):
|
ASM_PFX(CpuSleep):
|
||||||
hlt
|
hlt
|
||||||
ret
|
ret
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
.global ASM_PFX(CpuBreakpoint)
|
ASM_GLOBAL ASM_PFX(CpuBreakpoint)
|
||||||
ASM_PFX(CpuBreakpoint):
|
ASM_PFX(CpuBreakpoint):
|
||||||
int $0x3
|
int $0x3
|
||||||
ret
|
ret
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
# OUT UINT32 *RegisterOutEdx OPTIONAL
|
# OUT UINT32 *RegisterOutEdx OPTIONAL
|
||||||
# )
|
# )
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmCpuid)
|
ASM_GLOBAL ASM_PFX(AsmCpuid)
|
||||||
ASM_PFX(AsmCpuid):
|
ASM_PFX(AsmCpuid):
|
||||||
push %rbx
|
push %rbx
|
||||||
mov %ecx, %eax
|
mov %ecx, %eax
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
# OUT UINT32 *RegisterOutEdx OPTIONAL
|
# OUT UINT32 *RegisterOutEdx OPTIONAL
|
||||||
# )
|
# )
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmCpuidEx)
|
ASM_GLOBAL ASM_PFX(AsmCpuidEx)
|
||||||
ASM_PFX(AsmCpuidEx):
|
ASM_PFX(AsmCpuidEx):
|
||||||
push %rbx
|
push %rbx
|
||||||
movl %ecx,%eax
|
movl %ecx,%eax
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(CpuPause)
|
ASM_GLOBAL ASM_PFX(CpuPause)
|
||||||
ASM_PFX(CpuPause):
|
ASM_PFX(CpuPause):
|
||||||
pause
|
pause
|
||||||
ret
|
ret
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(DisableInterrupts)
|
ASM_GLOBAL ASM_PFX(DisableInterrupts)
|
||||||
ASM_PFX(DisableInterrupts):
|
ASM_PFX(DisableInterrupts):
|
||||||
cli
|
cli
|
||||||
ret
|
ret
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
.global ASM_PFX(InternalX86DisablePaging64)
|
ASM_GLOBAL ASM_PFX(InternalX86DisablePaging64)
|
||||||
ASM_PFX(InternalX86DisablePaging64):
|
ASM_PFX(InternalX86DisablePaging64):
|
||||||
cli
|
cli
|
||||||
shl $0x20,%rcx # rcx[32..47] <- Cs
|
shl $0x20,%rcx # rcx[32..47] <- Cs
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(EnableDisableInterrupts)
|
ASM_GLOBAL ASM_PFX(EnableDisableInterrupts)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(EnableDisableInterrupts):
|
ASM_PFX(EnableDisableInterrupts):
|
||||||
sti
|
sti
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(EnableInterrupts)
|
ASM_GLOBAL ASM_PFX(EnableInterrupts)
|
||||||
ASM_PFX(EnableInterrupts):
|
ASM_PFX(EnableInterrupts):
|
||||||
sti
|
sti
|
||||||
ret
|
ret
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN VOID *LinearAddress
|
# IN VOID *LinearAddress
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmFlushCacheLine)
|
ASM_GLOBAL ASM_PFX(AsmFlushCacheLine)
|
||||||
ASM_PFX(AsmFlushCacheLine):
|
ASM_PFX(AsmFlushCacheLine):
|
||||||
clflush (%rcx)
|
clflush (%rcx)
|
||||||
mov %rcx, %rax
|
mov %rcx, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN CONST IA32_FX_BUFFER *Buffer
|
# IN CONST IA32_FX_BUFFER *Buffer
|
||||||
# )#
|
# )#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalX86FxRestore)
|
ASM_GLOBAL ASM_PFX(InternalX86FxRestore)
|
||||||
ASM_PFX(InternalX86FxRestore):
|
ASM_PFX(InternalX86FxRestore):
|
||||||
fxrstor (%rcx)
|
fxrstor (%rcx)
|
||||||
ret
|
ret
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# OUT IA32_FX_BUFFER *Buffer
|
# OUT IA32_FX_BUFFER *Buffer
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalX86FxSave)
|
ASM_GLOBAL ASM_PFX(InternalX86FxSave)
|
||||||
ASM_PFX(InternalX86FxSave):
|
ASM_PFX(InternalX86FxSave):
|
||||||
fxsave (%rcx)
|
fxsave (%rcx)
|
||||||
ret
|
ret
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# )#
|
# )#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmInvd)
|
ASM_GLOBAL ASM_PFX(AsmInvd)
|
||||||
ASM_PFX(AsmInvd):
|
ASM_PFX(AsmInvd):
|
||||||
invd
|
invd
|
||||||
ret
|
ret
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# IN UINTN Value
|
# IN UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalLongJump)
|
ASM_GLOBAL ASM_PFX(InternalLongJump)
|
||||||
ASM_PFX(InternalLongJump):
|
ASM_PFX(InternalLongJump):
|
||||||
mov (%rcx), %rbx
|
mov (%rcx), %rbx
|
||||||
mov 0x8(%rcx), %rsp
|
mov 0x8(%rcx), %rsp
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
# IN UINTN Edx
|
# IN UINTN Edx
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmMonitor)
|
ASM_GLOBAL ASM_PFX(AsmMonitor)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmMonitor):
|
ASM_PFX(AsmMonitor):
|
||||||
mov %ecx,%eax
|
mov %ecx,%eax
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
# IN UINTN Ecx
|
# IN UINTN Ecx
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmMwait)
|
ASM_GLOBAL ASM_PFX(AsmMwait)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmMwait):
|
ASM_PFX(AsmMwait):
|
||||||
mov %ecx,%eax
|
mov %ecx,%eax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadCr0)
|
ASM_GLOBAL ASM_PFX(AsmReadCr0)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadCr0):
|
ASM_PFX(AsmReadCr0):
|
||||||
mov %cr0, %rax
|
mov %cr0, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadCr2)
|
ASM_GLOBAL ASM_PFX(AsmReadCr2)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadCr2):
|
ASM_PFX(AsmReadCr2):
|
||||||
mov %cr2, %rax
|
mov %cr2, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadCr3)
|
ASM_GLOBAL ASM_PFX(AsmReadCr3)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadCr3):
|
ASM_PFX(AsmReadCr3):
|
||||||
mov %cr3, %rax
|
mov %cr3, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadCr4)
|
ASM_GLOBAL ASM_PFX(AsmReadCr4)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadCr4):
|
ASM_PFX(AsmReadCr4):
|
||||||
mov %cr4, %rax
|
mov %cr4, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadCs)
|
ASM_GLOBAL ASM_PFX(AsmReadCs)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadCs):
|
ASM_PFX(AsmReadCs):
|
||||||
mov %cs, %eax
|
mov %cs, %eax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr0)
|
ASM_GLOBAL ASM_PFX(AsmReadDr0)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadDr0):
|
ASM_PFX(AsmReadDr0):
|
||||||
mov %dr0, %rax
|
mov %dr0, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr1)
|
ASM_GLOBAL ASM_PFX(AsmReadDr1)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadDr1):
|
ASM_PFX(AsmReadDr1):
|
||||||
mov %dr1, %rax
|
mov %dr1, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr2)
|
ASM_GLOBAL ASM_PFX(AsmReadDr2)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadDr2):
|
ASM_PFX(AsmReadDr2):
|
||||||
mov %dr2, %rax
|
mov %dr2, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr3)
|
ASM_GLOBAL ASM_PFX(AsmReadDr3)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadDr3):
|
ASM_PFX(AsmReadDr3):
|
||||||
mov %dr3, %rax
|
mov %dr3, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr4)
|
ASM_GLOBAL ASM_PFX(AsmReadDr4)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadDr4):
|
ASM_PFX(AsmReadDr4):
|
||||||
#DB 0fh, 21h, 0e0h
|
#DB 0fh, 21h, 0e0h
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr5)
|
ASM_GLOBAL ASM_PFX(AsmReadDr5)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadDr5):
|
ASM_PFX(AsmReadDr5):
|
||||||
mov %dr5, %rax
|
mov %dr5, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr6)
|
ASM_GLOBAL ASM_PFX(AsmReadDr6)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadDr6):
|
ASM_PFX(AsmReadDr6):
|
||||||
mov %dr6, %rax
|
mov %dr6, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDr7)
|
ASM_GLOBAL ASM_PFX(AsmReadDr7)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadDr7):
|
ASM_PFX(AsmReadDr7):
|
||||||
mov %dr7, %rax
|
mov %dr7, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadDs)
|
ASM_GLOBAL ASM_PFX(AsmReadDs)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadDs):
|
ASM_PFX(AsmReadDs):
|
||||||
movl %ds, %eax
|
movl %ds, %eax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadEflags)
|
ASM_GLOBAL ASM_PFX(AsmReadEflags)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadEflags):
|
ASM_PFX(AsmReadEflags):
|
||||||
pushfq
|
pushfq
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadEs)
|
ASM_GLOBAL ASM_PFX(AsmReadEs)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadEs):
|
ASM_PFX(AsmReadEs):
|
||||||
mov %es, %eax
|
mov %es, %eax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadFs)
|
ASM_GLOBAL ASM_PFX(AsmReadFs)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadFs):
|
ASM_PFX(AsmReadFs):
|
||||||
mov %fs, %eax
|
mov %fs, %eax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# OUT IA32_DESCRIPTOR *Gdtr
|
# OUT IA32_DESCRIPTOR *Gdtr
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalX86ReadGdtr)
|
ASM_GLOBAL ASM_PFX(InternalX86ReadGdtr)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(InternalX86ReadGdtr):
|
ASM_PFX(InternalX86ReadGdtr):
|
||||||
sgdt (%rcx)
|
sgdt (%rcx)
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadGs)
|
ASM_GLOBAL ASM_PFX(AsmReadGs)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadGs):
|
ASM_PFX(AsmReadGs):
|
||||||
mov %gs, %eax
|
mov %gs, %eax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# OUT IA32_DESCRIPTOR *Idtr
|
# OUT IA32_DESCRIPTOR *Idtr
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalX86ReadIdtr)
|
ASM_GLOBAL ASM_PFX(InternalX86ReadIdtr)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(InternalX86ReadIdtr):
|
ASM_PFX(InternalX86ReadIdtr):
|
||||||
sidt (%rcx)
|
sidt (%rcx)
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadLdtr)
|
ASM_GLOBAL ASM_PFX(AsmReadLdtr)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadLdtr):
|
ASM_PFX(AsmReadLdtr):
|
||||||
sldt %eax
|
sldt %eax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm0)
|
ASM_GLOBAL ASM_PFX(AsmReadMm0)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadMm0):
|
ASM_PFX(AsmReadMm0):
|
||||||
movd %mm0, %rax
|
movd %mm0, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm1)
|
ASM_GLOBAL ASM_PFX(AsmReadMm1)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadMm1):
|
ASM_PFX(AsmReadMm1):
|
||||||
movd %mm1, %rax
|
movd %mm1, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm2)
|
ASM_GLOBAL ASM_PFX(AsmReadMm2)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadMm2):
|
ASM_PFX(AsmReadMm2):
|
||||||
movd %mm2, %rax
|
movd %mm2, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm3)
|
ASM_GLOBAL ASM_PFX(AsmReadMm3)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadMm3):
|
ASM_PFX(AsmReadMm3):
|
||||||
movd %mm3, %rax
|
movd %mm3, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm4)
|
ASM_GLOBAL ASM_PFX(AsmReadMm4)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadMm4):
|
ASM_PFX(AsmReadMm4):
|
||||||
movd %mm4, %rax
|
movd %mm4, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm5)
|
ASM_GLOBAL ASM_PFX(AsmReadMm5)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadMm5):
|
ASM_PFX(AsmReadMm5):
|
||||||
movd %mm5, %rax
|
movd %mm5, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm6)
|
ASM_GLOBAL ASM_PFX(AsmReadMm6)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadMm6):
|
ASM_PFX(AsmReadMm6):
|
||||||
movd %mm6, %rax
|
movd %mm6, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMm7)
|
ASM_GLOBAL ASM_PFX(AsmReadMm7)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadMm7):
|
ASM_PFX(AsmReadMm7):
|
||||||
movd %mm7, %rax
|
movd %mm7, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINT32 Index
|
# IN UINT32 Index
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadMsr64)
|
ASM_GLOBAL ASM_PFX(AsmReadMsr64)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadMsr64):
|
ASM_PFX(AsmReadMsr64):
|
||||||
rdmsr # edx & eax are zero extended
|
rdmsr # edx & eax are zero extended
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINT32 PmcIndex
|
# IN UINT32 PmcIndex
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadPmc)
|
ASM_GLOBAL ASM_PFX(AsmReadPmc)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadPmc):
|
ASM_PFX(AsmReadPmc):
|
||||||
rdpmc
|
rdpmc
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadSs)
|
ASM_GLOBAL ASM_PFX(AsmReadSs)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadSs):
|
ASM_PFX(AsmReadSs):
|
||||||
movl %ss, %eax
|
movl %ss, %eax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadTr)
|
ASM_GLOBAL ASM_PFX(AsmReadTr)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadTr):
|
ASM_PFX(AsmReadTr):
|
||||||
str %eax
|
str %eax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmReadTsc)
|
ASM_GLOBAL ASM_PFX(AsmReadTsc)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmReadTsc):
|
ASM_PFX(AsmReadTsc):
|
||||||
rdtsc
|
rdtsc
|
||||||
|
@ -19,8 +19,7 @@
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
.extern ASM_PFX(InternalAssertJumpBuffer)
|
ASM_GLOBAL ASM_PFX(SetJump)
|
||||||
.global ASM_PFX(SetJump)
|
|
||||||
ASM_PFX(SetJump):
|
ASM_PFX(SetJump):
|
||||||
push %rcx
|
push %rcx
|
||||||
add $0xffffffffffffffe0,%rsp
|
add $0xffffffffffffffe0,%rsp
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
# None
|
# None
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalSwitchStack)
|
ASM_GLOBAL ASM_PFX(InternalSwitchStack)
|
||||||
ASM_PFX(InternalSwitchStack):
|
ASM_PFX(InternalSwitchStack):
|
||||||
mov %rcx, %rax
|
mov %rcx, %rax
|
||||||
mov %rdx, %rcx
|
mov %rdx, %rcx
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# VOID
|
# VOID
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWbinvd)
|
ASM_GLOBAL ASM_PFX(AsmWbinvd)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmWbinvd):
|
ASM_PFX(AsmWbinvd):
|
||||||
wbinvd
|
wbinvd
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# UINTN Cr0
|
# UINTN Cr0
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteCr0)
|
ASM_GLOBAL ASM_PFX(AsmWriteCr0)
|
||||||
ASM_PFX(AsmWriteCr0):
|
ASM_PFX(AsmWriteCr0):
|
||||||
mov %rcx,%cr0
|
mov %rcx,%cr0
|
||||||
mov %rcx,%rax
|
mov %rcx,%rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# UINTN Cr2
|
# UINTN Cr2
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteCr2)
|
ASM_GLOBAL ASM_PFX(AsmWriteCr2)
|
||||||
ASM_PFX(AsmWriteCr2):
|
ASM_PFX(AsmWriteCr2):
|
||||||
mov %rcx,%cr2
|
mov %rcx,%cr2
|
||||||
mov %rcx,%rax
|
mov %rcx,%rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# UINTN Cr3
|
# UINTN Cr3
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteCr3)
|
ASM_GLOBAL ASM_PFX(AsmWriteCr3)
|
||||||
ASM_PFX(AsmWriteCr3):
|
ASM_PFX(AsmWriteCr3):
|
||||||
mov %rcx,%cr3
|
mov %rcx,%cr3
|
||||||
mov %rcx,%rax
|
mov %rcx,%rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# UINTN Cr4
|
# UINTN Cr4
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteCr4)
|
ASM_GLOBAL ASM_PFX(AsmWriteCr4)
|
||||||
ASM_PFX(AsmWriteCr4):
|
ASM_PFX(AsmWriteCr4):
|
||||||
mov %rcx,%cr4
|
mov %rcx,%cr4
|
||||||
mov %rcx,%rax
|
mov %rcx,%rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# UINTN Value
|
# UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr0)
|
ASM_GLOBAL ASM_PFX(AsmWriteDr0)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmWriteDr0):
|
ASM_PFX(AsmWriteDr0):
|
||||||
mov %rcx, %dr0
|
mov %rcx, %dr0
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# UINTN Value
|
# UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr1)
|
ASM_GLOBAL ASM_PFX(AsmWriteDr1)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmWriteDr1):
|
ASM_PFX(AsmWriteDr1):
|
||||||
mov %rcx, %dr1
|
mov %rcx, %dr1
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# UINTN Value
|
# UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr2)
|
ASM_GLOBAL ASM_PFX(AsmWriteDr2)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmWriteDr2):
|
ASM_PFX(AsmWriteDr2):
|
||||||
mov %rcx, %dr2
|
mov %rcx, %dr2
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# UINTN Value
|
# UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr3)
|
ASM_GLOBAL ASM_PFX(AsmWriteDr3)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmWriteDr3):
|
ASM_PFX(AsmWriteDr3):
|
||||||
mov %rcx, %dr3
|
mov %rcx, %dr3
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINTN Value
|
# IN UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr4)
|
ASM_GLOBAL ASM_PFX(AsmWriteDr4)
|
||||||
ASM_PFX(AsmWriteDr4):
|
ASM_PFX(AsmWriteDr4):
|
||||||
mov %rcx, %dr4
|
mov %rcx, %dr4
|
||||||
mov %rcx, %rax
|
mov %rcx, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINTN Value
|
# IN UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr5)
|
ASM_GLOBAL ASM_PFX(AsmWriteDr5)
|
||||||
ASM_PFX(AsmWriteDr5):
|
ASM_PFX(AsmWriteDr5):
|
||||||
mov %rcx, %dr5
|
mov %rcx, %dr5
|
||||||
mov %rcx, %rax
|
mov %rcx, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINTN Value
|
# IN UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr6)
|
ASM_GLOBAL ASM_PFX(AsmWriteDr6)
|
||||||
ASM_PFX(AsmWriteDr6):
|
ASM_PFX(AsmWriteDr6):
|
||||||
mov %rcx, %dr6
|
mov %rcx, %dr6
|
||||||
mov %rcx, %rax
|
mov %rcx, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINTN Value
|
# IN UINTN Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteDr7)
|
ASM_GLOBAL ASM_PFX(AsmWriteDr7)
|
||||||
ASM_PFX(AsmWriteDr7):
|
ASM_PFX(AsmWriteDr7):
|
||||||
mov %rcx, %dr7
|
mov %rcx, %dr7
|
||||||
mov %rcx, %rax
|
mov %rcx, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN CONST IA32_DESCRIPTOR *Idtr
|
# IN CONST IA32_DESCRIPTOR *Idtr
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalX86WriteGdtr)
|
ASM_GLOBAL ASM_PFX(InternalX86WriteGdtr)
|
||||||
ASM_PFX(InternalX86WriteGdtr):
|
ASM_PFX(InternalX86WriteGdtr):
|
||||||
lgdt (%rcx)
|
lgdt (%rcx)
|
||||||
ret
|
ret
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN CONST IA32_DESCRIPTOR *Idtr
|
# IN CONST IA32_DESCRIPTOR *Idtr
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalX86WriteIdtr)
|
ASM_GLOBAL ASM_PFX(InternalX86WriteIdtr)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(InternalX86WriteIdtr):
|
ASM_PFX(InternalX86WriteIdtr):
|
||||||
lidt (%rcx)
|
lidt (%rcx)
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINT16 Ldtr
|
# IN UINT16 Ldtr
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteLdtr)
|
ASM_GLOBAL ASM_PFX(AsmWriteLdtr)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmWriteLdtr):
|
ASM_PFX(AsmWriteLdtr):
|
||||||
lldt %cx
|
lldt %cx
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm0)
|
ASM_GLOBAL ASM_PFX(AsmWriteMm0)
|
||||||
ASM_PFX(AsmWriteMm0):
|
ASM_PFX(AsmWriteMm0):
|
||||||
movd %rcx, %mm0
|
movd %rcx, %mm0
|
||||||
ret
|
ret
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm1)
|
ASM_GLOBAL ASM_PFX(AsmWriteMm1)
|
||||||
ASM_PFX(AsmWriteMm1):
|
ASM_PFX(AsmWriteMm1):
|
||||||
movd %rcx, %mm1
|
movd %rcx, %mm1
|
||||||
ret
|
ret
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm2)
|
ASM_GLOBAL ASM_PFX(AsmWriteMm2)
|
||||||
ASM_PFX(AsmWriteMm2):
|
ASM_PFX(AsmWriteMm2):
|
||||||
movd %rcx, %mm2
|
movd %rcx, %mm2
|
||||||
ret
|
ret
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm3)
|
ASM_GLOBAL ASM_PFX(AsmWriteMm3)
|
||||||
ASM_PFX(AsmWriteMm3):
|
ASM_PFX(AsmWriteMm3):
|
||||||
movd %rcx, %mm3
|
movd %rcx, %mm3
|
||||||
ret
|
ret
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm4)
|
ASM_GLOBAL ASM_PFX(AsmWriteMm4)
|
||||||
ASM_PFX(AsmWriteMm4):
|
ASM_PFX(AsmWriteMm4):
|
||||||
movd %rcx, %mm4
|
movd %rcx, %mm4
|
||||||
ret
|
ret
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm5)
|
ASM_GLOBAL ASM_PFX(AsmWriteMm5)
|
||||||
ASM_PFX(AsmWriteMm5):
|
ASM_PFX(AsmWriteMm5):
|
||||||
movd %rcx, %mm5
|
movd %rcx, %mm5
|
||||||
ret
|
ret
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm6)
|
ASM_GLOBAL ASM_PFX(AsmWriteMm6)
|
||||||
ASM_PFX(AsmWriteMm6):
|
ASM_PFX(AsmWriteMm6):
|
||||||
movd %rcx, %mm6
|
movd %rcx, %mm6
|
||||||
ret
|
ret
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMm7)
|
ASM_GLOBAL ASM_PFX(AsmWriteMm7)
|
||||||
ASM_PFX(AsmWriteMm7):
|
ASM_PFX(AsmWriteMm7):
|
||||||
movd %rcx, %mm7
|
movd %rcx, %mm7
|
||||||
ret
|
ret
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
# IN UINT64 Value
|
# IN UINT64 Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(AsmWriteMsr64)
|
ASM_GLOBAL ASM_PFX(AsmWriteMsr64)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(AsmWriteMsr64):
|
ASM_PFX(AsmWriteMsr64):
|
||||||
mov %rdx, %rax # meanwhile, rax <- return value
|
mov %rdx, %rax # meanwhile, rax <- return value
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
# IN UINT32 ExchangeValue
|
# IN UINT32 ExchangeValue
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalSyncCompareExchange32)
|
ASM_GLOBAL ASM_PFX(InternalSyncCompareExchange32)
|
||||||
ASM_PFX(InternalSyncCompareExchange32):
|
ASM_PFX(InternalSyncCompareExchange32):
|
||||||
mov %edx, %eax
|
mov %edx, %eax
|
||||||
lock cmpxchg %r8d, (%rcx)
|
lock cmpxchg %r8d, (%rcx)
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
# IN UINT64 ExchangeValue
|
# IN UINT64 ExchangeValue
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalSyncCompareExchange64)
|
ASM_GLOBAL ASM_PFX(InternalSyncCompareExchange64)
|
||||||
.align 16
|
.align 16
|
||||||
ASM_PFX(InternalSyncCompareExchange64):
|
ASM_PFX(InternalSyncCompareExchange64):
|
||||||
mov %rdx, %rax
|
mov %rdx, %rax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINT32 *Value
|
# IN UINT32 *Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalSyncDecrement)
|
ASM_GLOBAL ASM_PFX(InternalSyncDecrement)
|
||||||
ASM_PFX(InternalSyncDecrement):
|
ASM_PFX(InternalSyncDecrement):
|
||||||
lock decl (%rcx)
|
lock decl (%rcx)
|
||||||
mov (%rcx), %eax
|
mov (%rcx), %eax
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
# IN UINT32 *Value
|
# IN UINT32 *Value
|
||||||
# );
|
# );
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
.global ASM_PFX(InternalSyncIncrement)
|
ASM_GLOBAL ASM_PFX(InternalSyncIncrement)
|
||||||
ASM_PFX(InternalSyncIncrement):
|
ASM_PFX(InternalSyncIncrement):
|
||||||
lock incl (%rcx)
|
lock incl (%rcx)
|
||||||
mov (%rcx), %eax
|
mov (%rcx), %eax
|
||||||
|
Loading…
x
Reference in New Issue
Block a user