github.com/aergoio/aergo@v1.3.1/libtool/src/gmp-6.1.2/mpn/x86_64/bobcat/copyd.asm (about) 1 dnl AMD64 mpn_copyd optimised for AMD bobcat. 2 3 dnl Copyright 2003, 2005, 2007, 2011, 2012 Free Software Foundation, Inc. 4 5 dnl This file is part of the GNU MP Library. 6 dnl 7 dnl The GNU MP Library is free software; you can redistribute it and/or modify 8 dnl it under the terms of either: 9 dnl 10 dnl * the GNU Lesser General Public License as published by the Free 11 dnl Software Foundation; either version 3 of the License, or (at your 12 dnl option) any later version. 13 dnl 14 dnl or 15 dnl 16 dnl * the GNU General Public License as published by the Free Software 17 dnl Foundation; either version 2 of the License, or (at your option) any 18 dnl later version. 19 dnl 20 dnl or both in parallel, as here. 21 dnl 22 dnl The GNU MP Library is distributed in the hope that it will be useful, but 23 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 24 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 25 dnl for more details. 26 dnl 27 dnl You should have received copies of the GNU General Public License and the 28 dnl GNU Lesser General Public License along with the GNU MP Library. If not, 29 dnl see https://www.gnu.org/licenses/. 30 31 include(`../config.m4') 32 33 C cycles/limb 34 C AMD K8,K9 1 35 C AMD K10 1-2 (alignment fluctuations) 36 C AMD bd1 ? 37 C AMD bobcat 1.5 38 C Intel P4 2.8 39 C Intel core2 1 40 C Intel NHM 1-1.25 41 C Intel SBR 1 42 C Intel atom 2.87 43 C VIA nano 2 44 45 C INPUT PARAMETERS 46 C rp rdi 47 C up rsi 48 C n rdx 49 50 define(`rp',`%rdi') 51 define(`up',`%rsi') 52 define(`n',`%rdx') 53 54 ABI_SUPPORT(DOS64) 55 ABI_SUPPORT(STD64) 56 57 ASM_START() 58 TEXT 59 ALIGN(16) 60 PROLOGUE(mpn_copyd) 61 FUNC_ENTRY(3) 62 sub $4, n 63 jl L(end) 64 ALIGN(16) 65 L(top): mov 24(up,n,8), %r8 66 mov %r8, 24(rp,n,8) 67 mov 16(up,n,8), %r8 68 mov %r8, 16(rp,n,8) 69 mov 8(up,n,8), %r8 70 mov %r8, 8(rp,n,8) 71 mov (up,n,8), %r8 72 mov %r8, (rp,n,8) 73 L(ent): sub $4, n 74 jge L(top) 75 76 L(end): cmp $-4, R32(n) 77 jz L(ret) 78 mov 24(up,n,8), %r8 79 mov %r8, 24(rp,n,8) 80 cmp $-3, R32(n) 81 jz L(ret) 82 mov 16(up,n,8), %r8 83 mov %r8, 16(rp,n,8) 84 cmp $-2, R32(n) 85 jz L(ret) 86 mov 8(up,n,8), %r8 87 mov %r8, 8(rp,n,8) 88 89 L(ret): FUNC_EXIT() 90 ret 91 EPILOGUE()