Author: tkreuzer
Date: Fri Jul 25 20:17:03 2008
New Revision: 34802
URL:
http://svn.reactos.org/svn/reactos?rev=34802&view=rev
Log:
make ncitool generate at least valid 64 bit assembly
Modified:
branches/ros-amd64-bringup/reactos/tools/nci/ncitool.c
Modified: branches/ros-amd64-bringup/reactos/tools/nci/ncitool.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
==============================================================================
--- branches/ros-amd64-bringup/reactos/tools/nci/ncitool.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/tools/nci/ncitool.c [iso-8859-1] Fri Jul 25
20:17:03 2008
@@ -51,6 +51,11 @@
#define UserModeStub_x86 " movl $0x%x, %%eax\n" \
" movl $KUSER_SHARED_SYSCALL, %%ecx\n" \
" call *(%%ecx)\n" \
+ " ret $0x%x\n\n"
+
+#define UserModeStub_amd64 " movq $0x%x, %%rax\n" \
+ " movq $KUSER_SHARED_SYSCALL, %%rcx\n" \
+ " call *(%%rcx)\n" \
" ret $0x%x\n\n"
#define UserModeStub_ppc " stwu 1,-16(1)\n" \
@@ -91,6 +96,13 @@
" leal 4(%%esp), %%edx\n" \
" pushfl\n" \
" pushl $KGDT_R0_CODE\n" \
+ " call _KiSystemService\n" \
+ " ret $0x%x\n\n"
+
+#define KernelModeStub_amd64 " movq $0x%x, %%rax\n" \
+ " leaq 4(%%rsp), %%rdx\n" \
+ " pushfq\n" \
+ " pushq $KGDT_R0_CODE\n" \
" call _KiSystemService\n" \
" ret $0x%x\n\n"
@@ -130,7 +142,7 @@
struct ncitool_data_t ncitool_data[] = {
{ "i386", 4, KernelModeStub_x86, UserModeStub_x86,
".global _%s@%d\n", "_%s@%d:\n" },
- { "amd64", 4, KernelModeStub_x86, UserModeStub_x86,
+ { "amd64", 4, KernelModeStub_amd64, UserModeStub_amd64,
".global _%s@%d\n", "_%s@%d:\n" },
{ "powerpc", 4, KernelModeStub_ppc, UserModeStub_ppc,
"\t.globl %s\n", "%s:\n" },