Author: dreimer
Date: Wed Dec 16 21:59:06 2009
New Revision: 44625
URL:
http://svn.reactos.org/svn/reactos?rev=44625&view=rev
Log:
Some build fixes for ReactOS ARM. Credits go to Alex Ionescu and Timo Kreuzer while I just
tried to keep up. :-P
- Undefine Unicode which is defined by default in cegcc.
- Add a missing include in ke.h
- Implement _CountLeadingZeros, _CountTrailingZeros, _BitScanForward for ARM.
Modified:
trunk/reactos/ReactOS-arm.rbuild
trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h
trunk/reactos/include/crt/mingw32/intrin_arm.h
trunk/reactos/ntoskrnl/include/internal/arm/ke.h
Modified: trunk/reactos/ReactOS-arm.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ReactOS-arm.rbuild?rev=446…
==============================================================================
--- trunk/reactos/ReactOS-arm.rbuild [iso-8859-1] (original)
+++ trunk/reactos/ReactOS-arm.rbuild [iso-8859-1] Wed Dec 16 21:59:06 2009
@@ -29,6 +29,8 @@
<compilerflag>-ftracer</compilerflag>
</if>
<compilerflag>-Wno-attributes</compilerflag>
+ <compilerflag>-U_UNICODE</compilerflag>
+ <compilerflag>-UUNICODE</compilerflag>
</group>
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h [iso-8859-1]
(original)
+++ trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h [iso-8859-1] Wed Dec 16
21:59:06 2009
@@ -67,7 +67,7 @@
VOID
NTAPI
FldrCreateComponentKey(
- IN PCONFIGURATION_COMPONENT_DATA SystemKey,,
+ IN PCONFIGURATION_COMPONENT_DATA SystemKey,
IN CONFIGURATION_CLASS Class,
IN CONFIGURATION_TYPE Type,
IN IDENTIFIER_FLAG Flags,
Modified: trunk/reactos/include/crt/mingw32/intrin_arm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/mingw32/intrin…
==============================================================================
--- trunk/reactos/include/crt/mingw32/intrin_arm.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/mingw32/intrin_arm.h [iso-8859-1] Wed Dec 16 21:59:06 2009
@@ -34,6 +34,22 @@
#define _ReturnAddress() (__builtin_return_address(0))
#define _ReadWriteBarrier() __sync_synchronize()
+
+__INTRIN_INLINE unsigned _CountLeadingZeros(long Mask)
+{
+ return Mask ? __builtin_clz(Mask) : 32;
+}
+
+__INTRIN_INLINE unsigned _CountTrailingZeros(long Mask)
+{
+ return Mask ? __builtin_ctz(Mask) : 32;
+}
+
+__INTRIN_INLINE unsigned char _BitScanForward(unsigned long * const Index, const unsigned
long Mask)
+{
+ *Index = __builtin_ctz(Mask);
+ return Mask ? 1 : 0;
+}
__INTRIN_INLINE char _InterlockedCompareExchange8(volatile char * const Destination,
const char Exchange, const char Comperand)
{
Modified: trunk/reactos/ntoskrnl/include/internal/arm/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/arm/ke.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/arm/ke.h [iso-8859-1] Wed Dec 16 21:59:06
2009
@@ -1,5 +1,7 @@
#ifndef __NTOSKRNL_INCLUDE_INTERNAL_ARM_KE_H
#define __NTOSKRNL_INCLUDE_INTERNAL_ARM_KE_H
+
+#include "intrin_i.h"
//
//Lockdown TLB entries
@@ -38,7 +40,7 @@
// Returns the Interrupt State from a Trap Frame.
// ON = TRUE, OFF = FALSE
//
-//#define KeGetTrapFrameInterruptState(TrapFrame) \
+//#define KeGetTrapFrameInterruptState(TrapFrame)
//
// Invalidates the TLB entry for a specified address