diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2011-11-29 21:59:39 +0100 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2011-11-29 21:59:39 +0100 |
commit | 23df1f61b5f28b4bf4953acd2b069d1f09d6450f (patch) | |
tree | 90c979b4081ce64d927d15f630aff84e245652ef /mpn/x86_64/mod_1_4.asm | |
parent | cdaf5d1a1e737e7db82e6509571468fa660c043b (diff) | |
download | gmp-23df1f61b5f28b4bf4953acd2b069d1f09d6450f.tar.gz |
Add DOS64 ABI support to most files.
Diffstat (limited to 'mpn/x86_64/mod_1_4.asm')
-rw-r--r-- | mpn/x86_64/mod_1_4.asm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mpn/x86_64/mod_1_4.asm b/mpn/x86_64/mod_1_4.asm index d99080d7f..3068e3def 100644 --- a/mpn/x86_64/mod_1_4.asm +++ b/mpn/x86_64/mod_1_4.asm @@ -2,7 +2,7 @@ dnl AMD64 mpn_mod_1s_4p dnl Contributed to the GNU project by Torbjorn Granlund. -dnl Copyright 2009, 2010 Free Software Foundation, Inc. +dnl Copyright 2009, 2010, 2011 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. @@ -30,17 +30,22 @@ C Intel corei 4 C Intel atom 23 C VIA nano 4.75 +C ABI_SUPPORT(DOS64) +C ABI_SUPPORT(ELF64) + ASM_START() TEXT ALIGN(16) PROLOGUE(mpn_mod_1s_4p) + DOS64_ENTRY(4) + push %r15 push %r14 push %r13 push %r12 push %rbp push %rbx - mov %rdx, -16(%rsp) + mov %rdx, %r15 mov %rcx, %r14 mov 16(%rcx), %r11 C B1modb mov 24(%rcx), %rbx C B2modb @@ -135,7 +140,7 @@ L(end): mov 8(%r14), R32(%rsi) or %rdx, %rdi mov %rdi, %rax mulq (%r14) - mov -16(%rsp), %rbx + mov %r15, %rbx mov %rax, %r9 sal R8(%rcx), %r8 inc %rdi @@ -155,11 +160,13 @@ L(end): mov 8(%r14), R32(%rsi) pop %r12 pop %r13 pop %r14 + DOS64_EXIT() ret EPILOGUE() ALIGN(16) PROLOGUE(mpn_mod_1s_4p_cps) + DOS64_ENTRY(2) push %rbp bsr %rsi, %rcx push %rbx @@ -244,5 +251,6 @@ ifdef(`SHLD_SLOW',` pop %r12 pop %rbx pop %rbp + DOS64_EXIT() ret EPILOGUE() |