|
Packit Service |
82fcde |
/* S390 __mpn_addmul_1 -- Multiply a limb vector with a limb and add
|
|
Packit Service |
82fcde |
the result to a second limb vector.
|
|
Packit Service |
82fcde |
Copyright (C) 2000-2018 Free Software Foundation, Inc.
|
|
Packit Service |
82fcde |
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
|
|
Packit Service |
82fcde |
This file is part of the GNU MP Library.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
The GNU MP Library is free software; you can redistribute it and/or modify
|
|
Packit Service |
82fcde |
it under the terms of the GNU Lesser General Public License as published by
|
|
Packit Service |
82fcde |
the Free Software Foundation; either version 2.1 of the License, or (at your
|
|
Packit Service |
82fcde |
option) any later version.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
The GNU MP Library is distributed in the hope that it will be useful, but
|
|
Packit Service |
82fcde |
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
Packit Service |
82fcde |
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
|
Packit Service |
82fcde |
License for more details.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
You should have received a copy of the GNU Lesser General Public License
|
|
Packit Service |
82fcde |
along with the GNU MP Library; see the file COPYING.LIB. If not,
|
|
Packit Service |
82fcde |
see <http://www.gnu.org/licenses/>. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/*
|
|
Packit Service |
82fcde |
INPUT PARAMETERS
|
|
Packit Service |
82fcde |
res_ptr %r2
|
|
Packit Service |
82fcde |
s1_ptr %r3
|
|
Packit Service |
82fcde |
sizeP %r4
|
|
Packit Service |
82fcde |
s2_limb %r5
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#include "sysdep.h"
|
|
Packit Service |
82fcde |
#include "asm-syntax.h"
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
.text
|
|
Packit Service |
82fcde |
ENTRY(__mpn_addmul_1)
|
|
Packit Service |
82fcde |
st %r6,24(%r15)
|
|
Packit Service |
82fcde |
cfi_offset (%r6, -72)
|
|
Packit Service |
82fcde |
slr %r6,%r6 # cy_limb = 0
|
|
Packit Service |
82fcde |
.L0: icm %r1,15,0(%r3) # get s1_ptr[i]
|
|
Packit Service |
82fcde |
mr %r0,%r5 # umul_ppmm(prod_high,prod_low,s1_ptr[j],s2_limb)
|
|
Packit Service |
82fcde |
jnm .L1
|
|
Packit Service |
82fcde |
alr %r0,%r5
|
|
Packit Service |
82fcde |
.L1: ltr %r5,%r5
|
|
Packit Service |
82fcde |
jnm .L2
|
|
Packit Service |
82fcde |
al %r0,0(%r3)
|
|
Packit Service |
82fcde |
.L2: alr %r1,%r6 # prod_low += cy_limb
|
|
Packit Service |
82fcde |
lr %r6,%r0 # cy_limb = prod_high
|
|
Packit Service |
82fcde |
brc 12,.L3
|
|
Packit Service |
82fcde |
ahi %r6,1 # + (prod_low < cy_limb)
|
|
Packit Service |
82fcde |
.L3: al %r1,0(%r2) # prod_low += res_ptr[i]
|
|
Packit Service |
82fcde |
brc 12,.L4
|
|
Packit Service |
82fcde |
ahi %r6,1 # cy_limb++
|
|
Packit Service |
82fcde |
.L4: st %r1,0(%r2)
|
|
Packit Service |
82fcde |
la %r2,4(0,%r2)
|
|
Packit Service |
82fcde |
la %r3,4(0,%r3)
|
|
Packit Service |
82fcde |
brct %r4,.L0
|
|
Packit Service |
82fcde |
lr %r2,%r6 # return cy_limb
|
|
Packit Service |
82fcde |
l %r6,24(%r15)
|
|
Packit Service |
82fcde |
.Lexit: br %r14
|
|
Packit Service |
82fcde |
END(__mpn_addmul_1)
|