Debian Codegraph @

msvc/gmp/mpn/x86i/pentium4/sse2/submul_1.asm

raw
1
2 ; Copyright 2001, 2002 Free Software Foundation, Inc.
3 ;
4 ; This file is part of the GNU MP Library.
5 ;
6 ; The GNU MP Library is free software; you can redistribute it and/or
7 ; modify it under the terms of the GNU Lesser General Public License as
8 ; published by the Free Software Foundation; either version 2.1 of the
9 ; License, or (at your option) any later version.
10 ;
11 ; The GNU MP Library is distributed in the hope that it will be useful,
12 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 ; Lesser General Public License for more details.
15 ;
16 ; You should have received a copy of the GNU Lesser General Public
17 ; License along with the GNU MP Library; see the file COPYING.LIB. If
18 ; not, write to the Free Software Foundation, Inc., 59 Temple Place -
19 ; Suite 330, Boston, MA 02111-1307, USA.
20 ;
21 ; Translation of AT&T syntax code by Brian Gladman
22
23 %include "..\..\x86i.inc"
24
25 section .text
26
27 global ___gmpn_submul_1c
28 %ifdef DLL
29 export ___gmpn_submul_1c
30 %endif
31
32 align 16
33 ___gmpn_submul_1c:
34 movd mm1,[20+esp]
35 mov eax,[8+esp]
36 pcmpeqd mm0,mm0
37 movd mm7,[16+esp]
38 pcmpeqd mm6,mm6
39 mov edx,[4+esp]
40 psrlq mm0,32
41 mov ecx,[12+esp]
42 psllq mm6,32
43 psubq mm6,mm0
44 psubq mm0,mm1
45 oop1:
46 movd mm1,[eax]
47 lea eax,[4+eax]
48 movd mm2,[edx]
49 paddq mm2,mm6
50 pmuludq mm1,mm7
51 psubq mm2,mm1
52 paddq mm0,mm2
53 sub ecx,1
54 movd [edx],mm0
55 psrlq mm0,32
56 lea edx,[4+edx]
57 jnz oop1
58 movd eax,mm0
59 not eax
60 emms
61 ret
62
63 global ___gmpn_submul_1
64 %ifdef DLL
65 export ___gmpn_submul_1
66 %endif
67 align 16
68 ___gmpn_submul_1:
69
70 pxor mm1,mm1
71 mov eax,[8+esp]
72 pcmpeqd mm0,mm0
73 movd mm7,[16+esp]
74 pcmpeqd mm6,mm6
75 mov edx,[4+esp]
76 psrlq mm0,32
77 mov ecx,[12+esp]
78 psllq mm6,32
79 psubq mm6,mm0
80 psubq mm0,mm1
81 oop2:
82 movd mm1,[eax]
83 lea eax,[4+eax]
84 movd mm2,[edx]
85 paddq mm2,mm6
86 pmuludq mm1,mm7
87 psubq mm2,mm1
88 paddq mm0,mm2
89 sub ecx,1
90 movd [edx],mm0
91 psrlq mm0,32
92 lea edx,[4+edx]
93 jnz oop2
94 movd eax,mm0
95 not eax
96 emms
97 ret
98
99 end