~ubuntu-branches/ubuntu/intrepid/ecl/intrepid

« back to all changes in this revision

Viewing changes to msvc/gmp/mpn/x86i/pentium4/sse2/mul_1.asm

  • Committer: Bazaar Package Importer
  • Author(s): Peter Van Eynde
  • Date: 2006-05-17 02:46:26 UTC
  • Revision ID: james.westby@ubuntu.com-20060517024626-lljr08ftv9g9vefl
Tags: upstream-0.9h-20060510
ImportĀ upstreamĀ versionĀ 0.9h-20060510

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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_mul_1
 
26
        global  ___gmpn_mul_1c
 
27
 
 
28
%ifdef  DLL
 
29
        export  ___gmpn_mul_1
 
30
        export  ___gmpn_mul_1c
 
31
%endif
 
32
 
 
33
        align   16      
 
34
___gmpn_mul_1c: 
 
35
    movd    mm0,[20+esp]
 
36
    jmp     start_1c
 
37
 
 
38
        align   16      
 
39
___gmpn_mul_1: 
 
40
    pxor    mm0,mm0
 
41
 
 
42
start_1c: 
 
43
    mov     eax,[8+esp]
 
44
    movd    mm7,[16+esp]
 
45
    mov     edx,[4+esp]
 
46
    mov     ecx,[12+esp]
 
47
 
 
48
top: 
 
49
    movd    mm1,[eax]
 
50
    add     eax,4
 
51
        pmuludq mm1,mm7
 
52
        paddq   mm0,mm1
 
53
    movd    [edx],mm0
 
54
    add     edx,4
 
55
    psrlq   mm0,32
 
56
    sub     ecx,1
 
57
    jnz     top
 
58
    movd    eax,mm0
 
59
    emms
 
60
    ret
 
61
 
 
62
        end