Blame sysdeps/powerpc/powerpc32/addmul_1.S

Packit Service 82fcde
/* Multiply a limb vector by a single limb, for PowerPC.
Packit Service 82fcde
   Copyright (C) 1993-2018 Free Software Foundation, Inc.
Packit Service 82fcde
   This file is part of the GNU C Library.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is free software; you can redistribute it and/or
Packit Service 82fcde
   modify it under the terms of the GNU Lesser General Public
Packit Service 82fcde
   License as published by the Free Software Foundation; either
Packit Service 82fcde
   version 2.1 of the License, or (at your option) any later version.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service 82fcde
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 82fcde
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 82fcde
   Lesser General Public License for more details.
Packit Service 82fcde
Packit Service 82fcde
   You should have received a copy of the GNU Lesser General Public
Packit Service 82fcde
   License along with the GNU C Library; if not, see
Packit Service 82fcde
   <http://www.gnu.org/licenses/>.  */
Packit Service 82fcde
Packit Service 82fcde
#include <sysdep.h>
Packit Service 82fcde
Packit Service 82fcde
/* mp_limb_t mpn_addmul_1 (mp_ptr res_ptr, mp_srcptr s1_ptr,
Packit Service 82fcde
                           mp_size_t s1_size, mp_limb_t s2_limb)
Packit Service 82fcde
   Calculate res+s1*s2 and put result back in res; return carry.  */
Packit Service 82fcde
ENTRY (__mpn_addmul_1)
Packit Service 82fcde
	mtctr	r5
Packit Service 82fcde
Packit Service 82fcde
	lwz	r0,0(r4)
Packit Service 82fcde
	mullw	r7,r0,r6
Packit Service 82fcde
	mulhwu	r10,r0,r6
Packit Service 82fcde
	lwz     r9,0(r3)
Packit Service 82fcde
	addc	r8,r7,r9
Packit Service 82fcde
	addi	r3,r3,-4		/* adjust res_ptr */
Packit Service 82fcde
	bdz	L(1)
Packit Service 82fcde
Packit Service 82fcde
L(0):	lwzu	r0,4(r4)
Packit Service 82fcde
	stwu	r8,4(r3)
Packit Service 82fcde
	mullw	r8,r0,r6
Packit Service 82fcde
	adde	r7,r8,r10
Packit Service 82fcde
	mulhwu	r10,r0,r6
Packit Service 82fcde
	lwz     r9,4(r3)
Packit Service 82fcde
	addze   r10,r10
Packit Service 82fcde
	addc    r8,r7,r9
Packit Service 82fcde
	bdnz	L(0)
Packit Service 82fcde
Packit Service 82fcde
L(1):	stw	r8,4(r3)
Packit Service 82fcde
	addze	r3,r10
Packit Service 82fcde
	blr
Packit Service 82fcde
END (__mpn_addmul_1)