From b6eeb280a512c1c0ba2ba4ee64839baf0a3895fe Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Wed, 4 Feb 2009 01:34:17 +0000 Subject: [PATCH] =?UTF-8?q?merge=2034700,=2034802,=2035517,=2035650=20from?= =?UTF-8?q?=20amd64=20branch=20NCI:=2034802/34802/35517:=20Create=20x64=20?= =?UTF-8?q?syscall=20stubs=20(Timo=20Kreuzer)=2035650=20Don't=20add=20stdc?= =?UTF-8?q?all=20decorations=20to=20amd64=20syscalls.(Samuel=20Serapi?= =?UTF-8?q?=C3=B3n)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=39369 --- reactos/tools/nci/ncitool.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/reactos/tools/nci/ncitool.c b/reactos/tools/nci/ncitool.c index 6a50fdf829b..d002a18c157 100644 --- a/reactos/tools/nci/ncitool.c +++ b/reactos/tools/nci/ncitool.c @@ -56,6 +56,11 @@ " call *(%%ecx)\n" \ " ret $0x%x\n\n" +#define UserModeStub_amd64 " movl $0x%x, %%eax\n" \ + " movq %%rcx, %%r10\n" \ + " syscall\n" \ + " ret $0x%x\n\n" + #define UserModeStub_ppc " stwu 1,-16(1)\n" \ " mflr 0\n\t" \ " stw 0,0(1)\n" \ @@ -97,6 +102,10 @@ " call _KiSystemService\n" \ " ret $0x%x\n\n" +#define KernelModeStub_amd64 " movl $0x%x, %%eax\n" \ + " call _KiSystemService\n" \ + " ret $0x%x\n\n" + /* For now, use the usermode stub. We'll optimize later */ #define KernelModeStub_ppc UserModeStub_ppc @@ -133,6 +142,8 @@ struct ncitool_data_t { struct ncitool_data_t ncitool_data[] = { { "i386", 4, KernelModeStub_x86, UserModeStub_x86, ".global _%s@%d\n", "_%s@%d:\n" }, + { "amd64", 4, KernelModeStub_amd64, UserModeStub_amd64, + ".global _%s\n", "_%s:\n" }, { "powerpc", 4, KernelModeStub_ppc, UserModeStub_ppc, "\t.globl %s\n", "%s:\n" }, { "mips", 4, KernelModeStub_mips, UserModeStub_mips,