1dnl HP-PA mpn_lshift -- Shift a number left. 2 3dnl Copyright 1992, 1994, 2000, 2001, 2002 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 INPUT PARAMETERS 23C res_ptr gr26 24C s_ptr gr25 25C size gr24 26C cnt gr23 27 28ASM_START() 29PROLOGUE(mpn_lshift) 30 sh2add %r24,%r25,%r25 31 sh2add %r24,%r26,%r26 32 ldws,mb -4(0,%r25),%r22 33 subi 32,%r23,%r1 34 mtsar %r1 35 addib,= -1,%r24,L(0004) 36 vshd %r0,%r22,%r28 C compute carry out limb 37 ldws,mb -4(0,%r25),%r29 38 addib,= -1,%r24,L(0002) 39 vshd %r22,%r29,%r20 40 41LDEF(loop) 42 ldws,mb -4(0,%r25),%r22 43 stws,mb %r20,-4(0,%r26) 44 addib,= -1,%r24,L(0003) 45 vshd %r29,%r22,%r20 46 ldws,mb -4(0,%r25),%r29 47 stws,mb %r20,-4(0,%r26) 48 addib,<> -1,%r24,L(loop) 49 vshd %r22,%r29,%r20 50 51LDEF(0002) 52 stws,mb %r20,-4(0,%r26) 53 vshd %r29,%r0,%r20 54 bv 0(%r2) 55 stw %r20,-4(0,%r26) 56 57LDEF(0003) 58 stws,mb %r20,-4(0,%r26) 59 60LDEF(0004) 61 vshd %r22,%r0,%r20 62 bv 0(%r2) 63 stw %r20,-4(0,%r26) 64EPILOGUE() 65