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.

svn path=/trunk/; revision=44625
This commit is contained in:
Daniel Reimer 2009-12-16 20:59:06 +00:00
parent 1c23c0f872
commit 702301aa40
4 changed files with 22 additions and 2 deletions

View file

@ -29,6 +29,8 @@
<compilerflag>-ftracer</compilerflag>
</if>
<compilerflag>-Wno-attributes</compilerflag>
<compilerflag>-U_UNICODE</compilerflag>
<compilerflag>-UUNICODE</compilerflag>
</group>

View file

@ -67,7 +67,7 @@ FldrCreateSystemKey(
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,

View file

@ -35,6 +35,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)
{
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);

View file

@ -1,6 +1,8 @@
#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