Author: hpoussin
Date: Tue Mar 27 02:56:22 2007
New Revision: 26181
URL:
http://svn.reactos.org/svn/reactos?rev=26181&view=rev
Log:
- Move NCI generated files to arch-specific directories
- Replace ncitool by the one from powerpc branch, which supports code generation for
multiple architectures
Added:
trunk/reactos/tools/nci/ncitool.c
- copied, changed from r26180, branches/powerpc/reactos/tools/nci/ncitool.c
Modified:
trunk/reactos/dll/ntdll/ntdll.rbuild
trunk/reactos/dll/win32/gdi32/gdi32.rbuild
trunk/reactos/dll/win32/user32/user32.rbuild
trunk/reactos/ntoskrnl/ntoskrnl.rbuild
trunk/reactos/tools/nci/nci.mak
Modified: trunk/reactos/dll/ntdll/ntdll.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ntdll.rbuild?rev…
==============================================================================
--- trunk/reactos/dll/ntdll/ntdll.rbuild (original)
+++ trunk/reactos/dll/ntdll/ntdll.rbuild Tue Mar 27 02:56:22 2007
@@ -47,5 +47,19 @@
<directory name="inc">
<pch>ntdll.h</pch>
</directory>
- <file>napi.S</file>
+ <if property="ARCH" value="i386">
+ <directory name="i386">
+ <file>napi.S</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="powerpc">
+ <directory name="powerpc">
+ <file>napi.S</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="mips">
+ <directory name="mips">
+ <file>napi.S</file>
+ </directory>
+ </if>
</module>
Modified: trunk/reactos/dll/win32/gdi32/gdi32.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/gdi32.rbui…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/gdi32.rbuild (original)
+++ trunk/reactos/dll/win32/gdi32/gdi32.rbuild Tue Mar 27 02:56:22 2007
@@ -22,8 +22,22 @@
<file>stubs.c</file>
<file>stubsa.c</file>
<file>stubsw.c</file>
- <file>win32k.S</file>
<file>wingl.c</file>
+ <if property="ARCH" value="i386">
+ <directory name="i386">
+ <file>win32k.S</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="powerpc">
+ <directory name="powerpc">
+ <file>win32k.S</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="mips">
+ <directory name="mips">
+ <file>win32k.S</file>
+ </directory>
+ </if>
</directory>
<directory name="objects">
<file>bitmap.c</file>
Modified: trunk/reactos/dll/win32/user32/user32.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/user32.rb…
==============================================================================
--- trunk/reactos/dll/win32/user32/user32.rbuild (original)
+++ trunk/reactos/dll/win32/user32/user32.rbuild Tue Mar 27 02:56:22 2007
@@ -43,10 +43,24 @@
<file>strpool.c</file>
<file>stubs.c</file>
<file>timer.c</file>
- <file>win32k.S</file>
<file>winhelp.c</file>
<file>winsta.c</file>
<file>wsprintf.c</file>
+ <if property="ARCH" value="i386">
+ <directory name="i386">
+ <file>win32k.S</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="powerpc">
+ <directory name="powerpc">
+ <file>win32k.S</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="mips">
+ <directory name="mips">
+ <file>win32k.S</file>
+ </directory>
+ </if>
</directory>
<directory name="windows">
<file>accel.c</file>
Modified: trunk/reactos/ntoskrnl/ntoskrnl.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.rbuild?r…
==============================================================================
--- trunk/reactos/ntoskrnl/ntoskrnl.rbuild (original)
+++ trunk/reactos/ntoskrnl/ntoskrnl.rbuild Tue Mar 27 02:56:22 2007
@@ -103,6 +103,17 @@
<file>interlck_asm.S</file>
<file>fastinterlck_asm.S</file>
<file>ioport.S</file>
+ <file>zw.S</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="powerpc">
+ <directory name="powerpc">
+ <file>zw.S</file>
+ </directory>
+ </if>
+ <if property="ARCH" value="mips">
+ <directory name="mips">
+ <file>zw.S</file>
</directory>
</if>
<file>atom.c</file>
@@ -132,7 +143,6 @@
<file>win32k.c</file>
<file>work.c</file>
<file>zone.c</file>
- <file>zw.S</file>
</directory>
<directory name="fsrtl">
<file>dbcsname.c</file>
Modified: trunk/reactos/tools/nci/nci.mak
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/nci/nci.mak?rev=2618…
==============================================================================
--- trunk/reactos/tools/nci/nci.mak (original)
+++ trunk/reactos/tools/nci/nci.mak Tue Mar 27 02:56:22 2007
@@ -44,14 +44,14 @@
# WIN32K.SYS
WIN32K_SVC_DB = $(NCI_BASE_)w32ksvc.db
WIN32K_SERVICE_TABLE = subsystems$(SEP)win32$(SEP)win32k$(SEP)include$(SEP)napi.h
-WIN32K_GDI_STUBS = dll$(SEP)win32$(SEP)gdi32$(SEP)misc$(SEP)win32k.S
-WIN32K_USER_STUBS = dll$(SEP)win32$(SEP)user32$(SEP)misc$(SEP)win32k.S
+WIN32K_GDI_STUBS = dll$(SEP)win32$(SEP)gdi32$(SEP)misc$(SEP)$(ARCH)$(SEP)win32k.S
+WIN32K_USER_STUBS = dll$(SEP)win32$(SEP)user32$(SEP)misc$(SEP)$(ARCH)$(SEP)win32k.S
# NTOSKRNL.EXE
KERNEL_SVC_DB = $(NCI_BASE_)sysfuncs.lst
KERNEL_SERVICE_TABLE = ntoskrnl$(SEP)include$(SEP)internal$(SEP)napi.h
-NTDLL_STUBS = dll$(SEP)ntdll$(SEP)napi.S
-KERNEL_STUBS = ntoskrnl$(SEP)ex$(SEP)zw.S
+NTDLL_STUBS = dll$(SEP)ntdll$(SEP)$(ARCH)$(SEP)napi.S
+KERNEL_STUBS = ntoskrnl$(SEP)ex$(SEP)$(ARCH)$(SEP)zw.S
NCI_SERVICE_FILES = \
$(KERNEL_SERVICE_TABLE) \
@@ -63,7 +63,11 @@
$(NCI_SERVICE_FILES): $(NCI_TARGET) $(KERNEL_SVC_DB) $(WIN32K_SVC_DB)
$(ECHO_NCI)
- $(Q)$(NCI_TARGET) \
+ ${mkdir} dll$(SEP)ntdll$(SEP)$(ARCH) 2>$(NUL)
+ ${mkdir} ntoskrnl$(SEP)ex$(SEP)$(ARCH) 2>$(NUL)
+ ${mkdir} dll$(SEP)win32$(SEP)gdi32$(SEP)misc$(SEP)$(ARCH) 2>$(NUL)
+ ${mkdir} dll$(SEP)win32$(SEP)user32$(SEP)misc$(SEP)$(ARCH) 2>$(NUL)
+ $(Q)$(NCI_TARGET) -arch $(ARCH) \
$(KERNEL_SVC_DB) \
$(WIN32K_SVC_DB) \
$(KERNEL_SERVICE_TABLE) \
Copied: trunk/reactos/tools/nci/ncitool.c (from r26180,
branches/powerpc/reactos/tools/nci/ncitool.c)
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/nci/ncitool.c?p2=tru…
==============================================================================
--- branches/powerpc/reactos/tools/nci/ncitool.c (original)
+++ trunk/reactos/tools/nci/ncitool.c Tue Mar 27 02:56:22 2007
@@ -51,7 +51,7 @@
#if defined(__GNUC__)
#define UserModeStub_x86 " movl $0x%x, %%eax\n" \
" movl $KUSER_SHARED_SYSCALL, %%ecx\n" \
- " call *%%ecx\n" \
+ " call *(%%ecx)\n" \
" ret $0x%x\n\n"
#define UserModeStub_ppc " mflr 0\n" \
@@ -112,11 +112,11 @@
};
struct ncitool_data_t ncitool_data[] = {
- { "x86", 4, KernelModeStub_x86, UserModeStub_x86,
+ { "i386", 4, KernelModeStub_x86, UserModeStub_x86,
".global _%s@%d\n", "_%s@%d:\n" },
{ "powerpc", 4, KernelModeStub_ppc, UserModeStub_ppc,
"\t.globl %s\n", "%s:\n" },
- { 0 }
+ { 0, }
};
int arch_sel = 0;
#define ARGS_TO_BYTES(x) 4*(ncitool_data[arch_sel].args_to_bytes)
@@ -525,8 +525,9 @@
" zw.S NTOSKRNL Zw stubs\n"
" win32k.S GDI32 stubs\n"
" win32k.S USER32 stubs\n"
- " -arch is optional, default is x86\n",
- argv0
+ " -arch is optional, default is %s\n",
+ argv0,
+ ncitool_data[0].arch
);
}
@@ -538,14 +539,15 @@
/* Catch architecture argument */
if (argc > 3 && !strcmp(argv[1],"-arch")) {
- int i;
- for( i = 0; ncitool_data[arch_sel].arch && strcmp(argv[2],ncitool_data[i].arch);
i++ );
- if (!ncitool_data[arch_sel].arch) {
- usage(argv[0]);
- return 1;
- }
- arch_sel = i;
- ArgOffset = 3;
+ for( arch_sel = 0; ncitool_data[arch_sel].arch; arch_sel++ )
+ if (strcmp(argv[2],ncitool_data[arch_sel].arch) == 0)
+ break;
+ if (!ncitool_data[arch_sel].arch) {
+ printf("Invalid arch '%s'\n", argv[2]);
+ usage(argv[0]);
+ return 1;
+ }
+ ArgOffset = 3;
}
/* Make sure all arguments all there */
if (argc != Arguments + ArgOffset) {
@@ -565,7 +567,6 @@
perror(argv[FileNumber + ArgOffset]);
return (1);
}
-
}
/* Write the File Headers */