mul_1.s revision 1.1.1.1
1! SH2 __gmpn_mul_1 -- Multiply a limb vector with a limb and store 2! the result in a second limb vector. 3 4! Copyright 1995, 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 3 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. If not, see http://www.gnu.org/licenses/. 20 21 22! INPUT PARAMETERS 23! res_ptr r4 24! s1_ptr r5 25! size r6 26! s2_limb r7 27 28 .text 29 .align 1 30 .global ___gmpn_mul_1 31___gmpn_mul_1: 32 mov #0,r2 ! cy_limb = 0 33 mov #0,r0 ! Keep r0 = 0 for entire loop 34 clrt 35 36Loop: mov.l @r5+,r3 37 dmulu.l r3,r7 38 sts macl,r1 39 addc r2,r1 40 sts mach,r2 41 addc r0,r2 ! propagate carry to cy_limb (dt clobbers T) 42 dt r6 43 mov.l r1,@r4 44 bf.s Loop 45 add #4,r4 46 47 rts 48 mov r2,r0 49