diff options
Diffstat (limited to 'mpi/amd64/func_abi.h')
-rw-r--r-- | mpi/amd64/func_abi.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mpi/amd64/func_abi.h b/mpi/amd64/func_abi.h new file mode 100644 index 00000000..ce446744 --- /dev/null +++ b/mpi/amd64/func_abi.h @@ -0,0 +1,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 |