Debian Codegraph @

msvc/gmp/mpn/x86i/pentium4/sse2/sub_n.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 section .text
24
25 global ___gmpn_sub_nc
26 global ___gmpn_sub_n
27
28 %ifdef DLL
29 export ___gmpn_sub_nc
30 export ___gmpn_sub_n
31 %endif
32
33 align 8
34 ___gmpn_sub_nc:
35 movd mm0,[20+esp]
36 jmp start_nc
37
38 align 8
39 ___gmpn_sub_n:
40 pxor mm0,mm0
41
42 start_nc:
43 mov eax,[8+esp]
44 mov [8+esp],ebx
45 mov ebx,[12+esp]
46 mov edx,[4+esp]
47 mov ecx,[16+esp]
48
49 lea eax,[eax+ecx*4]
50 lea ebx,[ebx+ecx*4]
51 lea edx,[edx+ecx*4]
52 neg ecx
53
54 top:
55 movd mm1,[eax+ecx*4]
56 movd mm2,[ebx+ecx*4]
57 psubq mm1,mm2
58 psubq mm1,mm0
59 movd [edx+ecx*4],mm1
60 psrlq mm1,63
61 add ecx,1
62 jz done_mm1
63 movd mm0,[eax+ecx*4]
64 movd mm2,[ebx+ecx*4]
65 psubq mm0,mm2
66 psubq mm0,mm1
67 movd [edx+ecx*4],mm0
68 psrlq mm0,63
69 add ecx,1
70 jnz top
71 movd eax,mm0
72 mov ebx,[8+esp]
73 emms
74 ret
75
76 done_mm1:
77 movd eax,mm1
78 mov ebx,[8+esp]
79 emms
80 ret
81
82 end