mirror of
https://github.com/reactos/reactos.git
synced 2024-08-05 11:00:55 +00:00
[BOOTLIB][CRT]
- Fix GCC build svn path=/trunk/; revision=73688
This commit is contained in:
parent
28dad177a0
commit
0e90ca425c
|
@ -11,10 +11,10 @@
|
|||
#include <asm.inc>
|
||||
#include <ks386.inc>
|
||||
|
||||
EXTERN _GdtRegister:DWORD
|
||||
EXTERN _IdtRegister:DWORD
|
||||
EXTERN _BootAppGdtRegister:DWORD
|
||||
EXTERN _BootAppIdtRegister:DWORD
|
||||
EXTERN _GdtRegister:FWORD
|
||||
EXTERN _IdtRegister:FWORD
|
||||
EXTERN _BootAppGdtRegister:FWORD
|
||||
EXTERN _BootAppIdtRegister:FWORD
|
||||
EXTERN _BootApp32Stack:DWORD
|
||||
EXTERN _BootApp32EntryRoutine:DWORD
|
||||
EXTERN _BootApp32Parameters:DWORD
|
||||
|
@ -39,10 +39,10 @@ _Archx86TransferTo32BitApplicationAsm:
|
|||
mov ebx, esp
|
||||
|
||||
/* Save current GDT/IDT, then load new one */
|
||||
sgdt fword ptr _GdtRegister
|
||||
sidt fword ptr _IdtRegister
|
||||
lgdt fword ptr _BootAppGdtRegister
|
||||
lidt fword ptr _BootAppIdtRegister
|
||||
sgdt _GdtRegister
|
||||
sidt _IdtRegister
|
||||
lgdt _BootAppGdtRegister
|
||||
lidt _BootAppIdtRegister
|
||||
|
||||
/* Load the new stack */
|
||||
xor ebp, ebp
|
||||
|
@ -62,8 +62,8 @@ _Archx86TransferTo32BitApplicationAsm:
|
|||
mov esp, ebx
|
||||
|
||||
/* Restore old GDT/IDT */
|
||||
lgdt fword ptr _GdtRegister
|
||||
lidt fword ptr _IdtRegister
|
||||
lgdt _GdtRegister
|
||||
lidt _IdtRegister
|
||||
|
||||
/* Retore old segments */
|
||||
pop ds
|
||||
|
@ -76,6 +76,6 @@ _Archx86TransferTo32BitApplicationAsm:
|
|||
pop ebp
|
||||
|
||||
/* All done */
|
||||
retn
|
||||
ret
|
||||
|
||||
END
|
||||
|
|
|
@ -1815,6 +1815,11 @@ __INTRIN_INLINE void __sidt(void *Destination)
|
|||
__asm__ __volatile__("sidt %0" : : "m"(*(short*)Destination) : "memory");
|
||||
}
|
||||
|
||||
__INTRIN_INLINE void _sgdt(void *Destination)
|
||||
{
|
||||
__asm__ __volatile__("sgdt %0" : : "m"(*(short*)Destination) : "memory");
|
||||
}
|
||||
|
||||
/*** Misc operations ***/
|
||||
|
||||
__INTRIN_INLINE void _mm_pause(void)
|
||||
|
|
|
@ -342,6 +342,19 @@ void __forceinline __invlpg_fixed(void * Address)
|
|||
#pragma intrinsic(__wbinvd)
|
||||
#pragma intrinsic(__lidt)
|
||||
#pragma intrinsic(__sidt)
|
||||
#if (_MSC_VER >= 1800)
|
||||
#pragma intrinsic(_sgdt)
|
||||
#else
|
||||
__forceinline
|
||||
void _sgdt(void *Destination)
|
||||
{
|
||||
__asm
|
||||
{
|
||||
mov eax, Destination
|
||||
sgdt [eax]
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#pragma intrinsic(_mm_pause)
|
||||
#endif
|
||||
#if defined(_M_ARM)
|
||||
|
|
Loading…
Reference in a new issue