1 ! SPARC v9 64-bit VIS3 __mpn_submul_1 -- Multiply a limb vector with a
2 ! limb and subtract the result from a second limb vector.
4 ! Copyright (C) 2013-2015 Free Software Foundation, Inc.
5 ! This file is part of the GNU C Library.
6 ! Contributed by David S. Miller <davem@davemloft.net>
8 ! The GNU C Library is free software; you can redistribute it and/or
9 ! modify it under the terms of the GNU Lesser General Public
10 ! License as published by the Free Software Foundation; either
11 ! version 2.1 of the License, or (at your option) any later version.
13 ! The GNU C Library is distributed in the hope that it will be useful,
14 ! but WITHOUT ANY WARRANTY; without even the implied warranty of
15 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 ! Lesser General Public License for more details.
18 ! You should have received a copy of the GNU Lesser General Public
19 ! License along with the GNU C Library; if not, see
20 ! <http://www.gnu.org/licenses/>.
38 .register %g2,#scratch
39 .register %g3,#scratch
40 ENTRY(__mpn_submul_1_vis3)
47 ldx [s1_ptr + 0x00], tmp1
48 ldx [res_ptr + 0x00], tmp3
49 ldx [s1_ptr + 0x08], tmp2
50 ldx [res_ptr + 0x08], tmp4
51 mulx tmp1, s2_limb, tmp5
52 add s1_ptr, 0x10, s1_ptr
53 umulxhi tmp1, s2_limb, tmp6
54 add res_ptr, 0x10, res_ptr
55 mulx tmp2, s2_limb, tmp7
57 umulxhi tmp2, s2_limb, tmp8
58 addcc carry, tmp5, tmp5
59 addxc %g0, tmp6, carry
60 subcc tmp3, tmp5, tmp5
61 addxc %g0, carry, carry
62 stx tmp5, [res_ptr - 0x10]
63 addcc carry, tmp7, tmp7
64 addxc %g0, tmp8, carry
65 subcc tmp4, tmp7, tmp7
66 addxc %g0, carry, carry
68 stx tmp7, [res_ptr - 0x08]
74 ldx [s1_ptr + 0x00], tmp1
75 ldx [res_ptr + 0x00], tmp3
76 mulx tmp1, s2_limb, tmp5
77 umulxhi tmp1, s2_limb, tmp6
78 addcc carry, tmp5, tmp5
79 addxc %g0, tmp6, carry
80 subcc tmp3, tmp5, tmp5
81 addxc %g0, carry, carry
82 stx tmp5, [res_ptr + 0x00]
87 END(__mpn_submul_1_vis3)