<file>pixel.c</file>
<file>video.c</file>
</directory>
- <directory name="windows">
- <file>conversion.c</file>
- <file>peloader.c</file>
- <file>winldr.c</file>
- <file>wlmemory.c</file>
- <file>wlregistry.c</file>
- </directory>
+ <if property="ARCH" value="i386">
+ <directory name="windows">
+ <file>conversion.c</file>
+ <file>peloader.c</file>
+ <file>winldr.c</file>
+ <file>wlmemory.c</file>
+ <file>wlregistry.c</file>
+ </directory>
+ </if>
<file>freeldr.c</file>
<file>debug.c</file>
<file>version.c</file>
ULONG Spare1;
} KFLOATING_SAVE, *PKFLOATING_SAVE;
+static __inline
+ULONG
+DDKAPI
+KeGetCurrentProcessorNumber(VOID)
+{
+#if defined(__GNUC__)
+ ULONG ret;
+ __asm__ __volatile__ (
+ "movl %%fs:%c1, %0\n"
+ : "=r" (ret)
+ : "i" (FIELD_OFFSET(KPCR, Number))
+ );
+ return ret;
+#elif defined(_MSC_VER)
+#if _MSC_FULL_VER >= 13012035
+ return (ULONG)__readfsbyte(FIELD_OFFSET(KPCR, Number));
+#else
+ __asm { movzx eax, _PCR KPCR.Number }
+#endif
+#else
+#error Unknown compiler
+#endif
+}
+#endif /* _X86_ */
+
#define PAGE_SIZE 0x1000
#define PAGE_SHIFT 12L
KeGetCurrentIrql(
VOID);
-static __inline
-ULONG
-DDKAPI
-KeGetCurrentProcessorNumber(VOID)
-{
-#if defined(__GNUC__)
- ULONG ret;
- __asm__ __volatile__ (
- "movl %%fs:%c1, %0\n"
- : "=r" (ret)
- : "i" (FIELD_OFFSET(KPCR, Number))
- );
- return ret;
-#elif defined(_MSC_VER)
-#if _MSC_FULL_VER >= 13012035
- return (ULONG)__readfsbyte(FIELD_OFFSET(KPCR, Number));
-#else
- __asm { movzx eax, _PCR KPCR.Number }
-#endif
-#else
-#error Unknown compiler
-#endif
-}
-
#if !defined(__INTERLOCKED_DECLARED)
#define __INTERLOCKED_DECLARED
#define KeGetDcacheFillSize() 1L
-#endif /* _X86_ */
-
/*
IN ULONG Status);
ULONG
-__cdecl
+DDKCDECLAPI
DbgPrint(
IN PCCH Format,
IN ...);
ULONG
-__cdecl
+DDKCDECLAPI
DbgPrintEx(
IN ULONG ComponentId,
IN ULONG Level,
//
// Sanity checks for Paging Macros
//
-#ifndef __GNUC__
+#ifdef C_ASSERT
C_ASSERT(PAGE_SIZE == (1 << PAGE_SHIFT));
C_ASSERT(MM_ALLOCATION_GRANULARITY == (1 << MM_ALLOCATION_GRANULARITY_SHIFT));
C_ASSERT(MM_ALLOCATION_GRANULARITY &&
);
#ifndef NTOS_MODE_USER
+#if defined(_M_IX86)
FORCEINLINE
PTEB
NtCurrentTeb(VOID)
#endif
}
#endif
+#else
+struct _TEB * NtCurrentTeb(void);
+#endif
NTSYSCALLAPI
NTSTATUS
#endif
union
{
- HARDWARE_PTE_X86 PagedirectoryPte;
+ HARDWARE_PTE PagedirectoryPte;
ULONGLONG Filler;
};
ULONG Session;
HEAP_CREATE_ALIGN_16 | \
HEAP_CREATE_ENABLE_TRACING | \
HEAP_CREATE_ENABLE_EXECUTE)
-#ifndef __GNUC__
+#ifdef C_ASSERT
C_ASSERT(HEAP_CREATE_VALID_MASK == 0x0007F0FF);
#endif
void __cpu_features_init (void)
{
+#ifdef __i386__
unsigned int eax, ebx, ecx, edx;
/* Try to change the value of CPUID bit (bit 21) in EFLAGS.
If the bit can be toggled, CPUID is supported. */
__cpu_features |= _CRT_3DNOW;
if (edx & EDX_3DNOWP)
__cpu_features |= _CRT_3DNOWP;
-
- return;
+#endif
}
#ifdef TEST
/* Align the stack to 16 bytes for the sake of SSE ops in main
or in functions inlined into main. */
+#if defined(__i386__)
asm __volatile__ ("andl $-16, %%esp" : : : "%esp");
+#else
+#error Unsupported architecture
+#endif
/*
* Call the main function. If the user does not supply one
<module name="pseh" type="staticlibrary">
<define name="__USE_W32API" />
- <directory name="i386">
- <file>framebased.asm</file>
- <file>setjmp.asm</file>
- </directory>
+ <if property="ARCH" value="i386">
+ <directory name="i386">
+ <file>framebased.asm</file>
+ <file>setjmp.asm</file>
+ </directory>
+ </if>
<file>framebased.c</file>
</module>
if (RosSymInfo->Symbols == NULL || RosSymInfo->SymbolsCount == 0 ||
RosSymInfo->Strings == NULL || RosSymInfo->StringsLength == 0)
{
-__asm__("int $3\n");
DPRINT1("Uninitialized RosSymInfo\n");
return FALSE;
}
<file>rtlmem.s</file>
<file>pow_asm.s</file>
<file>res_asm.s</file>
- <file>seh.s</file>
+ <file>seh.s</file>
<file>sin_asm.s</file>
<file>sqrt_asm.s</file>
<file>tan_asm.s</file>
<file>tree.c</file>
</directory>
- <ifnot property="ARCH" value="i386">
- <file>memgen.c</file>
- <file>mem.c</file>
- </ifnot>
+ <ifnot property="ARCH" value="i386">
+ <file>memgen.c</file>
+ <file>mem.c</file>
+ </ifnot>
<file>access.c</file>
<file>acl.c</file>
{
FileNameWithoutPath = ModuleName->Buffer;
}
+ else
+ {
+ FileNameWithoutPath++;
+ }
/*
* Load the module