1 dnl AMD64 mpn_sublsh1_n -- rp[] = up[] - (vp[] << 1)
3 dnl Copyright 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
5 dnl This file is part of the GNU MP Library.
7 dnl The GNU MP Library is free software; you can redistribute it and/or modify
8 dnl it under the terms of the GNU Lesser General Public License as published
9 dnl by the Free Software Foundation; either version 3 of the License, or (at
10 dnl your option) any later version.
12 dnl The GNU MP Library is distributed in the hope that it will be useful, but
13 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 dnl License for more details.
17 dnl You should have received a copy of the GNU Lesser General Public License
18 dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
20 include(`../config.m4')
32 C Sometimes speed degenerates, supposedly related to that some operand
33 C alignments cause cache conflicts.
35 C The speed is limited by decoding/issue bandwidth. There are 26 instructions
36 C in the loop, which corresponds to 26/3/4 = 2.167 c/l.
47 PROLOGUE(mpn_sublsh1_n)
57 xor R32(%rbp), R32(%rbp)
69 sbb R32(%rax), R32(%rax) C save scy
79 sbb R32(%rbp), R32(%rbp) C save acy
86 sbb R32(%rax), R32(%rax) C save scy
93 sbb R32(%rbp), R32(%rbp) C save acy
98 sbb R32(%rax), R32(%rax) C save scy
102 sbb R32(%rbp), R32(%rbp) C save acy
107 L(top): add R32(%rax), R32(%rax) C restore scy
118 sbb R32(%rax), R32(%rax) C save scy
119 add R32(%rbp), R32(%rbp) C restore acy
134 sbb R32(%rbp), R32(%rbp) C save acy
138 L(end): add R32(%rbp), R32(%rax)