ia64/xen-unstable

annotate xen/include/asm-x86/multicall.h @ 11756:eee52c100996

[XEN] Remove unused MULTICALL_arg6, and unnecessary use of STR() macro.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kfraser@localhost.localdomain
date Thu Oct 05 16:36:39 2006 +0100 (2006-10-05)
parents 833d05bdb4a4
children c2a82e026497
rev   line source
kaf24@3139 1 /******************************************************************************
kaf24@3139 2 * asm-x86/multicall.h
kaf24@3139 3 */
kaf24@3139 4
kaf24@3139 5 #ifndef __ASM_X86_MULTICALL_H__
kaf24@3139 6 #define __ASM_X86_MULTICALL_H__
kaf24@3139 7
kaf24@10370 8 #include <xen/errno.h>
kaf24@3276 9 #include <asm/asm_defns.h>
kaf24@3276 10
kaf24@3276 11 #ifdef __x86_64__
kaf24@3276 12
kaf24@10370 13 #define do_multicall_call(_call) \
kaf24@10370 14 do { \
kaf24@10370 15 __asm__ __volatile__ ( \
kaf24@10370 16 " movq "STR(MULTICALL_op)"(%0),%%rax; " \
kaf24@10370 17 " cmpq $("STR(NR_hypercalls)"),%%rax; " \
kaf24@10370 18 " jae 2f; " \
kfraser@11756 19 " leaq hypercall_table(%%rip),%%rdi; " \
kaf24@10370 20 " leaq (%%rdi,%%rax,8),%%rax; " \
kaf24@10370 21 " movq "STR(MULTICALL_arg0)"(%0),%%rdi; " \
kaf24@10370 22 " movq "STR(MULTICALL_arg1)"(%0),%%rsi; " \
kaf24@10370 23 " movq "STR(MULTICALL_arg2)"(%0),%%rdx; " \
kaf24@10370 24 " movq "STR(MULTICALL_arg3)"(%0),%%rcx; " \
kaf24@10370 25 " movq "STR(MULTICALL_arg4)"(%0),%%r8; " \
kaf24@10370 26 " callq *(%%rax); " \
kaf24@10370 27 "1: movq %%rax,"STR(MULTICALL_result)"(%0)\n" \
kaf24@10370 28 ".section .fixup,\"ax\"\n" \
kaf24@10370 29 "2: movq $-"STR(ENOSYS)",%%rax\n" \
kaf24@10370 30 " jmp 1b\n" \
kaf24@10370 31 ".previous\n" \
kaf24@10370 32 : : "b" (_call) \
kaf24@10370 33 /* all the caller-saves registers */ \
kaf24@10370 34 : "rax", "rcx", "rdx", "rsi", "rdi", \
kaf24@10370 35 "r8", "r9", "r10", "r11" ); \
kaf24@3716 36 } while ( 0 )
kaf24@3276 37
kaf24@3276 38 #else
kaf24@3139 39
kaf24@10370 40 #define do_multicall_call(_call) \
kaf24@10370 41 do { \
kaf24@10370 42 __asm__ __volatile__ ( \
kaf24@10370 43 " pushl "STR(MULTICALL_arg4)"(%0); " \
kaf24@10370 44 " pushl "STR(MULTICALL_arg3)"(%0); " \
kaf24@10370 45 " pushl "STR(MULTICALL_arg2)"(%0); " \
kaf24@10370 46 " pushl "STR(MULTICALL_arg1)"(%0); " \
kaf24@10370 47 " pushl "STR(MULTICALL_arg0)"(%0); " \
kaf24@10370 48 " movl "STR(MULTICALL_op)"(%0),%%eax; " \
kaf24@10370 49 " cmpl $("STR(NR_hypercalls)"),%%eax; " \
kaf24@10370 50 " jae 2f; " \
kaf24@10370 51 " call *hypercall_table(,%%eax,4); " \
kaf24@10370 52 "1: movl %%eax,"STR(MULTICALL_result)"(%0); " \
kaf24@10370 53 " addl $20,%%esp\n" \
kaf24@10370 54 ".section .fixup,\"ax\"\n" \
kaf24@10370 55 "2: movl $-"STR(ENOSYS)",%%eax\n" \
kaf24@10370 56 " jmp 1b\n" \
kaf24@10370 57 ".previous\n" \
kaf24@10370 58 : : "b" (_call) \
kaf24@10370 59 /* all the caller-saves registers */ \
kaf24@10370 60 : "eax", "ecx", "edx" ); \
kaf24@3139 61 } while ( 0 )
kaf24@3139 62
kaf24@3276 63 #endif
kaf24@3276 64
kaf24@3139 65 #endif /* __ASM_X86_MULTICALL_H__ */