make ncitool generate at least valid 64 bit assembly

svn path=/branches/ros-amd64-bringup/; revision=34802
This commit is contained in:
Timo Kreuzer
2008-07-26 01:17:03 +00:00
parent 3c9ae1448a
commit 0dfe50f093

View File

@@ -53,6 +53,11 @@
" 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" \
" mflr 0\n\t" \
" stw 0,0(1)\n" \
@@ -94,6 +99,13 @@
" 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"
/* For now, use the usermode stub. We'll optimize later */
#define KernelModeStub_ppc UserModeStub_ppc
@@ -130,7 +142,7 @@ 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_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" },