|
Packit |
6c4009 |
;! HP-PA __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
|
|
Packit |
6c4009 |
;! store difference in a third limb vector.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
;! Copyright (C) 1992-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
;! This file is part of the GNU MP Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
;! The GNU MP Library is free software; you can redistribute it and/or modify
|
|
Packit |
6c4009 |
;! it under the terms of the GNU Lesser General Public License as published by
|
|
Packit |
6c4009 |
;! the Free Software Foundation; either version 2.1 of the License, or (at your
|
|
Packit |
6c4009 |
;! option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
;! The GNU MP Library is distributed in the hope that it will be useful, but
|
|
Packit |
6c4009 |
;! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
Packit |
6c4009 |
;! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
|
Packit |
6c4009 |
;! License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
;! You should have received a copy of the GNU Lesser General Public License
|
|
Packit |
6c4009 |
;! along with the GNU MP Library. If not, see
|
|
Packit |
6c4009 |
;! <http://www.gnu.org/licenses/>.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
;! INPUT PARAMETERS
|
|
Packit |
6c4009 |
;! res_ptr gr26
|
|
Packit |
6c4009 |
;! s1_ptr gr25
|
|
Packit |
6c4009 |
;! s2_ptr gr24
|
|
Packit |
6c4009 |
;! size gr23
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
;! One might want to unroll this as for other processors, but it turns
|
|
Packit |
6c4009 |
;! out that the data cache contention after a store makes such
|
|
Packit |
6c4009 |
;! unrolling useless. We can't come under 5 cycles/limb anyway.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
.text
|
|
Packit |
6c4009 |
.export __mpn_sub_n
|
|
Packit |
6c4009 |
__mpn_sub_n:
|
|
Packit |
6c4009 |
.proc
|
|
Packit |
6c4009 |
.callinfo frame=0,no_calls
|
|
Packit |
6c4009 |
.entry
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
ldws,ma 4(%r25),%r21
|
|
Packit |
6c4009 |
ldws,ma 4(%r24),%r20
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
addib,= -1,%r23,L$end ;! check for (SIZE == 1)
|
|
Packit |
6c4009 |
sub %r21,%r20,%r28 ;! subtract first limbs ignoring cy
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
L$loop: ldws,ma 4(%r25),%r21
|
|
Packit |
6c4009 |
ldws,ma 4(%r24),%r20
|
|
Packit |
6c4009 |
stws,ma %r28,4(%r26)
|
|
Packit |
6c4009 |
addib,<> -1,%r23,L$loop
|
|
Packit |
6c4009 |
subb %r21,%r20,%r28
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
L$end: stws %r28,0(%r26)
|
|
Packit |
6c4009 |
addc %r0,%r0,%r28
|
|
Packit |
6c4009 |
bv 0(%r2)
|
|
Packit |
6c4009 |
subi 1,%r28,%r28
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
.exit
|
|
Packit |
6c4009 |
.procend
|