Annotation of OpenXM_contrib/gmp/mpn/hppa/hppa2_0/sub_n.s, Revision 1.1.1.1
1.1 maekawa 1: ; HP-PA 2.0 32-bit __gmpn_sub_n -- Subtract two limb vectors of the same
2: ; length > 0 and store difference in a third limb vector.
3:
4: ; Copyright (C) 1997, 1998, 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: ; INPUT PARAMETERS
25: ; res_ptr gr26
26: ; s1_ptr gr25
27: ; s2_ptr gr24
28: ; size gr23
29:
30: ; This runs at 2 cycles/limb on PA8000.
31:
32: .code
33: .export __gmpn_sub_n
34: __gmpn_sub_n
35: .proc
36: .callinfo frame=0,no_calls
37: .entry
38:
39: sub %r0,%r23,%r22
40: zdep %r22,30,3,%r28 ; r28 = 2 * (-n & 7)
41: zdep %r22,29,3,%r22 ; r22 = 4 * (-n & 7)
42: sub %r25,%r22,%r25 ; offset s1_ptr
43: sub %r24,%r22,%r24 ; offset s2_ptr
44: blr %r28,%r0 ; branch into loop
45: sub %r26,%r22,%r26 ; offset res_ptr and set carry
46:
47: L$loop ldw 0(%r25),%r20
48: ldw 0(%r24),%r31
49: subb %r20,%r31,%r20
50: stw %r20,0(%r26)
51: L$7 ldw 4(%r25),%r21
52: ldw 4(%r24),%r19
53: subb %r21,%r19,%r21
54: stw %r21,4(%r26)
55: L$6 ldw 8(%r25),%r20
56: ldw 8(%r24),%r31
57: subb %r20,%r31,%r20
58: stw %r20,8(%r26)
59: L$5 ldw 12(%r25),%r21
60: ldw 12(%r24),%r19
61: subb %r21,%r19,%r21
62: stw %r21,12(%r26)
63: L$4 ldw 16(%r25),%r20
64: ldw 16(%r24),%r31
65: subb %r20,%r31,%r20
66: stw %r20,16(%r26)
67: L$3 ldw 20(%r25),%r21
68: ldw 20(%r24),%r19
69: subb %r21,%r19,%r21
70: stw %r21,20(%r26)
71: L$2 ldw 24(%r25),%r20
72: ldw 24(%r24),%r31
73: subb %r20,%r31,%r20
74: stw %r20,24(%r26)
75: L$1 ldw 28(%r25),%r21
76: ldo 32(%r25),%r25
77: ldw 28(%r24),%r19
78: subb %r21,%r19,%r21
79: stw %r21,28(%r26)
80: ldo 32(%r24),%r24
81: addib,> -8,%r23,L$loop
82: ldo 32(%r26),%r26
83:
84: addc %r0,%r0,%r28
85: bv (%r2)
86: .exit
87: subi 1,%r28,%r28
88: .procend
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>