summaryrefslogtreecommitdiff
path: root/mpi/amd64/func_abi.h
blob: ce446744168fd1444642070fd9f710e4405e092c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifdef USE_MS_ABI
 /* Store registers and move four first input arguments from MS ABI to
  * SYSV ABI.  */
 #define FUNC_ENTRY() \
	pushq %rsi; \
	pushq %rdi; \
	movq %rdx, %rsi; \
	movq %rcx, %rdi; \
	movq %r8, %rdx; \
	movq %r9, %rcx;

 /* Restore registers.  */
 #define FUNC_EXIT() \
	popq %rdi; \
	popq %rsi;
#else
 #define FUNC_ENTRY() /**/
 #define FUNC_EXIT() /**/
#endif