~ubuntu-branches/ubuntu/quantal/gclcvs/quantal

« back to all changes in this revision

Viewing changes to gmp3/mpn/ns32k/add_n.s

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-06-24 15:13:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040624151346-xh0xaaktyyp7aorc
Tags: 2.7.0-26
C_GC_OFFSET is 2 on m68k-linux

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# ns32000 __gmpn_add_n -- Add two limb vectors of the same length > 0 and store
 
2
# sum in a third limb vector.
 
3
 
 
4
# Copyright 1992, 1994, 2000 Free Software Foundation, Inc.
 
5
 
 
6
# This file is part of the GNU MP Library.
 
7
 
 
8
# The GNU MP Library is free software; you can redistribute it and/or modify
 
9
# it under the terms of the GNU Lesser General Public License as published by
 
10
# the Free Software Foundation; either version 2.1 of the License, or (at your
 
11
# option) any later version.
 
12
 
 
13
# The GNU MP Library is distributed in the hope that it will be useful, but
 
14
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 
15
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 
16
# License for more details.
 
17
 
 
18
# You should have received a copy of the GNU Lesser General Public License
 
19
# along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
 
20
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 
21
# MA 02111-1307, USA.
 
22
 
 
23
 
 
24
        .align 1
 
25
.globl ___gmpn_add_n
 
26
___gmpn_add_n:
 
27
        save    [r3,r4,r5]
 
28
        negd    28(sp),r3
 
29
        movd    r3,r0
 
30
        lshd    2,r0
 
31
        movd    24(sp),r4
 
32
        subd    r0,r4                   # r4 -> to end of S2
 
33
        movd    20(sp),r5
 
34
        subd    r0,r5                   # r5 -> to end of S1
 
35
        movd    16(sp),r2
 
36
        subd    r0,r2                   # r2 -> to end of RES
 
37
        subd    r0,r0                   # cy = 0
 
38
 
 
39
Loop:   movd    r5[r3:d],r0
 
40
        addcd   r4[r3:d],r0
 
41
        movd    r0,r2[r3:d]
 
42
        acbd    1,r3,Loop
 
43
 
 
44
        scsd    r0                      # r0 = cy.
 
45
        restore [r5,r4,r3]
 
46
        ret     0