Author: tfaber
Date: Sat Feb 4 23:50:32 2017
New Revision: 73688
URL:
http://svn.reactos.org/svn/reactos?rev=73688&view=rev
Log:
[BOOTLIB][CRT]
- Fix GCC build
Modified:
trunk/reactos/boot/environ/lib/arch/i386/transfer.s
trunk/reactos/sdk/include/crt/mingw32/intrin_x86.h
trunk/reactos/sdk/include/crt/msc/intrin.h
Modified: trunk/reactos/boot/environ/lib/arch/i386/transfer.s
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/arch/i386…
==============================================================================
--- trunk/reactos/boot/environ/lib/arch/i386/transfer.s [iso-8859-1] (original)
+++ trunk/reactos/boot/environ/lib/arch/i386/transfer.s [iso-8859-1] Sat Feb 4 23:50:32
2017
@@ -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 @@
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 @@
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 @@
pop ebp
/* All done */
- retn
+ ret
END
Modified: trunk/reactos/sdk/include/crt/mingw32/intrin_x86.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/crt/mingw32/in…
==============================================================================
--- trunk/reactos/sdk/include/crt/mingw32/intrin_x86.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/crt/mingw32/intrin_x86.h [iso-8859-1] Sat Feb 4 23:50:32
2017
@@ -1815,6 +1815,11 @@
__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)
Modified: trunk/reactos/sdk/include/crt/msc/intrin.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/crt/msc/intrin…
==============================================================================
--- trunk/reactos/sdk/include/crt/msc/intrin.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/crt/msc/intrin.h [iso-8859-1] Sat Feb 4 23:50:32 2017
@@ -342,6 +342,19 @@
#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)