1 dnl PowerPC 750 mpn_com -- mpn bitwise one's complement
3 dnl Copyright 2002, 2003 Free Software Foundation, Inc.
5 dnl This file is part of the GNU MP Library.
7 dnl The GNU MP Library is free software; you can redistribute it and/or
8 dnl modify it under the terms of the GNU Lesser General Public License as
9 dnl published by the Free Software Foundation; either version 3 of the
10 dnl License, or (at your option) any later version.
12 dnl The GNU MP Library is distributed in the hope that it will be useful,
13 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
14 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 dnl Lesser General Public License for more details.
17 dnl You should have received a copy of the GNU Lesser General Public License
18 dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
20 include(`../config.m4')
28 C 744x,745x (G4+): 3.0
30 C void mpn_com (mp_ptr dst, mp_srcptr src, mp_size_t size);
32 C This loop form is necessary for the claimed speed.
42 lwz r5, 0(r4) C src low limb
44 sub r4, r4, r3 C src-dst
45 subi r3, r3, 4 C dst-4
47 addi r4, r4, 8 C src-dst+8
57 lwzx r5, r4,r3 C src[i+1]
59 stwu r6, 4(r3) C dst[i]
65 stw r6, 4(r3) C dst[size-1]