mul_1.asm revision 1.1.1.1
1dnl S/390-64 mpn_mul_1 2 3dnl Copyright 2011 Free Software Foundation, Inc. 4 5dnl This file is part of the GNU MP Library. 6 7dnl The GNU MP Library is free software; you can redistribute it and/or modify 8dnl it under the terms of the GNU Lesser General Public License as published 9dnl by the Free Software Foundation; either version 3 of the License, or (at 10dnl your option) any later version. 11 12dnl The GNU MP Library is distributed in the hope that it will be useful, but 13dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 15dnl License for more details. 16 17dnl You should have received a copy of the GNU Lesser General Public License 18dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. 19 20include(`../config.m4') 21 22C cycles/limb 23C z900 29 24C z990 22 25C z9 ? 26C z10 ? 27C z196 ? 28 29C INPUT PARAMETERS 30define(`rp', `%r2') 31define(`up', `%r3') 32define(`n', `%r4') 33define(`v0', `%r5') 34 35ASM_START() 36PROLOGUE(mpn_mul_1) 37 stmg %r11, %r12, 88(%r15) 38 lghi %r12, 0 C zero index register 39 aghi %r12, 0 C clear carry flag 40 lghi %r11, 0 C clear carry limb 41 42L(top): lg %r1, 0(%r12,up) 43 mlgr %r0, v0 44 alcgr %r1, %r11 45 lgr %r11, %r0 C copy high part to carry limb 46 stg %r1, 0(%r12,rp) 47 la %r12, 8(%r12) 48 brctg n, L(top) 49 50 lghi %r2, 0 51 alcgr %r2, %r11 52 53 lmg %r11, %r12, 88(%r15) 54 br %r14 55EPILOGUE() 56